-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
41 lines (40 loc) · 1.21 KB
/
eslint.config.js
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
38
39
40
41
const { configs } = require('@eslint/js');
const jest = require('eslint-plugin-jest');
const globals = require('globals');
module.exports = [
configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: { ...globals.node, ...globals.jest, Atomics: 'readonly', SharedArrayBuffer: 'readonly' }
},
rules: {
semi: 'error',
quotes: ['error', 'single'],
indent: ['error', 4, { 'SwitchCase': 1 }],
'no-unused-vars':
[
'warn',
{
'varsIgnorePattern': '^_',
'args': 'after-used',
'argsIgnorePattern': '^_',
'caughtErrors': 'all',
'caughtErrorsIgnorePattern': '^_'
}
]
},
ignores: ['coverage/', '**/*.json']
},
{
languageOptions: {
globals: { ...globals.jest }
},
files: ['test/*.test.js'],
...jest.configs['flat/recommended'],
rules: {
...jest.configs['flat/recommended'].rules
}
}
];