-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
92 lines (84 loc) · 3 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
const error = 'error'
const readonly = 'readonly'
const always = 'always'
const never = 'never'
module.exports = {
extends: 'eslint:recommended',
env: {
browser: true,
es2021: true
},
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
globals: {
describe: readonly,
it: readonly,
beforeEach: readonly,
afterEach: readonly
},
rules: {
indent: [error, 2],
'linebreak-style': [error, 'unix'],
quotes: [error, 'single'],
semi: [error, never],
'block-scoped-var': [error],
complexity: [error, 4],
'dot-location': [error, 'object'],
eqeqeq: [error, always],
'no-else-return': [error],
'no-multi-spaces': [error, { ignoreEOLComments: true }],
'no-octal': [error],
'no-octal-escape': [error],
'no-return-assign': [error, always],
'no-sequences': [error],
'no-useless-concat': [error],
'no-useless-return': [error],
radix: [error],
yoda: [error],
'no-label-var': [error],
'brace-style': [error, '1tbs', {allowSingleLine: true}],
'comma-spacing': [error, {before: false, after: true}],
'comma-style': [error, 'last'],
'func-call-spacing': [error, never],
'key-spacing': [error, {beforeColon: false, afterColon:true}],
'keyword-spacing': [error],
'max-depth': [error, 4],
'max-len': [error, {code: 100, comments: 100, ignoreUrls: true}],
'max-lines': [error, {max: 200, skipBlankLines: true, skipComments: false}],
'max-lines-per-function': [error, {max: 200, skipBlankLines: true, skipComments: true, IIFEs: false}],
'max-nested-callbacks': [error, 4],
'max-params': [error, 4],
'max-statements': [error, 10],
'max-statements-per-line': [error, {max: 2}],
'new-cap': [error],
'new-parens': [error, always],
'no-array-constructor': [error],
'no-bitwise': [error],
'no-lonely-if': [error],
'no-multi-assign': [error],
'no-multiple-empty-lines': [error, {max: 3, maxBOF: 1, maxEOF: 1}],
'no-nested-ternary': [error],
'no-new-object': [error],
'no-tabs': [error],
'no-trailing-spaces': [error],
'no-unneeded-ternary': [error],
'no-whitespace-before-property': [error],
'nonblock-statement-body-position': [error, 'beside'],
'prefer-exponentiation-operator': [error],
'quote-props': [error, 'as-needed'],
'semi-spacing': [error],
'semi-style': [error],
'space-before-function-paren': [error, never],
'space-infix-ops': [error],
'spaced-comment': [error, always],
'switch-colon-spacing': [error],
'no-duplicate-imports': [error],
'no-useless-computed-key': [error],
'no-useless-constructor': [error],
'no-var': [error],
'prefer-const': [error],
'prefer-rest-params': [error]
}
}