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