eslint-config-heck 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/biomeLinting.json +34 -8
- package/browser.js +10 -10
- package/browserWithBiome.js +10 -10
- package/complexity.js +25 -16
- package/groupImports.js +30 -21
- package/noFormatting.js +94 -94
- package/node.js +1475 -1395
- package/nodeWithBiome.js +1253 -1202
- package/package.json +8 -8
- package/reactNative.js +12 -12
package/node.js
CHANGED
|
@@ -1,1437 +1,1517 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable strict */
|
|
2
2
|
|
|
3
3
|
const path = require("node:path");
|
|
4
4
|
|
|
5
5
|
const parserOptions = {
|
|
6
|
-
|
|
6
|
+
sourceType: "script",
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
ecmaVersion: 13,
|
|
9
|
+
ecmaFeatures: {
|
|
10
|
+
globalReturn: false,
|
|
11
|
+
impliedStrict: false,
|
|
12
|
+
jsx: true,
|
|
13
|
+
},
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const env = {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
es2022: true,
|
|
18
|
+
node: true,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const globals = {};
|
|
22
22
|
const extendConfigs = ["plugin:import/typescript"];
|
|
23
23
|
const plugins = ["react", "react-hooks", "unicorn", "import"];
|
|
24
24
|
const settings = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
react: {
|
|
26
|
+
version: "detect",
|
|
27
|
+
},
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const rules = {
|
|
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
|
-
|
|
31
|
+
// Possible problems
|
|
32
|
+
"for-direction": "error",
|
|
33
|
+
"getter-return": "error",
|
|
34
|
+
"no-async-promise-executor": "error",
|
|
35
|
+
"no-await-in-loop": "warn",
|
|
36
|
+
"no-compare-neg-zero": "error",
|
|
37
|
+
"no-cond-assign": "error",
|
|
38
|
+
"no-console": "error",
|
|
39
|
+
"no-constant-binary-expression": "error",
|
|
40
|
+
"no-constant-condition": "error",
|
|
41
|
+
"no-control-regex": "error",
|
|
42
|
+
"no-debugger": "error",
|
|
43
|
+
"no-dupe-args": "error",
|
|
44
|
+
"no-dupe-else-if": "error",
|
|
45
|
+
"no-dupe-keys": "error",
|
|
46
|
+
"no-duplicate-case": "error",
|
|
47
|
+
"no-empty": "error",
|
|
48
|
+
"no-empty-character-class": "error",
|
|
49
|
+
"no-ex-assign": "error",
|
|
50
|
+
"no-extra-boolean-cast": "error",
|
|
51
|
+
"no-extra-parens": [
|
|
52
|
+
"error",
|
|
53
|
+
"all",
|
|
54
|
+
{
|
|
55
|
+
conditionalAssign: false,
|
|
56
|
+
nestedBinaryExpressions: false,
|
|
57
|
+
enforceForArrowConditionals: false,
|
|
58
|
+
ignoreJSX: "multi-line",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
"no-extra-semi": "error",
|
|
62
|
+
"no-func-assign": "error",
|
|
63
|
+
"no-import-assign": "error",
|
|
64
|
+
"no-inner-declarations": "error",
|
|
65
|
+
"no-invalid-regexp": "error",
|
|
66
|
+
"no-irregular-whitespace": [
|
|
67
|
+
"error",
|
|
68
|
+
{
|
|
69
|
+
skipComments: false,
|
|
70
|
+
skipRegExps: false,
|
|
71
|
+
skipStrings: false,
|
|
72
|
+
skipTemplates: false,
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
"no-loss-of-precision": "error",
|
|
76
|
+
"no-misleading-character-class": "error",
|
|
77
|
+
"no-new-native-nonconstructor": "error",
|
|
78
|
+
"no-obj-calls": "error",
|
|
79
|
+
"no-promise-executor-return": "error",
|
|
80
|
+
"no-prototype-builtins": "error",
|
|
81
|
+
"no-regex-spaces": "error",
|
|
82
|
+
"no-setter-return": "error",
|
|
83
|
+
"no-sparse-arrays": "error",
|
|
84
|
+
"no-template-curly-in-string": "error",
|
|
85
|
+
"no-unexpected-multiline": "error",
|
|
86
|
+
"no-unreachable": "error",
|
|
87
|
+
"no-unreachable-loop": "error",
|
|
88
|
+
"no-unsafe-finally": "error",
|
|
89
|
+
"no-unsafe-negation": "error",
|
|
90
|
+
"no-unsafe-optional-chaining": [
|
|
91
|
+
"error",
|
|
92
|
+
{
|
|
93
|
+
disallowArithmeticOperators: true,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
"no-useless-backreference": "error",
|
|
97
|
+
"require-atomic-updates": "error",
|
|
98
|
+
"use-isnan": "error",
|
|
99
|
+
"valid-typeof": "error",
|
|
100
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
101
|
+
// Suggestions
|
|
102
|
+
"accessor-pairs": [
|
|
103
|
+
"error",
|
|
104
|
+
{
|
|
105
|
+
getWithoutSet: false,
|
|
106
|
+
setWithoutGet: true,
|
|
107
|
+
enforceForClassMembers: true,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
"array-callback-return": [
|
|
111
|
+
"error",
|
|
112
|
+
{
|
|
113
|
+
allowImplicit: true,
|
|
114
|
+
checkForEach: false,
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
"block-scoped-var": "error",
|
|
118
|
+
"class-methods-use-this": "error",
|
|
119
|
+
complexity: "off",
|
|
120
|
+
"consistent-return": "error",
|
|
121
|
+
curly: ["error", "all"],
|
|
122
|
+
"default-case": "off",
|
|
123
|
+
"default-case-last": "error",
|
|
124
|
+
"default-param-last": "error",
|
|
125
|
+
"dot-location": ["error", "property"],
|
|
126
|
+
"dot-notation": "error",
|
|
127
|
+
eqeqeq: ["error", "always"],
|
|
128
|
+
"grouped-accessor-pairs": ["error", "getBeforeSet"],
|
|
129
|
+
"guard-for-in": "error",
|
|
130
|
+
"logical-assignment-operators": "error",
|
|
131
|
+
"max-classes-per-file": "off",
|
|
132
|
+
"no-alert": "error",
|
|
133
|
+
"no-caller": "error",
|
|
134
|
+
"no-case-declarations": "error",
|
|
135
|
+
"no-constructor-return": "error",
|
|
136
|
+
"no-div-regex": "off",
|
|
137
|
+
"no-else-return": [
|
|
138
|
+
"error",
|
|
139
|
+
{
|
|
140
|
+
allowElseIf: false,
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
"no-empty-function": "error",
|
|
144
|
+
"no-empty-pattern": "error",
|
|
145
|
+
"no-empty-static-block": "error",
|
|
146
|
+
"no-eq-null": "off",
|
|
147
|
+
"no-eval": "error",
|
|
148
|
+
"no-extend-native": "error",
|
|
149
|
+
"no-extra-bind": "error",
|
|
150
|
+
"no-extra-label": "error",
|
|
151
|
+
"no-fallthrough": "error",
|
|
152
|
+
"no-floating-decimal": "error",
|
|
153
|
+
"no-global-assign": "error",
|
|
154
|
+
"no-implicit-coercion": "error",
|
|
155
|
+
"no-implicit-globals": "off",
|
|
156
|
+
"no-implied-eval": "error",
|
|
157
|
+
"no-invalid-this": "error",
|
|
158
|
+
"no-iterator": "error",
|
|
159
|
+
"no-labels": "error",
|
|
160
|
+
"no-lone-blocks": "error",
|
|
161
|
+
"no-loop-func": "error",
|
|
162
|
+
"no-magic-numbers": "off",
|
|
163
|
+
"no-multi-spaces": [
|
|
164
|
+
"error",
|
|
165
|
+
{
|
|
166
|
+
ignoreEOLComments: false,
|
|
167
|
+
exceptions: {
|
|
168
|
+
BinaryExpression: false,
|
|
169
|
+
ImportDeclaration: false,
|
|
170
|
+
Property: false,
|
|
171
|
+
VariableDeclarator: false,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
"no-multi-str": "error",
|
|
176
|
+
"no-new": "error",
|
|
177
|
+
"no-new-func": "error",
|
|
178
|
+
"no-new-wrappers": "error",
|
|
179
|
+
"no-nonoctal-decimal-escape": "error",
|
|
180
|
+
"no-octal-escape": "error",
|
|
181
|
+
"no-param-reassign": [
|
|
182
|
+
"error",
|
|
183
|
+
{
|
|
184
|
+
props: true,
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
"no-proto": "error",
|
|
188
|
+
"no-redeclare": "error",
|
|
189
|
+
"no-restricted-properties": "off",
|
|
190
|
+
"no-return-assign": ["error", "always"],
|
|
191
|
+
"no-script-url": "error",
|
|
192
|
+
"no-self-assign": "error",
|
|
193
|
+
"no-self-compare": "error",
|
|
194
|
+
"no-sequences": "error",
|
|
195
|
+
"no-throw-literal": "error",
|
|
196
|
+
"no-unmodified-loop-condition": "error",
|
|
197
|
+
"no-unused-expressions": "error",
|
|
198
|
+
"no-unused-labels": "off",
|
|
199
|
+
"no-useless-call": "error",
|
|
200
|
+
"no-useless-catch": "error",
|
|
201
|
+
"no-useless-concat": "error",
|
|
202
|
+
"no-useless-escape": "error",
|
|
203
|
+
"no-useless-return": "error",
|
|
204
|
+
"no-void": "error",
|
|
205
|
+
"no-warning-comments": "warn",
|
|
206
|
+
"no-with": "error",
|
|
207
|
+
"prefer-named-capture-group": "error",
|
|
208
|
+
"prefer-object-has-own": "error",
|
|
209
|
+
"prefer-promise-reject-errors": "error",
|
|
210
|
+
"prefer-regex-literals": "error",
|
|
211
|
+
radix: ["error", "always"],
|
|
212
|
+
"require-await": "off",
|
|
213
|
+
"require-unicode-regexp": "error",
|
|
214
|
+
"vars-on-top": "error",
|
|
215
|
+
"wrap-iife": [
|
|
216
|
+
"error",
|
|
217
|
+
"inside",
|
|
218
|
+
{
|
|
219
|
+
functionPrototypeMethods: true,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
yoda: [
|
|
223
|
+
"error",
|
|
224
|
+
"never",
|
|
225
|
+
{
|
|
226
|
+
exceptRange: true,
|
|
227
|
+
onlyEquality: false,
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
// Strict mode
|
|
232
|
+
strict: ["error", "global"],
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
234
|
+
// Variables
|
|
235
|
+
"init-declarations": "off",
|
|
236
|
+
"no-delete-var": "error",
|
|
237
|
+
"no-label-var": "off",
|
|
238
|
+
"no-restricted-globals": "error",
|
|
239
|
+
"no-shadow": "error",
|
|
240
|
+
"no-shadow-restricted-names": "error",
|
|
241
|
+
"no-undef": "error",
|
|
242
|
+
"no-undef-init": "error",
|
|
243
|
+
"no-undefined": "off",
|
|
244
|
+
"no-unused-vars": [
|
|
245
|
+
"error",
|
|
246
|
+
{
|
|
247
|
+
args: "after-used",
|
|
248
|
+
caughtErrors: "all",
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
"no-use-before-define": ["error", "nofunc"],
|
|
252
252
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
253
|
+
// Layout & Formatting
|
|
254
|
+
"array-bracket-newline": [
|
|
255
|
+
"error",
|
|
256
|
+
{
|
|
257
|
+
multiline: true,
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
"array-bracket-spacing": "error",
|
|
261
|
+
"array-element-newline": ["error", "consistent"],
|
|
262
|
+
"block-spacing": "error",
|
|
263
|
+
"brace-style": "error",
|
|
264
|
+
camelcase: "error",
|
|
265
|
+
"capitalized-comments": "off",
|
|
266
|
+
"comma-dangle": ["error", "always-multiline"],
|
|
267
|
+
"comma-spacing": "error",
|
|
268
|
+
"comma-style": "error",
|
|
269
|
+
"computed-property-spacing": "error",
|
|
270
|
+
"consistent-this": ["error", "that"],
|
|
271
|
+
"eol-last": ["error", "never"],
|
|
272
|
+
"func-call-spacing": "error",
|
|
273
|
+
"func-name-matching": "off",
|
|
274
|
+
"func-names": "off",
|
|
275
|
+
"func-style": ["error", "declaration", { allowArrowFunctions: true }],
|
|
276
|
+
"function-call-argument-newline": ["error", "consistent"],
|
|
277
|
+
"function-paren-newline": ["error", "multiline-arguments"],
|
|
278
|
+
"id-denylist": "off",
|
|
279
|
+
"id-length": [
|
|
280
|
+
"error",
|
|
281
|
+
{
|
|
282
|
+
exceptions: ["_", "i", "j", "x", "y", "z"],
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
"id-match": "off",
|
|
286
|
+
"implicit-arrow-linebreak": "error",
|
|
287
|
+
indent: [
|
|
288
|
+
"error",
|
|
289
|
+
4,
|
|
290
|
+
{
|
|
291
|
+
SwitchCase: 1,
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
"jsx-quotes": "error",
|
|
295
|
+
"key-spacing": "error",
|
|
296
|
+
"keyword-spacing": "error",
|
|
297
|
+
// redundant with no-inline-comments
|
|
298
|
+
"line-comment-position": "off",
|
|
299
|
+
"linebreak-style": ["error"],
|
|
300
|
+
"lines-around-comment": "off",
|
|
301
|
+
"lines-between-class-members": [
|
|
302
|
+
"error",
|
|
303
|
+
"always",
|
|
304
|
+
{
|
|
305
|
+
exceptAfterSingleLine: true,
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
"max-depth": "off",
|
|
309
|
+
"max-len": "off",
|
|
310
|
+
"max-lines": "off",
|
|
311
|
+
"max-lines-per-function": "off",
|
|
312
|
+
"max-nested-callbacks": "off",
|
|
313
|
+
"max-params": "off",
|
|
314
|
+
"max-statements": "off",
|
|
315
|
+
"max-statements-per-line": "error",
|
|
316
|
+
"multiline-comment-style": ["error", "separate-lines"],
|
|
317
|
+
"multiline-ternary": ["error", "always-multiline"],
|
|
318
|
+
"new-cap": "error",
|
|
319
|
+
"new-parens": "error",
|
|
320
|
+
"newline-per-chained-call": "error",
|
|
321
|
+
"no-array-constructor": "error",
|
|
322
|
+
"no-bitwise": [
|
|
323
|
+
"error",
|
|
324
|
+
{
|
|
325
|
+
allow: [],
|
|
326
|
+
int32Hint: false,
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
"no-continue": "off",
|
|
330
|
+
"no-inline-comments": "error",
|
|
331
|
+
"no-lonely-if": "error",
|
|
332
|
+
"no-mixed-operators": "error",
|
|
333
|
+
"no-mixed-spaces-and-tabs": "error",
|
|
334
|
+
"no-multi-assign": "error",
|
|
335
|
+
"no-multiple-empty-lines": [
|
|
336
|
+
"error",
|
|
337
|
+
{
|
|
338
|
+
max: 1,
|
|
339
|
+
maxEOF: 1,
|
|
340
|
+
maxBOF: 0,
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
"no-negated-condition": "off",
|
|
344
344
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
345
|
+
"no-nested-ternary": "error",
|
|
346
|
+
"no-object-constructor": "error",
|
|
347
|
+
"no-plusplus": "off",
|
|
348
|
+
"no-restricted-syntax": "off",
|
|
349
|
+
"no-tabs": "error",
|
|
350
|
+
"no-ternary": "off",
|
|
351
|
+
"no-trailing-spaces": "error",
|
|
352
|
+
"no-underscore-dangle": [
|
|
353
|
+
"error",
|
|
354
|
+
{
|
|
355
|
+
enforceInMethodNames: true,
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
"no-unneeded-ternary": "error",
|
|
359
|
+
"no-whitespace-before-property": "error",
|
|
360
|
+
"nonblock-statement-body-position": ["error", "below"],
|
|
361
|
+
"object-curly-newline": [
|
|
362
|
+
"error",
|
|
363
|
+
{
|
|
364
|
+
consistent: true,
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
"object-curly-spacing": ["error", "always"],
|
|
368
|
+
"object-property-newline": [
|
|
369
|
+
"error",
|
|
370
|
+
{
|
|
371
|
+
allowAllPropertiesOnSameLine: true,
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
"one-var": ["error", "never"],
|
|
375
|
+
"one-var-declaration-per-line": "off",
|
|
376
|
+
"operator-assignment": "error",
|
|
377
|
+
"operator-linebreak": ["error", "after"],
|
|
378
|
+
"padded-blocks": ["error", "never"],
|
|
379
|
+
"padding-line-between-statements": [
|
|
380
|
+
"error",
|
|
381
|
+
// return
|
|
382
|
+
{
|
|
383
|
+
blankLine: "always",
|
|
384
|
+
prev: "*",
|
|
385
|
+
next: "return",
|
|
386
|
+
},
|
|
387
|
+
// const, let, var
|
|
388
|
+
{
|
|
389
|
+
blankLine: "always",
|
|
390
|
+
prev: ["const", "let", "var"],
|
|
391
|
+
next: "*",
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
blankLine: "always",
|
|
395
|
+
prev: "*",
|
|
396
|
+
next: ["const", "let", "var"],
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
blankLine: "any",
|
|
400
|
+
prev: ["const", "let", "var"],
|
|
401
|
+
next: ["const", "let", "var"],
|
|
402
|
+
},
|
|
403
|
+
// import
|
|
404
|
+
{
|
|
405
|
+
blankLine: "always",
|
|
406
|
+
prev: ["import", "cjs-import"],
|
|
407
|
+
next: "*",
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
blankLine: "never",
|
|
411
|
+
prev: ["import", "cjs-import"],
|
|
412
|
+
next: ["import", "cjs-import"],
|
|
413
|
+
},
|
|
414
|
+
// export
|
|
415
|
+
{
|
|
416
|
+
blankLine: "always",
|
|
417
|
+
prev: "*",
|
|
418
|
+
next: ["export", "cjs-export"],
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
blankLine: "any",
|
|
422
|
+
prev: ["export", "cjs-export"],
|
|
423
|
+
next: ["export", "cjs-export"],
|
|
424
|
+
},
|
|
425
|
+
// function
|
|
426
|
+
{
|
|
427
|
+
blankLine: "always",
|
|
428
|
+
prev: "*",
|
|
429
|
+
next: "function",
|
|
430
|
+
},
|
|
431
|
+
],
|
|
432
|
+
"prefer-exponentiation-operator": "error",
|
|
433
|
+
"prefer-object-spread": "error",
|
|
434
|
+
"quote-props": ["error", "as-needed"],
|
|
435
|
+
quotes: ["error", "double", { avoidEscape: true }],
|
|
436
|
+
semi: [
|
|
437
|
+
"error",
|
|
438
|
+
"always",
|
|
439
|
+
{
|
|
440
|
+
omitLastInOneLineBlock: false,
|
|
441
|
+
},
|
|
442
|
+
],
|
|
443
|
+
"semi-spacing": "error",
|
|
444
|
+
"semi-style": "error",
|
|
445
|
+
"sort-keys": "off",
|
|
446
|
+
"sort-vars": "off",
|
|
447
|
+
"space-before-blocks": "error",
|
|
448
|
+
"space-before-function-paren": "error",
|
|
449
|
+
"space-in-parens": "error",
|
|
450
|
+
"space-infix-ops": "error",
|
|
451
|
+
"space-unary-ops": "error",
|
|
452
|
+
"spaced-comment": ["error", "always"],
|
|
453
|
+
"switch-colon-spacing": "error",
|
|
454
|
+
"template-tag-spacing": "error",
|
|
455
|
+
"unicode-bom": "error",
|
|
456
|
+
"wrap-regex": "error",
|
|
439
457
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
458
|
+
// ECMAScript6
|
|
459
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
460
|
+
"arrow-parens": ["error", "as-needed"],
|
|
461
|
+
"arrow-spacing": "error",
|
|
462
|
+
"constructor-super": "error",
|
|
463
|
+
"generator-star-spacing": ["error", "both"],
|
|
464
|
+
"no-class-assign": "error",
|
|
465
|
+
"no-confusing-arrow": "off",
|
|
466
|
+
"no-const-assign": "error",
|
|
467
|
+
"no-dupe-class-members": "error",
|
|
468
|
+
"no-duplicate-imports": "off",
|
|
469
|
+
"no-new-symbol": "error",
|
|
470
|
+
"no-restricted-imports": "off",
|
|
471
|
+
"no-restricted-exports": "off",
|
|
472
|
+
"no-this-before-super": "off",
|
|
473
|
+
"no-useless-computed-key": [
|
|
474
|
+
"error",
|
|
475
|
+
{
|
|
476
|
+
enforceForClassMembers: true,
|
|
477
|
+
},
|
|
478
|
+
],
|
|
479
|
+
"no-useless-constructor": "error",
|
|
480
|
+
"no-useless-rename": "error",
|
|
481
|
+
"no-var": "error",
|
|
482
|
+
"object-shorthand": [
|
|
483
|
+
"error",
|
|
484
|
+
"always",
|
|
485
|
+
{
|
|
486
|
+
avoidExplicitReturnArrows: true,
|
|
487
|
+
},
|
|
488
|
+
],
|
|
489
|
+
"prefer-arrow-callback": "error",
|
|
490
|
+
"prefer-const": [
|
|
491
|
+
"error",
|
|
492
|
+
{
|
|
493
|
+
destructuring: "any",
|
|
494
|
+
ignoreReadBeforeAssign: true,
|
|
495
|
+
},
|
|
496
|
+
],
|
|
497
|
+
"prefer-destructuring": [
|
|
498
|
+
"error",
|
|
499
|
+
{
|
|
500
|
+
VariableDeclarator: {
|
|
501
|
+
array: false,
|
|
502
|
+
object: true,
|
|
503
|
+
},
|
|
504
|
+
AssignmentExpression: {
|
|
505
|
+
array: false,
|
|
506
|
+
object: false,
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
],
|
|
510
|
+
"prefer-numeric-literals": "error",
|
|
511
|
+
"prefer-rest-params": "error",
|
|
512
|
+
"prefer-spread": "error",
|
|
513
|
+
"prefer-template": "error",
|
|
514
|
+
"require-yield": "error",
|
|
515
|
+
"rest-spread-spacing": "error",
|
|
516
|
+
"sort-imports": [
|
|
517
|
+
"error",
|
|
518
|
+
{
|
|
519
|
+
ignoreCase: true,
|
|
520
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
521
|
+
},
|
|
522
|
+
],
|
|
523
|
+
"symbol-description": "error",
|
|
524
|
+
"template-curly-spacing": "error",
|
|
525
|
+
"yield-star-spacing": ["error", "both"],
|
|
508
526
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
527
|
+
// eslint-plugin-react
|
|
528
|
+
"react/boolean-prop-naming": "off",
|
|
529
|
+
"react/button-has-type": "error",
|
|
530
|
+
"react/default-props-match-prop-types": "off",
|
|
531
|
+
"react/destructuring-assignment": [
|
|
532
|
+
"error",
|
|
533
|
+
"always",
|
|
534
|
+
{ destructureInSignature: "always" },
|
|
535
|
+
],
|
|
536
|
+
"react/display-name": "off",
|
|
537
|
+
"react/forbid-component-props": "off",
|
|
538
|
+
"react/forbid-dom-props": "off",
|
|
539
|
+
"react/forbid-elements": "off",
|
|
540
|
+
"react/forbid-foreign-prop-types": "off",
|
|
541
|
+
"react/forbid-prop-types": "off",
|
|
542
|
+
"react/function-component-definition": [
|
|
543
|
+
"error",
|
|
544
|
+
{
|
|
545
|
+
namedComponents: "function-declaration",
|
|
546
|
+
unnamedComponents: "arrow-function",
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
"react/hook-use-state": [
|
|
550
|
+
"error",
|
|
551
|
+
{
|
|
552
|
+
allowDestructuredState: true,
|
|
553
|
+
},
|
|
554
|
+
],
|
|
555
|
+
"react/iframe-missing-sandbox": "error",
|
|
556
|
+
"react/jsx-boolean-value": "error",
|
|
557
|
+
"react/jsx-child-element-spacing": "error",
|
|
558
|
+
"react/jsx-closing-bracket-location": "error",
|
|
559
|
+
"react/jsx-closing-tag-location": "error",
|
|
560
|
+
"react/jsx-curly-brace-presence": ["error", "always"],
|
|
561
|
+
"react/jsx-curly-newline": "error",
|
|
562
|
+
"react/jsx-curly-spacing": [
|
|
563
|
+
"error",
|
|
564
|
+
{
|
|
565
|
+
when: "never",
|
|
566
|
+
children: true,
|
|
567
|
+
},
|
|
568
|
+
],
|
|
569
|
+
"react/jsx-equals-spacing": "error",
|
|
570
|
+
"react/jsx-filename-extension": [
|
|
571
|
+
"error",
|
|
572
|
+
{
|
|
573
|
+
extensions: [".jsx", ".tsx"],
|
|
574
|
+
},
|
|
575
|
+
],
|
|
576
|
+
"react/jsx-first-prop-new-line": "error",
|
|
577
|
+
"react/jsx-fragments": ["error", "element"],
|
|
578
|
+
"react/jsx-handler-names": "error",
|
|
579
|
+
"react/jsx-indent": [
|
|
580
|
+
"error",
|
|
581
|
+
4,
|
|
582
|
+
{
|
|
583
|
+
checkAttributes: true,
|
|
584
|
+
indentLogicalExpressions: true,
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
"react/jsx-indent-props": ["error", 4],
|
|
588
|
+
"react/jsx-key": [
|
|
589
|
+
"error",
|
|
590
|
+
{
|
|
591
|
+
checkFragmentShorthand: true,
|
|
592
|
+
checkKeyMustBeforeSpread: true,
|
|
593
|
+
},
|
|
594
|
+
],
|
|
595
|
+
"react/jsx-max-depth": "off",
|
|
596
|
+
"react/jsx-max-props-per-line": "error",
|
|
597
|
+
"react/jsx-newline": "off",
|
|
598
|
+
"react/jsx-no-bind": ["error", { allowArrowFunctions: true }],
|
|
599
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
600
|
+
"react/jsx-no-constructed-context-values": "error",
|
|
601
|
+
"react/jsx-no-duplicate-props": "error",
|
|
602
|
+
"react/jsx-no-leaked-render": "error",
|
|
603
|
+
"react/jsx-no-literals": "off",
|
|
604
|
+
"react/jsx-no-script-url": "error",
|
|
605
|
+
"react/jsx-no-target-blank": [
|
|
606
|
+
"error",
|
|
607
|
+
{
|
|
608
|
+
allowReferrer: false,
|
|
609
|
+
enforceDynamicLinks: "always",
|
|
610
|
+
warnOnSpreadAttributes: true,
|
|
611
|
+
},
|
|
612
|
+
],
|
|
613
|
+
"react/jsx-no-undef": [
|
|
614
|
+
"error",
|
|
615
|
+
{
|
|
616
|
+
allowGlobals: false,
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
"react/jsx-no-useless-fragment": [
|
|
620
|
+
"error",
|
|
621
|
+
{
|
|
622
|
+
allowExpressions: true,
|
|
623
|
+
},
|
|
624
|
+
],
|
|
625
|
+
"react/jsx-one-expression-per-line": "error",
|
|
626
|
+
"react/jsx-pascal-case": "error",
|
|
627
|
+
"react/jsx-props-no-multi-spaces": "error",
|
|
628
|
+
"react/jsx-props-no-spreading": "off",
|
|
629
|
+
"react/jsx-sort-props": "off",
|
|
630
|
+
"react/jsx-tag-spacing": [
|
|
631
|
+
"error",
|
|
632
|
+
{
|
|
633
|
+
beforeClosing: "never",
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
"react/jsx-uses-react": "off",
|
|
637
|
+
"react/jsx-uses-vars": "error",
|
|
638
|
+
"react/jsx-wrap-multilines": [
|
|
639
|
+
"error",
|
|
640
|
+
{
|
|
641
|
+
declaration: "parens-new-line",
|
|
642
|
+
assignment: "parens-new-line",
|
|
643
|
+
return: "parens-new-line",
|
|
644
|
+
arrow: "parens-new-line",
|
|
645
|
+
},
|
|
646
|
+
],
|
|
647
|
+
"react/no-access-state-in-setstate": "error",
|
|
648
|
+
"react/no-adjacent-inline-elements": "error",
|
|
649
|
+
"react/no-array-index-key": "error",
|
|
650
|
+
"react/no-arrow-function-lifecycle": "error",
|
|
651
|
+
"react/no-children-prop": "error",
|
|
652
|
+
"react/no-danger": "error",
|
|
653
|
+
"react/no-danger-with-children": "error",
|
|
654
|
+
"react/no-deprecated": "error",
|
|
655
|
+
"react/no-did-mount-set-state": "error",
|
|
656
|
+
"react/no-did-update-set-state": "error",
|
|
657
|
+
"react/no-direct-mutation-state": "error",
|
|
658
|
+
"react/no-find-dom-node": "error",
|
|
659
|
+
"react/no-invalid-html-attribute": "error",
|
|
660
|
+
"react/no-is-mounted": "error",
|
|
661
|
+
"react/no-multi-comp": "off",
|
|
662
|
+
"react/no-namespace": "error",
|
|
663
|
+
"react/no-object-type-as-default-prop": "error",
|
|
664
|
+
"react/no-redundant-should-component-update": "error",
|
|
665
|
+
"react/no-render-return-value": "error",
|
|
666
|
+
"react/no-set-state": "off",
|
|
667
|
+
"react/no-string-refs": [
|
|
668
|
+
"error",
|
|
669
|
+
{
|
|
670
|
+
noTemplateLiterals: true,
|
|
671
|
+
},
|
|
672
|
+
],
|
|
673
|
+
"react/no-this-in-sfc": "error",
|
|
674
|
+
"react/no-typos": "error",
|
|
675
|
+
"react/no-unescaped-entities": "error",
|
|
676
|
+
"react/no-unknown-property": "error",
|
|
677
|
+
"react/no-unsafe": "error",
|
|
678
|
+
"react/no-unstable-nested-components": "error",
|
|
679
|
+
"react/no-unused-class-component-methods": "error",
|
|
680
|
+
"react/no-unused-prop-types": "error",
|
|
681
|
+
"react/no-unused-state": "error",
|
|
682
|
+
"react/no-will-update-set-state": "error",
|
|
683
|
+
"react/prefer-es6-class": ["error", "always"],
|
|
684
|
+
"react/prefer-exact-props": "off",
|
|
685
|
+
"react/prefer-read-only-props": "off",
|
|
686
|
+
"react/prefer-stateless-function": "error",
|
|
687
|
+
"react/prop-types": "off",
|
|
688
|
+
"react/react-in-jsx-scope": "off",
|
|
689
|
+
"react/require-default-props": "off",
|
|
690
|
+
"react/require-optimization": "off",
|
|
691
|
+
"react/require-render-return": "error",
|
|
692
|
+
"react/self-closing-comp": "error",
|
|
693
|
+
"react/sort-comp": [
|
|
694
|
+
"error",
|
|
695
|
+
{
|
|
696
|
+
order: [
|
|
697
|
+
"static-variables",
|
|
698
|
+
"instance-variables",
|
|
699
|
+
"static-methods",
|
|
700
|
+
"lifecycle",
|
|
701
|
+
"render",
|
|
702
|
+
"everything-else",
|
|
703
|
+
],
|
|
704
|
+
groups: {
|
|
705
|
+
render: ["render", "/^render.+$/"],
|
|
706
|
+
},
|
|
707
|
+
},
|
|
708
|
+
],
|
|
709
|
+
"react/sort-default-props": "off",
|
|
710
|
+
"react/sort-prop-types": [
|
|
711
|
+
"error",
|
|
712
|
+
{
|
|
713
|
+
callbacksLast: true,
|
|
714
|
+
ignoreCase: true,
|
|
715
|
+
requiredFirst: true,
|
|
716
|
+
sortShapeProp: true,
|
|
717
|
+
noSortAlphabetically: true,
|
|
718
|
+
},
|
|
719
|
+
],
|
|
720
|
+
"react/state-in-constructor": "error",
|
|
721
|
+
"react/static-property-placement": "off",
|
|
722
|
+
"react/style-prop-object": "error",
|
|
723
|
+
"react/void-dom-elements-no-children": "error",
|
|
706
724
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
725
|
+
// eslint-plugin-react-hooks
|
|
726
|
+
"react-hooks/rules-of-hooks": "error",
|
|
727
|
+
"react-hooks/exhaustive-deps": "error",
|
|
710
728
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
729
|
+
// eslint-plugin-unicorn
|
|
730
|
+
"unicorn/better-regex": "error",
|
|
731
|
+
"unicorn/catch-error-name": [
|
|
732
|
+
"error",
|
|
733
|
+
{
|
|
734
|
+
name: "ex",
|
|
735
|
+
ignore: ["^ex([A-Z0-9].*)?$"],
|
|
736
|
+
},
|
|
737
|
+
],
|
|
738
|
+
"unicorn/consistent-destructuring": "error",
|
|
739
|
+
"unicorn/consistent-function-scoping": [
|
|
740
|
+
"error",
|
|
741
|
+
{
|
|
742
|
+
checkArrowFunctions: false,
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
"unicorn/custom-error-definition": "off",
|
|
746
|
+
"unicorn/empty-brace-spaces": "off",
|
|
747
|
+
"unicorn/error-message": "error",
|
|
748
|
+
"unicorn/escape-case": "error",
|
|
749
|
+
"unicorn/expiring-todo-comments": "error",
|
|
750
|
+
"unicorn/explicit-length-check": "error",
|
|
751
|
+
"unicorn/filename-case": [
|
|
752
|
+
"error",
|
|
753
|
+
{
|
|
754
|
+
cases: {
|
|
755
|
+
camelCase: true,
|
|
756
|
+
pascalCase: true,
|
|
757
|
+
kebabCase: false,
|
|
758
|
+
snakeCase: false,
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
],
|
|
762
|
+
"unicorn/import-style": "error",
|
|
763
|
+
"unicorn/new-for-builtins": "error",
|
|
764
|
+
"unicorn/no-abusive-eslint-disable": "error",
|
|
765
|
+
"unicorn/no-array-callback-reference": "off",
|
|
766
|
+
"unicorn/no-array-for-each": "off",
|
|
767
|
+
"unicorn/no-array-method-this-argument": "error",
|
|
768
|
+
"unicorn/no-array-push-push": "error",
|
|
769
|
+
"unicorn/no-array-reduce": "off",
|
|
770
|
+
"unicorn/no-await-expression-member": "error",
|
|
771
|
+
"unicorn/no-console-spaces": "error",
|
|
772
|
+
"unicorn/no-document-cookie": "error",
|
|
773
|
+
"unicorn/no-empty-file": "error",
|
|
774
|
+
"unicorn/no-for-loop": "error",
|
|
775
|
+
"unicorn/no-hex-escape": "error",
|
|
776
|
+
"unicorn/no-instanceof-array": "error",
|
|
777
|
+
"unicorn/no-invalid-remove-event-listener": "error",
|
|
778
|
+
"unicorn/no-keyword-prefix": "off",
|
|
779
|
+
"unicorn/no-lonely-if": "error",
|
|
780
|
+
"unicorn/no-negated-condition": "error",
|
|
781
|
+
"unicorn/no-nested-ternary": "off",
|
|
782
|
+
"unicorn/no-new-array": "error",
|
|
783
|
+
"unicorn/no-new-buffer": "error",
|
|
784
|
+
"unicorn/no-null": "off",
|
|
785
|
+
"unicorn/no-object-as-default-parameter": "error",
|
|
786
|
+
"unicorn/no-process-exit": "error",
|
|
787
|
+
"unicorn/no-static-only-class": "error",
|
|
788
|
+
"unicorn/no-thenable": "error",
|
|
789
|
+
"unicorn/no-this-assignment": "error",
|
|
790
|
+
"unicorn/no-unnecessary-await": "error",
|
|
791
|
+
"unicorn/no-unreadable-array-destructuring": "error",
|
|
792
|
+
"unicorn/no-unreadable-iife": "error",
|
|
793
|
+
"unicorn/no-unused-properties": "error",
|
|
794
|
+
"unicorn/no-useless-fallback-in-spread": "error",
|
|
795
|
+
"unicorn/no-useless-length-check": "error",
|
|
796
|
+
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
797
|
+
"unicorn/no-useless-spread": "error",
|
|
798
|
+
"unicorn/no-useless-switch-case": "error",
|
|
799
|
+
"unicorn/no-useless-undefined": "error",
|
|
800
|
+
"unicorn/no-typeof-undefined": "error",
|
|
801
|
+
"unicorn/no-zero-fractions": "error",
|
|
802
|
+
"unicorn/number-literal-case": "error",
|
|
803
|
+
"unicorn/numeric-separators-style": "error",
|
|
804
|
+
"unicorn/prefer-add-event-listener": "error",
|
|
805
|
+
"unicorn/prefer-array-find": [
|
|
806
|
+
"error",
|
|
807
|
+
{
|
|
808
|
+
checkFromLast: true,
|
|
809
|
+
},
|
|
810
|
+
],
|
|
811
|
+
"unicorn/prefer-array-flat": "error",
|
|
812
|
+
"unicorn/prefer-array-flat-map": "error",
|
|
813
|
+
"unicorn/prefer-array-index-of": "error",
|
|
814
|
+
"unicorn/prefer-array-some": "error",
|
|
815
|
+
"unicorn/prefer-at": "error",
|
|
816
|
+
"unicorn/prefer-blob-reading-methods": "error",
|
|
817
|
+
"unicorn/prefer-code-point": "error",
|
|
818
|
+
"unicorn/prefer-date-now": "error",
|
|
819
|
+
"unicorn/prefer-default-parameters": "error",
|
|
820
|
+
"unicorn/prefer-dom-node-append": "error",
|
|
821
|
+
"unicorn/prefer-dom-node-dataset": "error",
|
|
822
|
+
"unicorn/prefer-dom-node-remove": "error",
|
|
823
|
+
"unicorn/prefer-dom-node-text-content": "error",
|
|
824
|
+
"unicorn/prefer-event-target": "off",
|
|
825
|
+
"unicorn/prefer-export-from": "off",
|
|
826
|
+
"unicorn/prefer-includes": "error",
|
|
827
|
+
"unicorn/prefer-json-parse-buffer": "error",
|
|
828
|
+
"unicorn/prefer-keyboard-event-key": "error",
|
|
829
|
+
"unicorn/prefer-logical-operator-over-ternary": "error",
|
|
830
|
+
"unicorn/prefer-math-trunc": "error",
|
|
831
|
+
"unicorn/prefer-modern-dom-apis": "error",
|
|
832
|
+
"unicorn/prefer-modern-math-apis": "error",
|
|
833
|
+
"unicorn/prefer-module": "off",
|
|
834
|
+
"unicorn/prefer-native-coercion-functions": "error",
|
|
835
|
+
"unicorn/prefer-negative-index": "error",
|
|
836
|
+
"unicorn/prefer-node-protocol": "error",
|
|
837
|
+
"unicorn/prefer-number-properties": "error",
|
|
838
|
+
"unicorn/prefer-object-from-entries": "error",
|
|
839
|
+
"unicorn/prefer-optional-catch-binding": "error",
|
|
840
|
+
"unicorn/prefer-prototype-methods": "error",
|
|
841
|
+
"unicorn/prefer-query-selector": "off",
|
|
842
|
+
"unicorn/prefer-reflect-apply": "error",
|
|
843
|
+
"unicorn/prefer-regexp-test": "error",
|
|
844
|
+
"unicorn/prefer-set-has": "error",
|
|
845
|
+
"unicorn/prefer-set-size": "error",
|
|
846
|
+
"unicorn/prefer-spread": "error",
|
|
825
847
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
848
|
+
"unicorn/prefer-string-replace-all": "error",
|
|
849
|
+
"unicorn/prefer-string-slice": "error",
|
|
850
|
+
"unicorn/prefer-string-starts-ends-with": "error",
|
|
851
|
+
"unicorn/prefer-string-trim-start-end": "error",
|
|
852
|
+
"unicorn/prefer-switch": "error",
|
|
831
853
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
854
|
+
// TODO: off until there is a solution to this: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1079
|
|
855
|
+
"unicorn/prefer-ternary": "off",
|
|
856
|
+
"unicorn/prefer-top-level-await": "off",
|
|
857
|
+
"unicorn/prefer-type-error": "error",
|
|
858
|
+
"unicorn/prevent-abbreviations": "off",
|
|
859
|
+
"unicorn/relative-url-style": "error",
|
|
860
|
+
"unicorn/require-array-join-separator": "error",
|
|
861
|
+
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
862
|
+
"unicorn/require-post-message-target-origin": "error",
|
|
863
|
+
"unicorn/string-content": "off",
|
|
864
|
+
"unicorn/switch-case-braces": ["error", "avoid"],
|
|
865
|
+
"unicorn/template-indent": "off",
|
|
866
|
+
"unicorn/text-encoding-identifier-case": "error",
|
|
867
|
+
"unicorn/throw-new-error": "error",
|
|
846
868
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
869
|
+
// eslint-plugin-import
|
|
870
|
+
"import/export": "off",
|
|
871
|
+
"import/no-deprecated": "off",
|
|
872
|
+
"import/no-empty-named-blocks": "error",
|
|
873
|
+
"import/no-extraneous-dependencies": "off",
|
|
874
|
+
"import/no-mutable-exports": "error",
|
|
875
|
+
"import/no-named-as-default": "error",
|
|
876
|
+
"import/no-named-as-default-member": "off",
|
|
877
|
+
"import/no-unused-modules": "off",
|
|
878
|
+
"import/no-amd": "off",
|
|
879
|
+
"import/no-commonjs": "off",
|
|
880
|
+
"import/no-import-module-exports": "off",
|
|
881
|
+
"import/no-nodejs-modules": "off",
|
|
882
|
+
"import/unambiguous": "off",
|
|
883
|
+
"import/default": "off",
|
|
884
|
+
"import/named": "off",
|
|
885
|
+
"import/namespace": "off",
|
|
886
|
+
"import/no-absolute-path": "error",
|
|
887
|
+
"import/no-cycle": [
|
|
888
|
+
"error",
|
|
889
|
+
{
|
|
890
|
+
ignoreExternal: true,
|
|
891
|
+
},
|
|
892
|
+
],
|
|
893
|
+
"import/no-dynamic-require": "off",
|
|
894
|
+
"import/no-internal-modules": "off",
|
|
895
|
+
"import/no-relative-packages": "off",
|
|
896
|
+
"import/no-relative-parent-imports": "off",
|
|
897
|
+
"import/no-restricted-paths": "off",
|
|
898
|
+
"import/no-self-import": "error",
|
|
899
|
+
"import/no-unresolved": "off",
|
|
900
|
+
"import/no-useless-path-segments": [
|
|
901
|
+
"error",
|
|
902
|
+
{
|
|
903
|
+
noUselessIndex: true,
|
|
904
|
+
},
|
|
905
|
+
],
|
|
906
|
+
"import/no-webpack-loader-syntax": "error",
|
|
907
|
+
"import/consistent-type-specifier-style": "off",
|
|
908
|
+
"import/dynamic-import-chunkname": "off",
|
|
909
|
+
"import/exports-last": "error",
|
|
910
|
+
"import/extensions": "off",
|
|
911
|
+
"import/first": "error",
|
|
912
|
+
"import/group-exports": "error",
|
|
913
|
+
"import/max-dependencies": "off",
|
|
914
|
+
"import/newline-after-import": "off",
|
|
915
|
+
"import/no-anonymous-default-export": "error",
|
|
916
|
+
"import/no-default-export": "off",
|
|
917
|
+
"import/no-duplicates": "error",
|
|
918
|
+
"import/no-named-default": "off",
|
|
919
|
+
"import/no-named-export": "off",
|
|
920
|
+
"import/no-namespace": "off",
|
|
921
|
+
"import/no-unassigned-import": "off",
|
|
922
|
+
"import/order": "off",
|
|
923
|
+
"import/prefer-default-export": "off",
|
|
902
924
|
};
|
|
903
925
|
|
|
904
926
|
const overrides = [
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
927
|
+
{
|
|
928
|
+
files: ["*.ts", "*.tsx"],
|
|
929
|
+
parser: "@typescript-eslint/parser",
|
|
930
|
+
parserOptions: {
|
|
931
|
+
...parserOptions,
|
|
932
|
+
sourceType: "module",
|
|
933
|
+
project: path.join(".", "tsconfig.json"),
|
|
934
|
+
},
|
|
935
|
+
globals: {
|
|
936
|
+
...globals,
|
|
937
|
+
NodeJS: true,
|
|
938
|
+
},
|
|
939
|
+
plugins: [
|
|
940
|
+
...plugins,
|
|
941
|
+
"@typescript-eslint",
|
|
942
|
+
"typescript-heck",
|
|
943
|
+
"deprecation",
|
|
944
|
+
],
|
|
945
|
+
rules: {
|
|
946
|
+
// Typescript
|
|
947
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
948
|
+
"@typescript-eslint/array-type": [
|
|
949
|
+
"error",
|
|
950
|
+
{
|
|
951
|
+
default: "array",
|
|
952
|
+
},
|
|
953
|
+
],
|
|
954
|
+
"@typescript-eslint/await-thenable": "error",
|
|
955
|
+
"@typescript-eslint/ban-ts-comment": [
|
|
956
|
+
"error",
|
|
957
|
+
{
|
|
958
|
+
"ts-expect-error": true,
|
|
959
|
+
"ts-ignore": true,
|
|
960
|
+
"ts-nocheck": true,
|
|
961
|
+
"ts-check": false,
|
|
962
|
+
},
|
|
963
|
+
],
|
|
964
|
+
"@typescript-eslint/ban-tslint-comment": "error",
|
|
965
|
+
"@typescript-eslint/ban-types": "error",
|
|
966
|
+
"@typescript-eslint/class-literal-property-style": "error",
|
|
967
|
+
"@typescript-eslint/consistent-indexed-object-style": "error",
|
|
968
|
+
"@typescript-eslint/consistent-type-assertions": "error",
|
|
969
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
970
|
+
"@typescript-eslint/consistent-type-imports": [
|
|
971
|
+
"error",
|
|
972
|
+
{
|
|
973
|
+
prefer: "no-type-imports",
|
|
974
|
+
disallowTypeAnnotations: false,
|
|
975
|
+
},
|
|
976
|
+
],
|
|
977
|
+
"@typescript-eslint/explicit-function-return-type": [
|
|
978
|
+
"error",
|
|
979
|
+
{
|
|
980
|
+
allowExpressions: true,
|
|
981
|
+
allowTypedFunctionExpressions: true,
|
|
982
|
+
allowHigherOrderFunctions: true,
|
|
983
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
984
|
+
allowConciseArrowFunctionExpressionsStartingWithVoid: false,
|
|
985
|
+
},
|
|
986
|
+
],
|
|
987
|
+
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
988
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
989
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
990
|
+
"error",
|
|
991
|
+
{
|
|
992
|
+
multiline: {
|
|
993
|
+
delimiter: "comma",
|
|
994
|
+
requireLast: true,
|
|
995
|
+
},
|
|
996
|
+
singleline: {
|
|
997
|
+
delimiter: "comma",
|
|
998
|
+
requireLast: false,
|
|
999
|
+
},
|
|
1000
|
+
multilineDetection: "brackets",
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
"@typescript-eslint/member-ordering": "off",
|
|
1004
|
+
"@typescript-eslint/method-signature-style": "error",
|
|
1005
|
+
camelcase: "off",
|
|
1006
|
+
"@typescript-eslint/naming-convention": [
|
|
1007
|
+
"error",
|
|
1008
|
+
{
|
|
1009
|
+
selector: ["variableLike", "memberLike"],
|
|
1010
|
+
format: ["strictCamelCase", "StrictPascalCase"],
|
|
1011
|
+
filter: {
|
|
1012
|
+
regex: "^__html$",
|
|
1013
|
+
match: false,
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
selector: ["parameter"],
|
|
1018
|
+
modifiers: ["unused"],
|
|
1019
|
+
format: ["strictCamelCase"],
|
|
1020
|
+
leadingUnderscore: "require",
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
selector: ["typeLike"],
|
|
1024
|
+
format: ["StrictPascalCase"],
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
selector: ["typeParameter"],
|
|
1028
|
+
format: ["StrictPascalCase"],
|
|
1029
|
+
prefix: ["T"],
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
selector: "variable",
|
|
1033
|
+
modifiers: ["destructured"],
|
|
1034
|
+
format: null,
|
|
1035
|
+
},
|
|
1036
|
+
],
|
|
1037
|
+
"@typescript-eslint/no-base-to-string": "error",
|
|
1038
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
1039
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
1040
|
+
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
1041
|
+
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
|
1042
|
+
"@typescript-eslint/no-dynamic-delete": "error",
|
|
1043
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
1044
|
+
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
1045
|
+
"@typescript-eslint/no-extraneous-class": "error",
|
|
1046
|
+
"@typescript-eslint/no-floating-promises": [
|
|
1047
|
+
"error",
|
|
1048
|
+
{
|
|
1049
|
+
ignoreVoid: false,
|
|
1050
|
+
},
|
|
1051
|
+
],
|
|
1052
|
+
"@typescript-eslint/no-for-in-array": "error",
|
|
1053
|
+
"@typescript-eslint/no-import-type-side-effects": "off",
|
|
1054
|
+
"@typescript-eslint/no-inferrable-types": "error",
|
|
1055
|
+
"@typescript-eslint/no-invalid-void-type": [
|
|
1056
|
+
"error",
|
|
1057
|
+
{
|
|
1058
|
+
allowAsThisParameter: true,
|
|
1059
|
+
},
|
|
1060
|
+
],
|
|
1061
|
+
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
1062
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
1063
|
+
"@typescript-eslint/no-misused-promises": "error",
|
|
1064
|
+
"@typescript-eslint/no-mixed-enums": "off",
|
|
1065
|
+
"@typescript-eslint/no-namespace": "error",
|
|
1066
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
1067
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
1068
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
|
1069
|
+
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
1070
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
1071
|
+
"@typescript-eslint/no-this-alias": "error",
|
|
1072
|
+
"@typescript-eslint/no-type-alias": "off",
|
|
1073
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
1074
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
1075
|
+
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
1076
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
1077
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
1078
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
1079
|
+
"@typescript-eslint/no-unsafe-argument": "error",
|
|
1080
|
+
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
1081
|
+
"@typescript-eslint/no-unsafe-call": "error",
|
|
1082
|
+
"@typescript-eslint/no-unsafe-declaration-merging": "error",
|
|
1083
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
1084
|
+
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
1085
|
+
"@typescript-eslint/no-unsafe-return": "error",
|
|
1086
|
+
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
|
1087
|
+
"@typescript-eslint/no-useless-empty-export": "error",
|
|
1088
|
+
"@typescript-eslint/no-useless-template-literals": "error",
|
|
1089
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
1090
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
1091
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
1092
|
+
"@typescript-eslint/prefer-as-const": "error",
|
|
1093
|
+
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
1094
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
1095
|
+
"@typescript-eslint/prefer-function-type": "off",
|
|
1096
|
+
"@typescript-eslint/prefer-includes": "error",
|
|
1097
|
+
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
1098
|
+
"@typescript-eslint/prefer-namespace-keyword": "off",
|
|
1099
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
1100
|
+
"error",
|
|
1101
|
+
{
|
|
1102
|
+
ignoreConditionalTests: true,
|
|
1103
|
+
ignoreMixedLogicalExpressions: true,
|
|
1104
|
+
},
|
|
1105
|
+
],
|
|
1106
|
+
"@typescript-eslint/prefer-optional-chain": "error",
|
|
1107
|
+
"@typescript-eslint/prefer-readonly": [
|
|
1108
|
+
"error",
|
|
1109
|
+
{
|
|
1110
|
+
onlyInlineLambdas: true,
|
|
1111
|
+
},
|
|
1112
|
+
],
|
|
1113
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
1114
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
1115
|
+
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
1116
|
+
"@typescript-eslint/prefer-return-this-type": "error",
|
|
1117
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
1118
|
+
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
1119
|
+
"@typescript-eslint/promise-function-async": "error",
|
|
1120
|
+
"@typescript-eslint/require-array-sort-compare": "error",
|
|
1121
|
+
"@typescript-eslint/restrict-plus-operands": "error",
|
|
1122
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
1123
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
1124
|
+
"@typescript-eslint/switch-exhaustiveness-check": [
|
|
1125
|
+
"error",
|
|
1126
|
+
{
|
|
1127
|
+
allowDefaultCaseForExhaustiveSwitch: false,
|
|
1128
|
+
requireDefaultForNonUnion: true,
|
|
1129
|
+
},
|
|
1130
|
+
],
|
|
1131
|
+
"@typescript-eslint/triple-slash-reference": "error",
|
|
1132
|
+
"@typescript-eslint/type-annotation-spacing": "error",
|
|
1133
|
+
"@typescript-eslint/typedef": "off",
|
|
1134
|
+
"@typescript-eslint/unbound-method": [
|
|
1135
|
+
"error",
|
|
1136
|
+
{
|
|
1137
|
+
ignoreStatic: true,
|
|
1138
|
+
},
|
|
1139
|
+
],
|
|
1140
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
1105
1141
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1142
|
+
// Extension rules
|
|
1143
|
+
"block-spacing": "off",
|
|
1144
|
+
"@typescript-eslint/block-spacing": "error",
|
|
1145
|
+
"brace-style": "off",
|
|
1146
|
+
"@typescript-eslint/brace-style": "error",
|
|
1147
|
+
"class-methods-use-this": "off",
|
|
1148
|
+
"@typescript-eslint/class-methods-use-this": "error",
|
|
1149
|
+
"comma-dangle": "off",
|
|
1150
|
+
"@typescript-eslint/comma-dangle": ["error", "always-multiline"],
|
|
1151
|
+
"comma-spacing": "off",
|
|
1152
|
+
"@typescript-eslint/comma-spacing": "error",
|
|
1153
|
+
"default-param-last": "off",
|
|
1154
|
+
"@typescript-eslint/default-param-last": "error",
|
|
1155
|
+
"dot-notation": "off",
|
|
1156
|
+
"@typescript-eslint/dot-notation": "error",
|
|
1157
|
+
"func-call-spacing": "off",
|
|
1158
|
+
"@typescript-eslint/func-call-spacing": "error",
|
|
1159
|
+
indent: "off",
|
|
1160
|
+
"@typescript-eslint/indent": [
|
|
1161
|
+
"error",
|
|
1162
|
+
4,
|
|
1163
|
+
{
|
|
1164
|
+
SwitchCase: 1,
|
|
1165
|
+
},
|
|
1166
|
+
],
|
|
1167
|
+
"init-declarations": "off",
|
|
1168
|
+
"@typescript-eslint/init-declarations": "off",
|
|
1169
|
+
"key-spacing": "off",
|
|
1170
|
+
"@typescript-eslint/key-spacing": "error",
|
|
1171
|
+
"keyword-spacing": "off",
|
|
1172
|
+
"@typescript-eslint/keyword-spacing": "error",
|
|
1173
|
+
"lines-between-class-members": "off",
|
|
1174
|
+
"@typescript-eslint/lines-between-class-members": [
|
|
1175
|
+
"error",
|
|
1176
|
+
"always",
|
|
1177
|
+
{
|
|
1178
|
+
exceptAfterSingleLine: true,
|
|
1179
|
+
exceptAfterOverload: false,
|
|
1180
|
+
},
|
|
1181
|
+
],
|
|
1182
|
+
"no-array-constructor": "off",
|
|
1183
|
+
"@typescript-eslint/no-array-constructor": "error",
|
|
1184
|
+
"no-dupe-class-members": "off",
|
|
1185
|
+
"@typescript-eslint/no-dupe-class-members": "off",
|
|
1186
|
+
"no-empty-function": "off",
|
|
1187
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
1188
|
+
"no-extra-parens": "off",
|
|
1189
|
+
"@typescript-eslint/no-extra-parens": [
|
|
1190
|
+
"error",
|
|
1191
|
+
"all",
|
|
1192
|
+
{
|
|
1193
|
+
conditionalAssign: false,
|
|
1194
|
+
nestedBinaryExpressions: false,
|
|
1195
|
+
enforceForArrowConditionals: false,
|
|
1196
|
+
ignoreJSX: "multi-line",
|
|
1197
|
+
},
|
|
1198
|
+
],
|
|
1199
|
+
"no-extra-semi": "off",
|
|
1200
|
+
"@typescript-eslint/no-extra-semi": "error",
|
|
1201
|
+
"no-implied-eval": "off",
|
|
1202
|
+
"@typescript-eslint/no-implied-eval": "error",
|
|
1203
|
+
"no-invalid-this": "off",
|
|
1204
|
+
"@typescript-eslint/no-invalid-this": "error",
|
|
1205
|
+
"no-loop-func": "off",
|
|
1206
|
+
"@typescript-eslint/no-loop-func": "error",
|
|
1207
|
+
"no-loss-of-precision": "off",
|
|
1208
|
+
"@typescript-eslint/no-loss-of-precision": "error",
|
|
1209
|
+
"no-magic-numbers": "off",
|
|
1210
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
1211
|
+
"no-redeclare": "off",
|
|
1212
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
1213
|
+
"no-restricted-imports": "off",
|
|
1214
|
+
"@typescript-eslint/no-restricted-imports": "off",
|
|
1215
|
+
"no-shadow": "off",
|
|
1216
|
+
"@typescript-eslint/no-shadow": "error",
|
|
1217
|
+
"no-throw-literal": "off",
|
|
1218
|
+
"@typescript-eslint/no-throw-literal": [
|
|
1219
|
+
"error",
|
|
1220
|
+
{
|
|
1221
|
+
allowThrowingAny: false,
|
|
1222
|
+
allowThrowingUnknown: false,
|
|
1223
|
+
},
|
|
1224
|
+
],
|
|
1225
|
+
"no-unused-expressions": "off",
|
|
1226
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
1227
|
+
"no-unused-vars": "off",
|
|
1228
|
+
"@typescript-eslint/no-unused-vars": [
|
|
1229
|
+
"error",
|
|
1230
|
+
{
|
|
1231
|
+
args: "after-used",
|
|
1232
|
+
caughtErrors: "all",
|
|
1233
|
+
},
|
|
1234
|
+
],
|
|
1235
|
+
"no-use-before-define": "off",
|
|
1236
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
1237
|
+
"no-useless-constructor": "off",
|
|
1238
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
1239
|
+
"prefer-destructuring": "off",
|
|
1240
|
+
"@typescript-eslint/prefer-destructuring": [
|
|
1241
|
+
"error",
|
|
1242
|
+
{
|
|
1243
|
+
VariableDeclarator: {
|
|
1244
|
+
array: false,
|
|
1245
|
+
object: true,
|
|
1246
|
+
},
|
|
1247
|
+
AssignmentExpression: {
|
|
1248
|
+
array: false,
|
|
1249
|
+
object: false,
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
],
|
|
1253
|
+
"object-curly-spacing": "off",
|
|
1254
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
|
1255
|
+
"padding-line-between-statements": "off",
|
|
1256
|
+
"@typescript-eslint/padding-line-between-statements": [
|
|
1257
|
+
"error",
|
|
1258
|
+
// return
|
|
1259
|
+
{
|
|
1260
|
+
blankLine: "always",
|
|
1261
|
+
prev: "*",
|
|
1262
|
+
next: "return",
|
|
1263
|
+
},
|
|
1264
|
+
// const, let, var
|
|
1265
|
+
{
|
|
1266
|
+
blankLine: "always",
|
|
1267
|
+
prev: ["const", "let", "var"],
|
|
1268
|
+
next: "*",
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
blankLine: "always",
|
|
1272
|
+
prev: "*",
|
|
1273
|
+
next: ["const", "let", "var"],
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
blankLine: "any",
|
|
1277
|
+
prev: ["const", "let", "var"],
|
|
1278
|
+
next: ["const", "let", "var"],
|
|
1279
|
+
},
|
|
1280
|
+
// import
|
|
1281
|
+
{
|
|
1282
|
+
blankLine: "always",
|
|
1283
|
+
prev: "import",
|
|
1284
|
+
next: "*",
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
blankLine: "never",
|
|
1288
|
+
prev: "import",
|
|
1289
|
+
next: "import",
|
|
1290
|
+
},
|
|
1291
|
+
// export
|
|
1292
|
+
{
|
|
1293
|
+
blankLine: "always",
|
|
1294
|
+
prev: "*",
|
|
1295
|
+
next: "export",
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
blankLine: "any",
|
|
1299
|
+
prev: "export",
|
|
1300
|
+
next: "export",
|
|
1301
|
+
},
|
|
1302
|
+
// function
|
|
1303
|
+
{
|
|
1304
|
+
blankLine: "always",
|
|
1305
|
+
prev: "*",
|
|
1306
|
+
next: "function",
|
|
1307
|
+
},
|
|
1308
|
+
// interface
|
|
1309
|
+
{
|
|
1310
|
+
blankLine: "always",
|
|
1311
|
+
prev: "*",
|
|
1312
|
+
next: "interface",
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
blankLine: "always",
|
|
1316
|
+
prev: "interface",
|
|
1317
|
+
next: "*",
|
|
1318
|
+
},
|
|
1319
|
+
// type
|
|
1320
|
+
{
|
|
1321
|
+
blankLine: "always",
|
|
1322
|
+
prev: "*",
|
|
1323
|
+
next: "type",
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
blankLine: "any",
|
|
1327
|
+
prev: "type",
|
|
1328
|
+
next: "type",
|
|
1329
|
+
},
|
|
1330
|
+
],
|
|
1331
|
+
quotes: "off",
|
|
1332
|
+
"@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
|
|
1333
|
+
"require-await": "off",
|
|
1334
|
+
"@typescript-eslint/require-await": "off",
|
|
1335
|
+
"@typescript-eslint/return-await": "off",
|
|
1336
|
+
semi: "off",
|
|
1337
|
+
"@typescript-eslint/semi": [
|
|
1338
|
+
"error",
|
|
1339
|
+
"always",
|
|
1340
|
+
{
|
|
1341
|
+
omitLastInOneLineBlock: false,
|
|
1342
|
+
},
|
|
1343
|
+
],
|
|
1344
|
+
"space-before-blocks": "off",
|
|
1345
|
+
"@typescript-eslint/space-before-blocks": "error",
|
|
1346
|
+
"space-before-function-paren": "off",
|
|
1347
|
+
"@typescript-eslint/space-before-function-paren": "error",
|
|
1348
|
+
"space-infix-ops": "off",
|
|
1349
|
+
"@typescript-eslint/space-infix-ops": "error",
|
|
1285
1350
|
|
|
1286
|
-
|
|
1287
|
-
|
|
1351
|
+
// Deprecation
|
|
1352
|
+
"deprecation/deprecation": "warn",
|
|
1288
1353
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1354
|
+
// Typescript handles itself
|
|
1355
|
+
"consistent-return": "off",
|
|
1356
|
+
"constructor-super": "off",
|
|
1357
|
+
"getter-return": "off",
|
|
1358
|
+
"no-class-assign": "off",
|
|
1359
|
+
"no-const-assign": "off",
|
|
1360
|
+
"no-delete-var": "off",
|
|
1361
|
+
"no-dupe-args": "off",
|
|
1362
|
+
"no-dupe-keys": "off",
|
|
1363
|
+
"no-func-assign": "off",
|
|
1364
|
+
"no-import-assign": "off",
|
|
1365
|
+
"no-new-symbol": "off",
|
|
1366
|
+
"no-nonoctal-decimal-escape": "off",
|
|
1367
|
+
"no-obj-calls": "off",
|
|
1368
|
+
"no-octal-escape": "off",
|
|
1369
|
+
"no-setter-return": "off",
|
|
1370
|
+
"no-shadow-restricted-names": "off",
|
|
1371
|
+
"no-undef": "off",
|
|
1372
|
+
"no-undefined": "off",
|
|
1373
|
+
"no-unexpected-multiline": "off",
|
|
1374
|
+
"no-unsafe-negation": "off",
|
|
1375
|
+
"no-with": "off",
|
|
1376
|
+
"valid-typeof": "off",
|
|
1312
1377
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1378
|
+
// typescript-heck
|
|
1379
|
+
"typescript-heck/array-type-spacing": [
|
|
1380
|
+
"error",
|
|
1381
|
+
"always",
|
|
1382
|
+
{ betweenDimensions: "never" },
|
|
1383
|
+
],
|
|
1384
|
+
"typescript-heck/type-parameter-spacing": ["error", "never"],
|
|
1316
1385
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1386
|
+
// React
|
|
1387
|
+
// If you are working in a typed-codebase which encourages you to always use boolean conditions, this rule can be disabled.
|
|
1388
|
+
"react/jsx-no-leaked-render": "off",
|
|
1389
|
+
},
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
files: [
|
|
1393
|
+
"*.spec.ts",
|
|
1394
|
+
"*.spec.tsx",
|
|
1395
|
+
"*.test.ts",
|
|
1396
|
+
"*.test.tsx",
|
|
1397
|
+
"*.spec.js",
|
|
1398
|
+
"*.spec.jsx",
|
|
1399
|
+
"*.test.js",
|
|
1400
|
+
"*.test.jsx",
|
|
1401
|
+
],
|
|
1402
|
+
plugins: ["jest", "testing-library"],
|
|
1403
|
+
rules: {
|
|
1404
|
+
// eslint-plugin-jest
|
|
1405
|
+
"jest/consistent-test-it": "error",
|
|
1406
|
+
"jest/expect-expect": [
|
|
1407
|
+
"error",
|
|
1408
|
+
{
|
|
1409
|
+
assertFunctionNames: ["expect*"],
|
|
1410
|
+
},
|
|
1411
|
+
],
|
|
1412
|
+
"jest/max-expects": "off",
|
|
1413
|
+
"jest/max-nested-describe": "off",
|
|
1414
|
+
"jest/no-alias-methods": "error",
|
|
1415
|
+
"jest/no-commented-out-tests": "error",
|
|
1416
|
+
"jest/no-conditional-expect": "error",
|
|
1417
|
+
"jest/no-conditional-in-test": "error",
|
|
1418
|
+
"jest/no-confusing-set-timeout": "error",
|
|
1419
|
+
"jest/no-deprecated-functions": "error",
|
|
1420
|
+
"jest/no-disabled-tests": "warn",
|
|
1421
|
+
"jest/no-done-callback": "error",
|
|
1422
|
+
"jest/no-duplicate-hooks": "error",
|
|
1423
|
+
"jest/no-export": "error",
|
|
1424
|
+
"jest/no-focused-tests": "warn",
|
|
1425
|
+
"jest/no-hooks": "off",
|
|
1426
|
+
"jest/no-identical-title": "error",
|
|
1427
|
+
"jest/no-interpolation-in-snapshots": "error",
|
|
1428
|
+
"jest/no-jasmine-globals": "error",
|
|
1429
|
+
"jest/no-large-snapshots": "off",
|
|
1430
|
+
"jest/no-mocks-import": "error",
|
|
1431
|
+
"jest/no-restricted-matchers": "off",
|
|
1432
|
+
"jest/no-standalone-expect": "error",
|
|
1433
|
+
"jest/no-test-prefixes": "error",
|
|
1434
|
+
"jest/no-test-return-statement": "error",
|
|
1435
|
+
"jest/prefer-called-with": "error",
|
|
1436
|
+
"jest/prefer-comparison-matcher": "error",
|
|
1437
|
+
"jest/prefer-each": "error",
|
|
1438
|
+
"jest/prefer-equality-matcher": "error",
|
|
1439
|
+
"jest/prefer-expect-assertions": "off",
|
|
1440
|
+
"jest/prefer-expect-resolves": "error",
|
|
1441
|
+
"jest/prefer-hooks-on-top": "error",
|
|
1442
|
+
"jest/prefer-lowercase-title": [
|
|
1443
|
+
"error",
|
|
1444
|
+
{
|
|
1445
|
+
ignore: ["describe"],
|
|
1446
|
+
},
|
|
1447
|
+
],
|
|
1448
|
+
"jest/prefer-mock-promise-shorthand": "error",
|
|
1449
|
+
"jest/prefer-snapshot-hint": "error",
|
|
1450
|
+
"jest/prefer-spy-on": "error",
|
|
1451
|
+
"jest/prefer-strict-equal": "error",
|
|
1452
|
+
"jest/prefer-to-be": "error",
|
|
1453
|
+
"jest/prefer-to-contain": "error",
|
|
1454
|
+
"jest/prefer-to-have-length": "error",
|
|
1455
|
+
"jest/prefer-todo": "warn",
|
|
1456
|
+
"jest/require-hook": "error",
|
|
1457
|
+
"jest/require-to-throw-message": "error",
|
|
1458
|
+
"jest/require-top-level-describe": "error",
|
|
1459
|
+
"jest/valid-describe-callback": "error",
|
|
1460
|
+
"jest/valid-expect": "error",
|
|
1461
|
+
"jest/valid-expect-in-promise": "error",
|
|
1462
|
+
"jest/valid-title": "error",
|
|
1463
|
+
"@typescript-eslint/unbound-method": "off",
|
|
1464
|
+
"jest/unbound-method": "error",
|
|
1385
1465
|
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1466
|
+
// plugin-testing-library
|
|
1467
|
+
"testing-library/await-async-events": "error",
|
|
1468
|
+
"testing-library/await-async-queries": "error",
|
|
1469
|
+
"testing-library/await-async-utils": "error",
|
|
1470
|
+
"testing-library/consistent-data-testid": "off",
|
|
1471
|
+
"testing-library/no-await-sync-events": "off",
|
|
1472
|
+
"testing-library/no-await-sync-queries": "off",
|
|
1473
|
+
"testing-library/no-container": "error",
|
|
1474
|
+
"testing-library/no-debugging-utils": "error",
|
|
1475
|
+
"testing-library/no-dom-import": ["error", "react"],
|
|
1476
|
+
"testing-library/no-global-regexp-flag-in-query": "error",
|
|
1477
|
+
"testing-library/no-manual-cleanup": "error",
|
|
1478
|
+
"testing-library/no-node-access": "error",
|
|
1479
|
+
"testing-library/no-promise-in-fire-event": "off",
|
|
1480
|
+
"testing-library/no-render-in-lifecycle": "error",
|
|
1481
|
+
"testing-library/no-unnecessary-act": "error",
|
|
1482
|
+
"testing-library/no-wait-for-multiple-assertions": "error",
|
|
1483
|
+
"testing-library/no-wait-for-side-effects": "error",
|
|
1484
|
+
"testing-library/no-wait-for-snapshot": "error",
|
|
1485
|
+
"testing-library/prefer-explicit-assert": "error",
|
|
1486
|
+
"testing-library/prefer-implicit-assert": "off",
|
|
1487
|
+
"testing-library/prefer-find-by": "error",
|
|
1488
|
+
"testing-library/prefer-presence-queries": "error",
|
|
1489
|
+
"testing-library/prefer-query-by-disappearance": "error",
|
|
1490
|
+
"testing-library/prefer-query-matchers": "off",
|
|
1491
|
+
"testing-library/prefer-screen-queries": "error",
|
|
1492
|
+
"testing-library/prefer-user-event": "error",
|
|
1493
|
+
"testing-library/render-result-naming-convention": "off",
|
|
1494
|
+
},
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
files: ["*.spec.ts", "*.spec.tsx", "*.test.ts", "*.test.tsx"],
|
|
1498
|
+
plugins: ["jest"],
|
|
1499
|
+
rules: {
|
|
1500
|
+
// eslint-plugin-jest
|
|
1501
|
+
"jest/no-untyped-mock-factory": "error",
|
|
1502
|
+
},
|
|
1503
|
+
},
|
|
1424
1504
|
];
|
|
1425
1505
|
|
|
1426
1506
|
module.exports = {
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1507
|
+
extends: extendConfigs,
|
|
1508
|
+
parserOptions,
|
|
1509
|
+
env,
|
|
1510
|
+
globals,
|
|
1511
|
+
plugins,
|
|
1512
|
+
settings,
|
|
1513
|
+
rules,
|
|
1514
|
+
overrides,
|
|
1435
1515
|
|
|
1436
|
-
|
|
1437
|
-
};
|
|
1516
|
+
reportUnusedDisableDirectives: true,
|
|
1517
|
+
};
|