-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
60 lines (55 loc) · 1.55 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import globals from 'globals';
import js from '@eslint/js';
export default [
js.configs.recommended, {
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
semi: 'warn',
'semi-style': 'error',
'semi-spacing': 'warn',
camelcase: 'error',
quotes: ['warn', 'single', {
avoidEscape: true,
allowTemplateLiterals: false,
}],
'brace-style': 'error',
indent: ['error', 2],
'no-eval': 'error',
'no-implied-eval': 'error',
'prefer-const': 'error',
'no-var': 'warn',
'prefer-arrow-callback': 'warn',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'warn',
'template-curly-spacing': 'warn',
'symbol-description': 'error',
'object-shorthand': 'warn',
'prefer-promise-reject-errors': 'error',
'prefer-destructuring': 'warn',
'prefer-numeric-literals': 'warn',
'no-new-object': 'error',
eqeqeq: ['error', 'smart'],
curly: ['error', 'all'],
'dot-location': ['error', 'property'],
'dot-notation': 'error',
'no-array-constructor': 'error',
'no-throw-literal': 'error',
'no-self-compare': 'error',
'no-useless-call': 'warn',
'spaced-comment': 'warn',
'no-multi-spaces': 'warn',
'no-new-wrappers': 'error',
'no-script-url': 'error',
'no-void': 'warn',
'vars-on-top': 'warn',
'require-await': 'warn'
}
}];