-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
37 lines (33 loc) · 1.13 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import js from '@eslint/js';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
export default [
js.configs.recommended,
jest.configs['flat/recommended'],
{
files: ['**/*.js'],
languageOptions: {
sourceType: 'commonjs'
}
},
{
languageOptions: {
ecmaVersion: 2024,
globals: { ...globals.node, ...globals.commonjs, ...globals.es2024 }
},
rules: {
'comma-dangle': 'error',
'indent': ['error', 4],
'max-len': ['error', 120, { ignoreStrings: true, ignoreTemplateLiterals: true }],
'no-constant-condition': ['error', { checkLoops: false }],
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'no-multiple-empty-lines': 'error',
'no-shadow': 'error',
'no-unused-vars': ['error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }],
'object-curly-spacing': ['error', 'always'],
'quotes': ['error', 'single', { avoidEscape: true }],
'semi': 'error',
'strict': 'error'
}
}
];