-
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy patheslint.config.mjs
64 lines (52 loc) · 1.65 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
61
62
63
64
import globals from 'globals';
import js from '@eslint/js';
export default [
js.configs.recommended,
{
ignores: ['resources/**/*-stub.js', 'resources/**/*.ts'],
}, {
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
indent: ['error', 4],
'arrow-parens': ['error', 'as-needed'],
'padded-blocks': ['error', {
blocks: 'never',
classes: 'always',
}],
'object-curly-spacing': ['error', 'never'],
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],
'import/prefer-default-export': 'off',
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true,
}],
'arrow-body-style': 'off',
'no-restricted-syntax': 'off',
'no-continue': 'off',
'prefer-destructuring': 'off',
'class-methods-use-this': 'off',
'no-param-reassign': 'off',
'no-console': ['warn', {
allow: ['error', 'warn'],
}],
'no-new': 'off',
'max-len': ['error', {
code: 110,
tabWidth: 4,
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
}];