-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
100 lines (95 loc) · 2.92 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
93
94
95
96
97
98
99
100
module.exports = {
root: true,
"env": {
"browser": true,
},
parserOptions: {
'project': 'tsconfig.json',
},
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/unbound-method": [
"error",
{
"ignoreStatic": true,
},
],
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-extraneous-class": "off",
'max-lines-per-function': ['error', 35],
'max-classes-per-file': ['error', 1],
'max-params': ['error', 3],
'max-depth': ['error', 2],
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-unused-expressions': 'error',
'no-negated-condition': 'error',
'no-mixed-operators': 'error',
'no-nested-ternary': 'error',
'no-useless-return': 'error',
'no-param-reassign': 'error',
'no-return-assign': 'error',
'no-multi-assign': 'error',
'no-return-await': 'error',
'no-undefined': 'error',
'no-sequences': 'error',
'no-lonely-if': 'error',
'no-multi-str': 'error',
'no-shadow': 'error',
'no-var': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-named-capture-group': 'error',
'prefer-destructuring': 'error',
'prefer-object-spread': 'error',
'prefer-template': 'error',
'prefer-const': 'error',
'quotes': ['error', 'single'],
'require-await': 'error',
'dot-notation': 'error',
'vars-on-top': 'error',
'camelcase': 'error',
'eqeqeq': 'error',
'yoda': 'error',
'array-bracket-spacing': ['error', 'always', { 'singleValue': false, 'objectsInArrays': false }],
'newline-per-chained-call': ['error', { 'ignoreChainWithDepth': 2 }],
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 0 }],
'space-before-function-paren': ['error', 'never'],
'key-spacing': ['error', { 'afterColon': true }],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'indent': ['error', 4, { 'SwitchCase': 1 }],
'no-whitespace-before-property': 'error',
'func-call-spacing': ['error', 'never'],
'max-len': ['error', { 'code': 120 }],
'space-before-blocks': 'error',
'no-multi-spaces': 'error',
'comma-spacing': 'error',
'arrow-spacing': 'error',
'block-spacing': 'error',
'arrow-parens': 'error',
'new-parens': 'error',
'semi': 'off',
'keyword-spacing': [
'error',
{
'overrides':
{
'if': { 'after': true },
'for': { 'after': false },
'while': { 'after': false },
'static': { 'after': false },
'as': { 'after': false }
}
}
],
}
};