-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
77 lines (76 loc) · 1.84 KB
/
.eslintrc.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module.exports = {
root: true,
extends: [
'eslint:recommended',
],
rules: {
indent: ['error', 'tab', {
SwitchCase: 1,
flatTernaryExpressions: true,
offsetTernaryExpressions: true,
}],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
'func-call-spacing': ['error', 'never'],
'keyword-spacing': ['error'],
'no-extra-parens': ['error', 'all'],
'no-extra-semi': ['error'],
'no-trailing-spaces': ['error'],
'object-curly-spacing': ['error', 'always'],
semi: ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
}],
'no-non-null-assertion': 'off',
quotes: ['error', 'single'],
'no-tabs': 0,
'max-len': ['warn', 120],
'arrow-parens': ['error', 'as-needed'],
'array-bracket-spacing': ['error', 'never'],
'quote-props': ['error', 'as-needed'],
'sort-imports': ['error', {
allowSeparatedGroups: true,
}],
'max-statements-per-line': ['error', {
max: 1,
}],
'object-curly-newline': ['error', {
multiline: true,
consistent: true,
}],
'object-property-newline': ['error', {
allowAllPropertiesOnSameLine: true,
}],
'operator-linebreak': ['error', 'before'],
'multiline-ternary': ['error', 'always-multiline'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error'],
'space-unary-ops': [
2, {
words: true,
nonwords: false,
}],
eqeqeq: ['error', 'always'],
'no-var-requires': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'prefer-const': ['error', {
destructuring: 'all',
}],
},
parserOptions: {
ecmaVersion: 2022,
},
env: {
node: true,
commonjs: true,
es2021: true,
browser: true,
},
globals: {
CodeMirror: 'readonly',
editor: 'writable',
},
};