@pplancq/eslint-config 6.1.4 → 6.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/CHANGELOG.md +31 -0
- package/README.md +17 -1
- package/main.js +81 -25
- package/package.json +14 -11
- package/rules/base.js +2 -2
- package/rules/import.js +269 -262
- package/rules/playwright.js +3 -2
- package/rules/prettier.js +2 -2
- package/rules/react-jsx-a11y.js +216 -218
- package/rules/react.js +604 -591
- package/rules/typescript.js +554 -548
- package/rules/utils.js +63 -0
- package/rules/vitest.js +176 -168
package/rules/typescript.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/* eslint-disable import/
|
|
1
|
+
/* eslint-disable import/extensions */
|
|
2
2
|
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
3
3
|
import typescriptEslintParser from "@typescript-eslint/parser";
|
|
4
|
+
import { prefix } from "./utils.js";
|
|
4
5
|
|
|
5
|
-
export const typescriptRules = {
|
|
6
|
+
export const typescriptRules = ({ files, import: importNs = "import-x" } = {}) => ({
|
|
6
7
|
plugins: {
|
|
7
8
|
"@typescript-eslint": typescriptEslintPlugin,
|
|
8
9
|
},
|
|
@@ -12,555 +13,560 @@ export const typescriptRules = {
|
|
|
12
13
|
parser: typescriptEslintParser,
|
|
13
14
|
},
|
|
14
15
|
settings: {
|
|
15
|
-
"import/resolver": {
|
|
16
|
+
"import-x/resolver": {
|
|
16
17
|
typescript: true,
|
|
17
18
|
node: {
|
|
18
19
|
extensions: [".js", ".ts"],
|
|
19
20
|
},
|
|
20
21
|
},
|
|
21
22
|
},
|
|
22
|
-
rules:
|
|
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
|
-
|
|
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
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
|
-
|
|
439
|
-
|
|
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
|
-
|
|
508
|
-
|
|
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
|
-
}
|
|
23
|
+
rules: prefix(
|
|
24
|
+
{
|
|
25
|
+
// disable eslint default rule for ts
|
|
26
|
+
"constructor-super": "off", // ts(2335) & ts(2377)
|
|
27
|
+
"getter-return": "off", // ts(2378)
|
|
28
|
+
"no-class-assign": "off", // ts(2629)
|
|
29
|
+
"no-const-assign": "off", // ts(2588)
|
|
30
|
+
"no-dupe-args": "off", // ts(2300)
|
|
31
|
+
"no-dupe-class-members": "off", // ts(2393) & ts(2300)
|
|
32
|
+
"no-dupe-keys": "off", // ts(1117)
|
|
33
|
+
"no-func-assign": "off", // ts(2630)
|
|
34
|
+
"no-import-assign": "off", // ts(2632) & ts(2540)
|
|
35
|
+
"no-new-symbol": "off", // ts(7009)
|
|
36
|
+
"no-new-native-nonconstructor": "off", // ts(7009)
|
|
37
|
+
"no-obj-calls": "off", // ts(2349)
|
|
38
|
+
"no-setter-return": "off", // ts(2408)
|
|
39
|
+
"no-this-before-super": "off", // ts(2376) & ts(17009)
|
|
40
|
+
"no-undef": "off", // ts(2304) & ts(2552)
|
|
41
|
+
"no-unreachable": "off", // ts(7027)
|
|
42
|
+
"no-unsafe-negation": "off", // ts(2365) & ts(2322) & ts(2358)
|
|
43
|
+
"no-var": "error", // ts transpiles let/const to var, so no need for vars any more
|
|
44
|
+
|
|
45
|
+
// eslint-plugin-import-x https://github.com/un-ts/eslint-plugin-import-x
|
|
46
|
+
|
|
47
|
+
// import-x/extensions
|
|
48
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
49
|
+
"import-x/extensions": [
|
|
50
|
+
"error",
|
|
51
|
+
"ignorePackages",
|
|
52
|
+
{
|
|
53
|
+
js: "never",
|
|
54
|
+
ts: "never",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
|
|
58
|
+
// @typescript-eslint/eslint-plugin https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/README.md
|
|
59
|
+
// turn off ESLint equivalents
|
|
60
|
+
|
|
61
|
+
// Require that `function` overload signatures be consecutive.
|
|
62
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.mdx
|
|
63
|
+
"@typescript-eslint/adjacent-overload-signatures": "off",
|
|
64
|
+
|
|
65
|
+
// Require consistently using either `T[]` or `Array<T>` for arrays.
|
|
66
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/array-type.mdx
|
|
67
|
+
"@typescript-eslint/array-type": "off",
|
|
68
|
+
|
|
69
|
+
// Disallow awaiting a value that is not a `Thenable`.
|
|
70
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/await-thenable.mdx
|
|
71
|
+
"@typescript-eslint/await-thenable": "off",
|
|
72
|
+
|
|
73
|
+
// Disallow `@ts-<directive>` comments or require descriptions after directives.
|
|
74
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-ts-comment.mdx
|
|
75
|
+
"@typescript-eslint/ban-ts-comment": "error",
|
|
76
|
+
|
|
77
|
+
// Disallow `// tslint:<rule-flag>` comments.
|
|
78
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-tslint-comment.mdx
|
|
79
|
+
"@typescript-eslint/ban-tslint-comment": "off",
|
|
80
|
+
|
|
81
|
+
// Enforce that literals on classes are exposed in a consistent style
|
|
82
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/class-literal-property-style.mdx
|
|
83
|
+
"@typescript-eslint/class-literal-property-style": "off",
|
|
84
|
+
|
|
85
|
+
// Enforce that class methods utilize `this`.
|
|
86
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/class-methods-use-this.mdx
|
|
87
|
+
// 'class-methods-use-this': 'off',
|
|
88
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
89
|
+
|
|
90
|
+
// Enforce specifying generic type arguments on type annotation or `constructor` name of a constructor call.
|
|
91
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.mdx
|
|
92
|
+
"@typescript-eslint/consistent-generic-constructors": "off",
|
|
93
|
+
|
|
94
|
+
// Require or disallow the `Record` type.
|
|
95
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.mdx
|
|
96
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
97
|
+
|
|
98
|
+
// Require `return` statements to either always or never specify values.
|
|
99
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-return.mdx
|
|
100
|
+
// 'consistent-return': 'off',
|
|
101
|
+
"@typescript-eslint/consistent-return": "off",
|
|
102
|
+
|
|
103
|
+
// Enforce consistent usage of type assertions.
|
|
104
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-assertions.mdx
|
|
105
|
+
"@typescript-eslint/consistent-type-assertions": "warn",
|
|
106
|
+
|
|
107
|
+
// Enforce type definitions to consistently use either `interface` or `type`.
|
|
108
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-definitions.mdx
|
|
109
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
110
|
+
|
|
111
|
+
// Enforce consistent usage of type exports.
|
|
112
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-exports.mdx
|
|
113
|
+
"@typescript-eslint/consistent-type-exports": "off",
|
|
114
|
+
|
|
115
|
+
// Enforce consistent usage of type imports
|
|
116
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.mdx
|
|
117
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
118
|
+
|
|
119
|
+
// Enforce default parameters to be last.
|
|
120
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.mdx
|
|
121
|
+
"@typescript-eslint/default-param-last": "off",
|
|
122
|
+
|
|
123
|
+
// Enforce dot notation whenever possible.
|
|
124
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/dot-notation.mdx
|
|
125
|
+
// 'dot-notation': 'off',
|
|
126
|
+
"@typescript-eslint/dot-notation": "off",
|
|
127
|
+
|
|
128
|
+
// Require explicit return types on functions and class methods.
|
|
129
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-function-return-type.mdx
|
|
130
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
131
|
+
|
|
132
|
+
// Require explicit accessibility modifiers on class properties and methods.
|
|
133
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.mdx
|
|
134
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
135
|
+
|
|
136
|
+
// Require explicit return and argument types on exported functions' and classes' public class methods.
|
|
137
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.mdx
|
|
138
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
139
|
+
|
|
140
|
+
// Require or disallow initialization in variable declarations.
|
|
141
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/init-declarations.mdx
|
|
142
|
+
"@typescript-eslint/init-declarations": "off",
|
|
143
|
+
|
|
144
|
+
// Enforce a maximum number of parameters in function definitions.
|
|
145
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/max-params.mdx
|
|
146
|
+
// 'max-params': 'off',
|
|
147
|
+
"@typescript-eslint/max-params": "off",
|
|
148
|
+
|
|
149
|
+
// Require a consistent member declaration order.
|
|
150
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/member-ordering.mdx
|
|
151
|
+
"@typescript-eslint/member-ordering": "off",
|
|
152
|
+
|
|
153
|
+
// Enforce using a particular method signature syntax.
|
|
154
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/method-signature-style.mdx
|
|
155
|
+
"@typescript-eslint/method-signature-style": "off",
|
|
156
|
+
|
|
157
|
+
// Enforce naming conventions for everything across a codebase.
|
|
158
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.mdx
|
|
159
|
+
"@typescript-eslint/naming-convention": "off",
|
|
160
|
+
|
|
161
|
+
// 'no-array-constructor': 'off',
|
|
162
|
+
// Disallow generic `Array` constructors.
|
|
163
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-array-constructor.mdx
|
|
164
|
+
"@typescript-eslint/no-array-constructor": "error",
|
|
165
|
+
|
|
166
|
+
// Disallow using the `delete` operator on array values.
|
|
167
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-array-delete.mdx
|
|
168
|
+
"@typescript-eslint/no-array-delete": "off",
|
|
169
|
+
|
|
170
|
+
// Require `.toString()` to only be called on objects which provide useful information when stringified.
|
|
171
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-base-to-string.mdx
|
|
172
|
+
"@typescript-eslint/no-base-to-string": "off",
|
|
173
|
+
|
|
174
|
+
// Disallow non-null assertion in locations that may be confusing.
|
|
175
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.mdx
|
|
176
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "off",
|
|
177
|
+
|
|
178
|
+
// Require expressions of type `void` to appear in statement position.
|
|
179
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-void-expression.mdx
|
|
180
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
181
|
+
|
|
182
|
+
// Disallow using code marked as `@deprecated`.
|
|
183
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-deprecated.mdx
|
|
184
|
+
"@typescript-eslint/no-deprecated": "off",
|
|
185
|
+
|
|
186
|
+
// Disallow duplicate `class` members.
|
|
187
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-dupe-class-members.mdx
|
|
188
|
+
// 'no-dupe-class-members': 'off',
|
|
189
|
+
"@typescript-eslint/no-dupe-class-members": "off",
|
|
190
|
+
|
|
191
|
+
// Disallow duplicate `enum` member values.
|
|
192
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.mdx
|
|
193
|
+
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
194
|
+
|
|
195
|
+
// Disallow duplicate constituents of union or intersection types.
|
|
196
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx
|
|
197
|
+
"@typescript-eslint/no-duplicate-type-constituents": "off",
|
|
198
|
+
|
|
199
|
+
// Disallow using the `delete` operator on computed key expressions.
|
|
200
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.mdx
|
|
201
|
+
"@typescript-eslint/no-dynamic-delete": "off",
|
|
202
|
+
|
|
203
|
+
// Disallow empty functions.
|
|
204
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-function.mdx
|
|
205
|
+
// 'no-empty-function': 'off',
|
|
206
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
207
|
+
|
|
208
|
+
// Disallow accidentally using the "empty object" type.
|
|
209
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-object-type.mdx
|
|
210
|
+
"@typescript-eslint/no-empty-object-type": "error",
|
|
211
|
+
|
|
212
|
+
// Disallow the `any` type.
|
|
213
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.mdx
|
|
214
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
215
|
+
|
|
216
|
+
// Disallow extra non-null assertions.
|
|
217
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.mdx
|
|
218
|
+
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
219
|
+
|
|
220
|
+
// Disallow classes used as namespaces.
|
|
221
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extraneous-class.mdx
|
|
222
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
223
|
+
|
|
224
|
+
// Require `Promise`-like statements to be handled appropriately.
|
|
225
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-floating-promises.mdx
|
|
226
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
227
|
+
|
|
228
|
+
// Disallow iterating over an array with a `for-in` loop.
|
|
229
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-for-in-array.mdx
|
|
230
|
+
"@typescript-eslint/no-for-in-array": "off",
|
|
231
|
+
|
|
232
|
+
// Disallow the use of `eval()`-like methods.
|
|
233
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-implied-eval.mdx
|
|
234
|
+
// 'no-implied-eval': 'off',
|
|
235
|
+
"@typescript-eslint/no-implied-eval": "off",
|
|
236
|
+
|
|
237
|
+
// Enforce the use of top-level `import type` qualifier when an import only has specifiers with inline type qualifiers.
|
|
238
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx
|
|
239
|
+
"@typescript-eslint/no-import-type-side-effects": "off",
|
|
240
|
+
|
|
241
|
+
// Disallow explicit type declarations for variables or parameters initialized to a `number`, `string`, or `boolean`.
|
|
242
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inferrable-types.mdx
|
|
243
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
244
|
+
|
|
245
|
+
// Disallow `this` keywords outside of classes or class-like objects.
|
|
246
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-invalid-this.mdx
|
|
247
|
+
// 'no-invalid-this': 'off',
|
|
248
|
+
"@typescript-eslint/no-invalid-this": "off",
|
|
249
|
+
|
|
250
|
+
// Disallow `void` type outside of generic or return types.
|
|
251
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.mdx
|
|
252
|
+
"@typescript-eslint/no-invalid-void-type": "off",
|
|
253
|
+
|
|
254
|
+
// Disallow `function` declarations that contain unsafe references inside loop statements.
|
|
255
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-loop-func.mdx
|
|
256
|
+
// 'no-loop-func': 'off',
|
|
257
|
+
"@typescript-eslint/no-loop-func": "off",
|
|
258
|
+
|
|
259
|
+
// Disallow magic numbers.
|
|
260
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-magic-numbers.mdx
|
|
261
|
+
// 'no-magic-numbers': 'off',
|
|
262
|
+
"@typescript-eslint/no-magic-numbers": "off",
|
|
263
|
+
|
|
264
|
+
// Disallow the `void` operator except when used to discard a value.
|
|
265
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.mdx
|
|
266
|
+
"@typescript-eslint/no-meaningless-void-operator": "off",
|
|
267
|
+
|
|
268
|
+
// Enforce valid definition of `new` and `constructor`.
|
|
269
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-new.mdx
|
|
270
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
271
|
+
|
|
272
|
+
// Disallow `Promise`s in places not designed to handle them.
|
|
273
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-promises.mdx
|
|
274
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
275
|
+
|
|
276
|
+
// Disallow `enum`s from having both number and string members.
|
|
277
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-mixed-enums.mdx
|
|
278
|
+
"@typescript-eslint/no-mixed-enums": "off",
|
|
279
|
+
|
|
280
|
+
// Disallow TypeScript namespaces.
|
|
281
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-namespace.mdx
|
|
282
|
+
"@typescript-eslint/no-namespace": "error",
|
|
283
|
+
|
|
284
|
+
// Disallow non-null assertions in the left operand of a nullish coalescing operator.
|
|
285
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.mdx
|
|
286
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
|
|
287
|
+
|
|
288
|
+
// Disallow non-null assertions after an optional chain expression.
|
|
289
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.mdx
|
|
290
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
291
|
+
|
|
292
|
+
// Disallow non-null assertions using the `!` postfix operator.
|
|
293
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.mdx
|
|
294
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
295
|
+
|
|
296
|
+
// Disallow variable redeclaration.
|
|
297
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-redeclare.mdx
|
|
298
|
+
"no-redeclare": "off",
|
|
299
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
300
|
+
|
|
301
|
+
// Disallow members of unions and intersections that do nothing or override type information.
|
|
302
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.mdx
|
|
303
|
+
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
304
|
+
|
|
305
|
+
// Disallow invocation of `require()`.
|
|
306
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-require-imports.mdx
|
|
307
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
308
|
+
|
|
309
|
+
// Disallow specified modules when loaded by `import`.
|
|
310
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-restricted-imports.mdx
|
|
311
|
+
// 'no-restricted-imports': 'off',
|
|
312
|
+
"@typescript-eslint/no-restricted-imports": "off",
|
|
313
|
+
|
|
314
|
+
// Disallow certain types.
|
|
315
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-restricted-types.mdx
|
|
316
|
+
"@typescript-eslint/no-restricted-types": "off",
|
|
317
|
+
|
|
318
|
+
// Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
319
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.mdx
|
|
320
|
+
"no-shadow": "off",
|
|
321
|
+
"@typescript-eslint/no-shadow": "error",
|
|
322
|
+
|
|
323
|
+
// Disallow aliasing `this`.
|
|
324
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-this-alias.mdx
|
|
325
|
+
"@typescript-eslint/no-this-alias": "error",
|
|
326
|
+
|
|
327
|
+
// Disallow unnecessary equality comparisons against `boolean` literals.
|
|
328
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx
|
|
329
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
330
|
+
|
|
331
|
+
// Disallow conditionals where the type is always truthy or always falsy.
|
|
332
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.mdx
|
|
333
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
334
|
+
|
|
335
|
+
// Disallow unnecessary assignment of `constructor` property parameter.
|
|
336
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-parameter-property-assignment.mdx
|
|
337
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
|
|
338
|
+
|
|
339
|
+
// Disallow unnecessary namespace qualifiers.
|
|
340
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.mdx
|
|
341
|
+
"@typescript-eslint/no-unnecessary-qualifier": "off",
|
|
342
|
+
|
|
343
|
+
// Disallow unnecessary template expressions.
|
|
344
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-template-expression.mdx
|
|
345
|
+
"@typescript-eslint/no-unnecessary-template-expression": "off",
|
|
346
|
+
|
|
347
|
+
// Disallow type arguments that are equal to the default.
|
|
348
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.mdx
|
|
349
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
350
|
+
|
|
351
|
+
// Disallow type assertions that do not change the type of an expression.
|
|
352
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.mdx
|
|
353
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
354
|
+
|
|
355
|
+
// Disallow unnecessary constraints on generic types.
|
|
356
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.mdx
|
|
357
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
358
|
+
|
|
359
|
+
// Disallow type parameters that aren't used multiple times.
|
|
360
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.mdx
|
|
361
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
362
|
+
|
|
363
|
+
// Disallow calling a `function` with a value with type `any`.
|
|
364
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.mdx
|
|
365
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
366
|
+
|
|
367
|
+
// Disallow assigning a value with type `any` to variables and properties.
|
|
368
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.mdx
|
|
369
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
370
|
+
|
|
371
|
+
// Disallow calling a value with type `any`.
|
|
372
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-call.mdx
|
|
373
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
374
|
+
|
|
375
|
+
// Disallow unsafe declaration merging.
|
|
376
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.mdx
|
|
377
|
+
"@typescript-eslint/no-unsafe-declaration-merging": "error",
|
|
378
|
+
|
|
379
|
+
// Disallow comparing an `enum` value with a non-`enum` value.
|
|
380
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.mdx
|
|
381
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
382
|
+
|
|
383
|
+
// Disallow using the unsafe built-in `Function` type.
|
|
384
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-function-type.mdx
|
|
385
|
+
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
386
|
+
|
|
387
|
+
// Disallow member access on a value with type `any`.
|
|
388
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.mdx
|
|
389
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
390
|
+
|
|
391
|
+
// Disallow returning a value with type `any` from a `function`.
|
|
392
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-return.mdx
|
|
393
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
394
|
+
|
|
395
|
+
// Require unary negation to take a `number`.
|
|
396
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-unary-minus.mdx
|
|
397
|
+
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
398
|
+
|
|
399
|
+
// Disallow unused expressions.
|
|
400
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unused-expressions.mdx
|
|
401
|
+
"no-unused-expressions": "off",
|
|
402
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
403
|
+
|
|
404
|
+
// Disallow unused variables.
|
|
405
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unused-vars.mdx
|
|
406
|
+
"no-unused-vars": "off",
|
|
407
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
408
|
+
|
|
409
|
+
// Disallow the use of variables before they are defined.
|
|
410
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-use-before-define.mdx
|
|
411
|
+
"no-use-before-define": "off",
|
|
412
|
+
"@typescript-eslint/no-use-before-define": "error",
|
|
413
|
+
|
|
414
|
+
// Disallow unnecessary constructors.
|
|
415
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-useless-constructor.mdx
|
|
416
|
+
"no-useless-constructor": "off",
|
|
417
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
418
|
+
|
|
419
|
+
// Disallow empty exports that don't change anything in a module file.
|
|
420
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.mdx
|
|
421
|
+
"@typescript-eslint/no-useless-empty-export": "off",
|
|
422
|
+
|
|
423
|
+
// Disallow using confusing built-in primitive class wrappers.
|
|
424
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-wrapper-object-types.mdx
|
|
425
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
426
|
+
|
|
427
|
+
// Enforce non-null assertions over explicit type casts.
|
|
428
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.mdx
|
|
429
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
430
|
+
|
|
431
|
+
// Disallow throwing non-`Error` values as exceptions.
|
|
432
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/only-throw-error.mdx
|
|
433
|
+
// 'no-throw-literal': 'off',
|
|
434
|
+
"@typescript-eslint/only-throw-error": "off",
|
|
435
|
+
|
|
436
|
+
// Require or disallow parameter properties in class constructors.
|
|
437
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/parameter-properties.mdx
|
|
438
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
439
|
+
|
|
440
|
+
// Enforce the use of `as const` over literal type.
|
|
441
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-as-const.mdx
|
|
442
|
+
"@typescript-eslint/prefer-as-const": "error",
|
|
443
|
+
|
|
444
|
+
// Require destructuring from arrays and/or objects.
|
|
445
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-destructuring.mdx
|
|
446
|
+
// 'prefer-destructuring': 'off',
|
|
447
|
+
"@typescript-eslint/prefer-destructuring": "off",
|
|
448
|
+
|
|
449
|
+
// Require each `enum` member value to be explicitly initialized.
|
|
450
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.mdx
|
|
451
|
+
"@typescript-eslint/prefer-enum-initializers": "off",
|
|
452
|
+
|
|
453
|
+
// Enforce the use of `Array.prototype.find()` over `Array.prototype.filter()` followed by `[0]` when looking for a single result.
|
|
454
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-find.mdx
|
|
455
|
+
"@typescript-eslint/prefer-find": "off",
|
|
456
|
+
|
|
457
|
+
// Enforce the use of `for-of` loop over the standard `for` loop where possible.
|
|
458
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-for-of.mdx
|
|
459
|
+
"@typescript-eslint/prefer-for-of": "off",
|
|
460
|
+
|
|
461
|
+
// Enforce using `function` types instead of interfaces with call signatures.
|
|
462
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-function-type.mdx
|
|
463
|
+
"@typescript-eslint/prefer-function-type": "off",
|
|
464
|
+
|
|
465
|
+
// Enforce `includes` method over `indexOf` method.
|
|
466
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-includes.mdx
|
|
467
|
+
"@typescript-eslint/prefer-includes": "off",
|
|
468
|
+
|
|
469
|
+
// Require all `enum` members to be literal values.
|
|
470
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.mdx
|
|
471
|
+
"@typescript-eslint/prefer-literal-enum-member": "off",
|
|
472
|
+
|
|
473
|
+
// Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.
|
|
474
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.mdx
|
|
475
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
476
|
+
|
|
477
|
+
// Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
478
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.mdx
|
|
479
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
480
|
+
|
|
481
|
+
// Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
|
|
482
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.mdx
|
|
483
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
484
|
+
|
|
485
|
+
// Require using `Error` objects as `Promise` rejection reasons.
|
|
486
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.mdx
|
|
487
|
+
// 'prefer-promise-reject-errors': 'off',
|
|
488
|
+
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
489
|
+
|
|
490
|
+
// Require private members to be marked as `readonly` if they're never modified outside of the `constructor`.
|
|
491
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly.mdx
|
|
492
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
493
|
+
|
|
494
|
+
// Require `function` parameters to be typed as `readonly` to prevent accidental mutation of inputs.
|
|
495
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.mdx
|
|
496
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
497
|
+
|
|
498
|
+
// Enforce using type parameter when calling `Array#reduce` instead of casting.
|
|
499
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.mdx
|
|
500
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
501
|
+
|
|
502
|
+
// Enforce `RegExp#exec` over `String#match` if no global flag is provided.
|
|
503
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.mdx
|
|
504
|
+
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
505
|
+
|
|
506
|
+
// Enforce that `this` is used when only `this` type is returned.
|
|
507
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.mdx
|
|
508
|
+
"@typescript-eslint/prefer-return-this-type": "off",
|
|
509
|
+
|
|
510
|
+
// Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.
|
|
511
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.mdx
|
|
512
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
513
|
+
|
|
514
|
+
// Require any `function` or method that returns a `Promise` to be marked `async`.
|
|
515
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/promise-function-async.mdx
|
|
516
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
517
|
+
|
|
518
|
+
// Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`.
|
|
519
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-array-sort-compare.mdx
|
|
520
|
+
"@typescript-eslint/require-array-sort-compare": "off",
|
|
521
|
+
|
|
522
|
+
// Disallow `async` functions which do not return promises and have no `await` expression.
|
|
523
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-await.mdx
|
|
524
|
+
// 'require-await': 'off',
|
|
525
|
+
"@typescript-eslint/require-await": "off",
|
|
526
|
+
|
|
527
|
+
// Require both operands of addition to be the same type and be `bigint`, `number`, or `string`.
|
|
528
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-plus-operands.mdx
|
|
529
|
+
"@typescript-eslint/restrict-plus-operands": "off",
|
|
530
|
+
|
|
531
|
+
// Enforce template literal expressions to be of `string` type.
|
|
532
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.mdx
|
|
533
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
534
|
+
|
|
535
|
+
// Enforce consistent awaiting of returned promises.
|
|
536
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/return-await.mdx
|
|
537
|
+
// 'no-return-await': 'off',
|
|
538
|
+
"@typescript-eslint/return-await": "off",
|
|
539
|
+
|
|
540
|
+
// Disallow certain types in `boolean` expressions.
|
|
541
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/strict-boolean-expressions.mdx
|
|
542
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
543
|
+
|
|
544
|
+
// Require `switch-case` statements to be exhaustive.
|
|
545
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.mdx
|
|
546
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
547
|
+
|
|
548
|
+
// Disallow certain triple slash directives in favor of ES6-style `import` declarations.
|
|
549
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.mdx
|
|
550
|
+
"@typescript-eslint/triple-slash-reference": "error",
|
|
551
|
+
|
|
552
|
+
// Require type annotations in certain places.
|
|
553
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/typedef.mdx
|
|
554
|
+
"@typescript-eslint/typedef": "off",
|
|
555
|
+
|
|
556
|
+
// Enforce unbound methods are called with their expected scope.
|
|
557
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unbound-method.mdx
|
|
558
|
+
"@typescript-eslint/unbound-method": "off",
|
|
559
|
+
|
|
560
|
+
// Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
|
|
561
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unified-signatures.mdx
|
|
562
|
+
"@typescript-eslint/unified-signatures": "off",
|
|
563
|
+
|
|
564
|
+
// Enforce typing arguments in `Promise` rejection callbacks as `unknown`.
|
|
565
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/use-unknown-in-catch-callback-variable.mdx
|
|
566
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
567
|
+
},
|
|
568
|
+
"import-x",
|
|
569
|
+
importNs,
|
|
570
|
+
),
|
|
571
|
+
files,
|
|
572
|
+
});
|