44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['node_modules/**', 'uploads/**', 'dist/**', '.wrangler/**'],
|
|
},
|
|
js.configs.recommended,
|
|
{
|
|
files: ['src/**', 'tests/**'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
},
|
|
rules: {
|
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
'no-undef': 'error',
|
|
'no-console': 'off',
|
|
eqeqeq: ['error', 'smart'],
|
|
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
},
|
|
},
|
|
{
|
|
files: ['public/**'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
rules: {
|
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
'no-undef': 'error',
|
|
'no-console': 'off',
|
|
eqeqeq: ['error', 'smart'],
|
|
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
},
|
|
},
|
|
];
|