-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
196 lines (195 loc) · 5.18 KB
/
.eslintrc
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:sonarjs/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"tsconfigRootDir": "."
},
"plugins": [
"react",
"react-hooks",
"sonarjs",
"import",
"simple-import-sort",
"@typescript-eslint"
],
"rules": {
"no-shadow": [
"error",
{
"builtinGlobals": false
}
],
"no-duplicate-imports": [
"error",
{
"includeExports": true
}
],
"no-template-curly-in-string": "error",
"block-scoped-var": "error",
"curly": ["error", "all"],
"eqeqeq": "error",
"max-classes-per-file": ["error", 1],
"no-alert": "warn",
"no-console": "error",
"no-else-return": [
"error",
{
"allowElseIf": false
}
],
"no-implicit-coercion": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-multi-spaces": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-return": "error",
"prefer-promise-reject-errors": "error",
"radix": "error",
"no-undefined": "error",
"array-bracket-newline": [
"error",
{
"multiline": true
}
],
"comma-dangle": ["error", "always-multiline"],
"comma-style": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"new-parens": "error",
"no-bitwise": "warn",
"no-lonely-if": "warn",
"no-multiple-empty-lines": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-tabs": [
"error",
{
"allowIndentationTabs": true
}
],
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": "error",
"object-curly-spacing": ["error", "always"],
"semi-spacing": "error",
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always"],
"switch-colon-spacing": "error",
"arrow-spacing": "error",
"generator-star-spacing": ["error", "after"],
"no-confusing-arrow": "error",
"no-useless-computed-key": "error",
"no-useless-rename": "error",
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": "warn",
"prefer-destructuring": "error",
"rest-spread-spacing": ["error", "never"],
"sort-imports": "off",
"import/order": "off",
"simple-import-sort/sort": "error",
"template-curly-spacing": "error",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi"
}
}
],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/brace-style": ["error", "1tbs"],
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_$"
}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
"ts-expect-error": true,
"ts-nocheck": true,
"ts-check": true
}
],
"react/no-access-state-in-setstate": "error",
"react/no-danger": "error",
"react/no-multi-comp": "error",
"react/no-this-in-sfc": "error",
"react/prefer-stateless-function": "error",
"react/prop-types": "off",
"react/jsx-filename-extension": [
"error",
{
"extensions": [".tsx"]
}
],
"react/jsx-no-bind": "off",
"react/jsx-no-literals": "off",
"react/jsx-no-useless-fragment": "error",
"react/jsx-pascal-case": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error"
}
}