diff --git a/eslint.config.mjs b/eslint.config.mjs index c8b3cd0..6c4c31f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,6 +2,7 @@ import js from '@eslint/js'; import globals from 'globals'; export default [ + { ignores: ['node_modules', '**/*.min.js', '**/*bundle*', 'build/**', 'dist/**', 'services/translations/**'] }, js.configs.recommended, { languageOptions: { @@ -17,7 +18,8 @@ export default [ 'comma-style': 'error', 'curly': ['error', 'multi-line', 'consistent'], 'dot-location': ['error', 'property'], - 'handle-callback-err': 'off', + 'eqeqeq': ['error', 'always', { null: 'ignore' }], + 'handle-callback-err': 'warn', 'indent': ['warn', 'tab'], 'keyword-spacing': 'warn', 'max-nested-callbacks': ['error', { max: 4 }], @@ -29,17 +31,18 @@ export default [ 'no-lonely-if': 'warn', 'no-multi-spaces': 'warn', 'no-multiple-empty-lines': ['warn', { max: 3, maxEOF: 1, maxBOF: 0 }], + 'no-return-await': 'warn', 'no-shadow': ['error', { allow: ['err', 'resolve', 'reject'] }], 'no-trailing-spaces': 'warn', 'no-unreachable': 'warn', - 'no-unused-vars': 'warn', + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], 'no-use-before-define': ['error', { functions: false, classes: true }], 'no-var': 'error', 'object-curly-spacing': ['warn', 'always'], + 'object-shorthand': 'warn', 'prefer-const': 'error', 'quotes': ['warn', 'single'], 'semi': ['warn', 'always'], - 'sort-vars': 'warn', 'space-before-blocks': 'warn', 'space-before-function-paren': ['warn', { anonymous: 'never', named: 'never', asyncArrow: 'always' }], 'space-in-parens': 'warn', @@ -49,6 +52,5 @@ export default [ 'wrap-regex': 'warn', 'yoda': 'error', }, - ignores: ['node_modules', '*min.js', '*bundle*', 'build/*', 'dist/*'], }, -]; \ No newline at end of file +];