-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
46 lines (44 loc) · 968 Bytes
/
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
42
43
44
45
46
import mocha from 'eslint-plugin-mocha';
import globals from 'globals';
export default [
mocha.configs.flat.recommended,
{
'languageOptions': {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
},
},
'ignores': [ '**/*.html' ],
'rules': {
'indent': [
'warn',
2,
{
'VariableDeclarator': { 'var': 2, 'let': 2, 'const': 3 },
'SwitchCase': 1,
'MemberExpression': 1,
'CallExpression': { 'arguments': 'first' },
'ArrayExpression': 'first',
'ObjectExpression': 'first',
'ignoredNodes': ['ConditionalExpression']
},
],
'quotes': [
'warn',
'single'
],
'semi': [
'warn',
'always'
],
'no-console': [
'warn',
{ allow: ['warn', 'error'] }
],
'no-trailing-spaces': [
'warn'
]
}
}];