@jpp-toolkit/eslint-config 0.0.11
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/LICENSE.md +21 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.mjs +654 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +73 -0
- package/src/configs/eslint-config.ts +1305 -0
- package/src/configs/ignore-config.ts +17 -0
- package/src/configs/import-x-config.ts +344 -0
- package/src/configs/jsx-a11y-config.ts +278 -0
- package/src/configs/perfectionist-config.ts +180 -0
- package/src/configs/prettier-config.ts +11 -0
- package/src/configs/react-config.ts +706 -0
- package/src/configs/react-hooks-config.ts +11 -0
- package/src/configs/stylistic-config.ts +746 -0
- package/src/configs/typescript-config.ts +1211 -0
- package/src/configs/unicorn-config.ts +1212 -0
- package/src/configs/vitest-config.ts +536 -0
- package/src/index.ts +73 -0
|
@@ -0,0 +1,1211 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TypeScript configuration.
|
|
6
|
+
* @see {@link https://typescript-eslint.io/rules/}
|
|
7
|
+
*/
|
|
8
|
+
export const typescriptConfig = defineConfig([
|
|
9
|
+
{
|
|
10
|
+
name: 'typescript-config',
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked],
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parserOptions: {
|
|
15
|
+
projectService: true,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
rules: {
|
|
19
|
+
/**
|
|
20
|
+
* Enforce that class methods utilize.
|
|
21
|
+
* @extension
|
|
22
|
+
* @see {@link https://typescript-eslint.io/rules/class-methods-use-this}
|
|
23
|
+
*/
|
|
24
|
+
// '@typescript-eslint/class-methods-use-this': 'error',
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Require.
|
|
28
|
+
* @typeChecked
|
|
29
|
+
* @extension
|
|
30
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-return}
|
|
31
|
+
*/
|
|
32
|
+
// '@typescript-eslint/consistent-return': 'error',
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Enforce consistent usage of type exports.
|
|
36
|
+
* @fixable
|
|
37
|
+
* @typeChecked
|
|
38
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-type-exports}
|
|
39
|
+
*/
|
|
40
|
+
'@typescript-eslint/consistent-type-exports': 'error',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Enforce consistent usage of type imports.
|
|
44
|
+
* @fixable
|
|
45
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-type-imports}
|
|
46
|
+
*/
|
|
47
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Enforce default parameters to be last.
|
|
51
|
+
* @extension
|
|
52
|
+
* @see {@link https://typescript-eslint.io/rules/default-param-last}
|
|
53
|
+
*/
|
|
54
|
+
'default-param-last': 'off',
|
|
55
|
+
'@typescript-eslint/default-param-last': 'error',
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Require explicit return types on functions and class methods.
|
|
59
|
+
* @see {@link https://typescript-eslint.io/rules/explicit-function-return-type}
|
|
60
|
+
*/
|
|
61
|
+
// '@typescript-eslint/explicit-function-return-type': 'error',
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Require explicit accessibility modifiers on class properties and methods.
|
|
65
|
+
* @fixable
|
|
66
|
+
* @see {@link https://typescript-eslint.io/rules/explicit-member-accessibility}
|
|
67
|
+
*/
|
|
68
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
69
|
+
'error',
|
|
70
|
+
{
|
|
71
|
+
accessibility: 'explicit',
|
|
72
|
+
overrides: {
|
|
73
|
+
accessors: 'explicit',
|
|
74
|
+
constructors: 'no-public',
|
|
75
|
+
methods: 'explicit',
|
|
76
|
+
properties: 'no-public',
|
|
77
|
+
parameterProperties: 'no-public',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Require explicit return and argument types on exported functions' and classes' public class methods.
|
|
84
|
+
* @see {@link https://typescript-eslint.io/rules/explicit-module-boundary-types}
|
|
85
|
+
*/
|
|
86
|
+
// '@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Require or disallow initialization in variable declarations.
|
|
90
|
+
* @extension
|
|
91
|
+
* @see {@link https://typescript-eslint.io/rules/init-declarations}
|
|
92
|
+
*/
|
|
93
|
+
// '@typescript-eslint/init-declarations': 'error',
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Enforce a maximum number of parameters in function definitions.
|
|
97
|
+
* @extension
|
|
98
|
+
* @see {@link https://typescript-eslint.io/rules/max-params}
|
|
99
|
+
*/
|
|
100
|
+
// '@typescript-eslint/max-params': 'error',
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Require a consistent member declaration order.
|
|
104
|
+
* @see {@link https://typescript-eslint.io/rules/member-ordering}
|
|
105
|
+
*/
|
|
106
|
+
'@typescript-eslint/member-ordering': [
|
|
107
|
+
'error',
|
|
108
|
+
{
|
|
109
|
+
default: [
|
|
110
|
+
// Index signature
|
|
111
|
+
'signature',
|
|
112
|
+
'call-signature',
|
|
113
|
+
|
|
114
|
+
// Fields
|
|
115
|
+
'public-static-field',
|
|
116
|
+
'protected-static-field',
|
|
117
|
+
'private-static-field',
|
|
118
|
+
'#private-static-field',
|
|
119
|
+
|
|
120
|
+
'public-instance-field',
|
|
121
|
+
'protected-instance-field',
|
|
122
|
+
'private-instance-field',
|
|
123
|
+
'#private-instance-field',
|
|
124
|
+
|
|
125
|
+
'public-abstract-field',
|
|
126
|
+
'protected-abstract-field',
|
|
127
|
+
|
|
128
|
+
'public-field',
|
|
129
|
+
'protected-field',
|
|
130
|
+
'private-field',
|
|
131
|
+
'#private-field',
|
|
132
|
+
|
|
133
|
+
'static-field',
|
|
134
|
+
'instance-field',
|
|
135
|
+
'abstract-field',
|
|
136
|
+
|
|
137
|
+
'field',
|
|
138
|
+
|
|
139
|
+
// Static initialization
|
|
140
|
+
'static-initialization',
|
|
141
|
+
|
|
142
|
+
// Constructors
|
|
143
|
+
'public-constructor',
|
|
144
|
+
'protected-constructor',
|
|
145
|
+
'private-constructor',
|
|
146
|
+
|
|
147
|
+
// Accessors
|
|
148
|
+
'public-static-accessor',
|
|
149
|
+
'protected-static-accessor',
|
|
150
|
+
'private-static-accessor',
|
|
151
|
+
'#private-static-accessor',
|
|
152
|
+
|
|
153
|
+
'public-instance-accessor',
|
|
154
|
+
'protected-instance-accessor',
|
|
155
|
+
'private-instance-accessor',
|
|
156
|
+
'#private-instance-accessor',
|
|
157
|
+
|
|
158
|
+
'public-abstract-accessor',
|
|
159
|
+
'protected-abstract-accessor',
|
|
160
|
+
|
|
161
|
+
'public-accessor',
|
|
162
|
+
'protected-accessor',
|
|
163
|
+
'private-accessor',
|
|
164
|
+
'#private-accessor',
|
|
165
|
+
|
|
166
|
+
'static-accessor',
|
|
167
|
+
'instance-accessor',
|
|
168
|
+
'abstract-accessor',
|
|
169
|
+
|
|
170
|
+
'accessor',
|
|
171
|
+
|
|
172
|
+
// Getters / Setters
|
|
173
|
+
['public-static-get', 'public-static-set'],
|
|
174
|
+
['protected-static-get', 'protected-static-set'],
|
|
175
|
+
['private-static-get', 'private-static-set'],
|
|
176
|
+
['#private-static-get', '#private-static-set'],
|
|
177
|
+
|
|
178
|
+
['public-instance-get', 'public-instance-set'],
|
|
179
|
+
['protected-instance-get', 'protected-instance-set'],
|
|
180
|
+
['private-instance-get', 'private-instance-set'],
|
|
181
|
+
['#private-instance-get', '#private-instance-set'],
|
|
182
|
+
|
|
183
|
+
['public-abstract-get', 'public-abstract-set'],
|
|
184
|
+
['protected-abstract-get', 'protected-abstract-set'],
|
|
185
|
+
|
|
186
|
+
['public-get', 'public-set'],
|
|
187
|
+
['protected-get', 'protected-set'],
|
|
188
|
+
['private-get', 'private-set'],
|
|
189
|
+
['#private-get', '#private-set'],
|
|
190
|
+
|
|
191
|
+
['static-get', 'static-set'],
|
|
192
|
+
['instance-get', 'instance-set'],
|
|
193
|
+
['abstract-get', 'abstract-set'],
|
|
194
|
+
|
|
195
|
+
['get', 'set'],
|
|
196
|
+
|
|
197
|
+
// Methods
|
|
198
|
+
'public-static-method',
|
|
199
|
+
'protected-static-method',
|
|
200
|
+
'private-static-method',
|
|
201
|
+
'#private-static-method',
|
|
202
|
+
|
|
203
|
+
'public-instance-method',
|
|
204
|
+
'protected-instance-method',
|
|
205
|
+
'private-instance-method',
|
|
206
|
+
'#private-instance-method',
|
|
207
|
+
|
|
208
|
+
'public-abstract-method',
|
|
209
|
+
'protected-abstract-method',
|
|
210
|
+
|
|
211
|
+
'public-method',
|
|
212
|
+
'protected-method',
|
|
213
|
+
'private-method',
|
|
214
|
+
'#private-method',
|
|
215
|
+
|
|
216
|
+
'static-method',
|
|
217
|
+
'instance-method',
|
|
218
|
+
'abstract-method',
|
|
219
|
+
|
|
220
|
+
'method',
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Enforce using a particular method signature syntax.
|
|
227
|
+
* @fixable
|
|
228
|
+
* @see {@link https://typescript-eslint.io/rules/method-signature-style}
|
|
229
|
+
*/
|
|
230
|
+
'@typescript-eslint/method-signature-style': 'error',
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Enforce naming conventions for everything across a codebase.
|
|
234
|
+
* @typeChecked
|
|
235
|
+
* @see {@link https://typescript-eslint.io/rules/naming-convention}
|
|
236
|
+
*/
|
|
237
|
+
'@typescript-eslint/naming-convention': [
|
|
238
|
+
'error',
|
|
239
|
+
{
|
|
240
|
+
selector: 'typeParameter',
|
|
241
|
+
format: ['PascalCase'],
|
|
242
|
+
prefix: ['T', 'K', 'U', 'V'],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
selector: ['method', 'parameterProperty', 'property'],
|
|
246
|
+
modifiers: ['private'],
|
|
247
|
+
format: ['camelCase'],
|
|
248
|
+
leadingUnderscore: 'require',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
selector: ['interface', 'typeAlias'],
|
|
252
|
+
format: ['PascalCase'],
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Disallow duplicate class members.
|
|
258
|
+
* @extension
|
|
259
|
+
* @see {@link https://typescript-eslint.io/rules/no-dupe-class-members}
|
|
260
|
+
*/
|
|
261
|
+
// '@typescript-eslint/no-dupe-class-members': 'error',
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Disallow the declaration of empty interfaces.
|
|
265
|
+
* @fixable
|
|
266
|
+
* @deprecated
|
|
267
|
+
* @see {@link https://typescript-eslint.io/rules/no-empty-interface}
|
|
268
|
+
*/
|
|
269
|
+
// '@typescript-eslint/no-empty-interface': 'error',
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
|
|
273
|
+
* @fixable
|
|
274
|
+
* @see {@link https://typescript-eslint.io/rules/no-import-type-side-effects}
|
|
275
|
+
*/
|
|
276
|
+
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Disallow.
|
|
280
|
+
* @extension
|
|
281
|
+
* @see {@link https://typescript-eslint.io/rules/no-invalid-this}
|
|
282
|
+
*/
|
|
283
|
+
'no-invalid-this': 'off',
|
|
284
|
+
'@typescript-eslint/no-invalid-this': 'error',
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Disallow function declarations that contain unsafe references inside loop statements.
|
|
288
|
+
* @extension
|
|
289
|
+
* @see {@link https://typescript-eslint.io/rules/no-loop-func}
|
|
290
|
+
*/
|
|
291
|
+
'no-loop-func': 'off',
|
|
292
|
+
'@typescript-eslint/no-loop-func': 'error',
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Disallow literal numbers that lose precision.
|
|
296
|
+
* @extension
|
|
297
|
+
* @deprecated
|
|
298
|
+
* @see {@link https://typescript-eslint.io/rules/no-loss-of-precision}
|
|
299
|
+
*/
|
|
300
|
+
// '@typescript-eslint/no-loss-of-precision': 'error',
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Disallow magic numbers.
|
|
304
|
+
* @extension
|
|
305
|
+
* @see {@link https://typescript-eslint.io/rules/no-magic-numbers}
|
|
306
|
+
*/
|
|
307
|
+
// '@typescript-eslint/no-magic-numbers': 'error',
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Disallow variable redeclaration.
|
|
311
|
+
* @extension
|
|
312
|
+
* @see {@link https://typescript-eslint.io/rules/no-redeclare}
|
|
313
|
+
*/
|
|
314
|
+
// '@typescript-eslint/no-redeclare': 'error',
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Disallow specified modules when loaded by.
|
|
318
|
+
* @extension
|
|
319
|
+
* @see {@link https://typescript-eslint.io/rules/no-restricted-imports}
|
|
320
|
+
*/
|
|
321
|
+
// '@typescript-eslint/no-restricted-imports': 'error',
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Disallow certain types.
|
|
325
|
+
* @fixable
|
|
326
|
+
* @see {@link https://typescript-eslint.io/rules/no-restricted-types}
|
|
327
|
+
*/
|
|
328
|
+
// '@typescript-eslint/no-restricted-types': 'error',
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
332
|
+
* @extension
|
|
333
|
+
* @see {@link https://typescript-eslint.io/rules/no-shadow}
|
|
334
|
+
*/
|
|
335
|
+
'no-shadow': 'off',
|
|
336
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Disallow type aliases.
|
|
340
|
+
* @deprecated
|
|
341
|
+
* @see {@link https://typescript-eslint.io/rules/no-type-alias}
|
|
342
|
+
*/
|
|
343
|
+
// '@typescript-eslint/no-type-alias': 'error',
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Disallow unnecessary assignment of constructor property parameter.
|
|
347
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment}
|
|
348
|
+
*/
|
|
349
|
+
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Disallow unnecessary namespace qualifiers.
|
|
353
|
+
* @fixable
|
|
354
|
+
* @typeChecked
|
|
355
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-qualifier}
|
|
356
|
+
*/
|
|
357
|
+
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Disallow type assertions that narrow a type.
|
|
361
|
+
* @typeChecked
|
|
362
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-type-assertion}
|
|
363
|
+
*/
|
|
364
|
+
// '@typescript-eslint/no-unsafe-type-assertion': 'error',
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Disallow unused private class members.
|
|
368
|
+
* @extension
|
|
369
|
+
* @see {@link https://typescript-eslint.io/rules/no-unused-private-class-members}
|
|
370
|
+
*/
|
|
371
|
+
// '@typescript-eslint/no-unused-private-class-members': 'error',
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Disallow the use of variables before they are defined.
|
|
375
|
+
* @extension
|
|
376
|
+
* @see {@link https://typescript-eslint.io/rules/no-use-before-define}
|
|
377
|
+
*/
|
|
378
|
+
'no-use-before-define': 'off',
|
|
379
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Disallow empty exports that don't change anything in a module file.
|
|
383
|
+
* @fixable
|
|
384
|
+
* @see {@link https://typescript-eslint.io/rules/no-useless-empty-export}
|
|
385
|
+
*/
|
|
386
|
+
'@typescript-eslint/no-useless-empty-export': 'error',
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Disallow.
|
|
390
|
+
* @deprecated
|
|
391
|
+
* @see {@link https://typescript-eslint.io/rules/no-var-requires}
|
|
392
|
+
*/
|
|
393
|
+
// '@typescript-eslint/no-var-requires': 'error',
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Require or disallow parameter properties in class constructors.
|
|
397
|
+
* @see {@link https://typescript-eslint.io/rules/parameter-properties}
|
|
398
|
+
*/
|
|
399
|
+
'@typescript-eslint/parameter-properties': 'error',
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Require destructuring from arrays and/or objects.
|
|
403
|
+
* @fixable
|
|
404
|
+
* @typeChecked
|
|
405
|
+
* @extension
|
|
406
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-destructuring}
|
|
407
|
+
*/
|
|
408
|
+
'prefer-destructuring': 'off',
|
|
409
|
+
'@typescript-eslint/prefer-destructuring': 'error',
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Require each enum member value to be explicitly initialized.
|
|
413
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-enum-initializers}
|
|
414
|
+
*/
|
|
415
|
+
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Require private members to be marked as.
|
|
419
|
+
* @fixable
|
|
420
|
+
* @typeChecked
|
|
421
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-readonly}
|
|
422
|
+
*/
|
|
423
|
+
'@typescript-eslint/prefer-readonly': 'error',
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Require function parameters to be typed as.
|
|
427
|
+
* @typeChecked
|
|
428
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-readonly-parameter-types}
|
|
429
|
+
*/
|
|
430
|
+
// '@typescript-eslint/prefer-readonly-parameter-types': 'error',
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Enforce using.
|
|
434
|
+
* @fixable
|
|
435
|
+
* @deprecated
|
|
436
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-ts-expect-error}
|
|
437
|
+
*/
|
|
438
|
+
// '@typescript-eslint/prefer-ts-expect-error': 'error',
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Require any function or method that returns a Promise to be marked async.
|
|
442
|
+
* @fixable
|
|
443
|
+
* @typeChecked
|
|
444
|
+
* @see {@link https://typescript-eslint.io/rules/promise-function-async}
|
|
445
|
+
*/
|
|
446
|
+
'@typescript-eslint/promise-function-async': 'error',
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Require.
|
|
450
|
+
* @typeChecked
|
|
451
|
+
* @see {@link https://typescript-eslint.io/rules/require-array-sort-compare}
|
|
452
|
+
*/
|
|
453
|
+
'@typescript-eslint/require-array-sort-compare': 'error',
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Enforce constituents of a type union/intersection to be sorted alphabetically.
|
|
457
|
+
* @fixable
|
|
458
|
+
* @deprecated
|
|
459
|
+
* @see {@link https://typescript-eslint.io/rules/sort-type-constituents}
|
|
460
|
+
*/
|
|
461
|
+
// '@typescript-eslint/sort-type-constituents': 'error',
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Disallow certain types in boolean expressions.
|
|
465
|
+
* @typeChecked
|
|
466
|
+
* @see {@link https://typescript-eslint.io/rules/strict-boolean-expressions}
|
|
467
|
+
*/
|
|
468
|
+
// '@typescript-eslint/strict-boolean-expressions': 'error',
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Require switch-case statements to be exhaustive.
|
|
472
|
+
* @typeChecked
|
|
473
|
+
* @see {@link https://typescript-eslint.io/rules/switch-exhaustiveness-check}
|
|
474
|
+
*/
|
|
475
|
+
// '@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Require type annotations in certain places.
|
|
479
|
+
* @deprecated
|
|
480
|
+
* @see {@link https://typescript-eslint.io/rules/typedef}
|
|
481
|
+
*/
|
|
482
|
+
// '@typescript-eslint/typedef': 'error',
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Require that function overload signatures be consecutive.
|
|
486
|
+
* @config stylistic
|
|
487
|
+
* @see {@link https://typescript-eslint.io/rules/adjacent-overload-signatures}
|
|
488
|
+
*/
|
|
489
|
+
// '@typescript-eslint/adjacent-overload-signatures': 'off',
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Require consistently using either.
|
|
493
|
+
* @config stylistic
|
|
494
|
+
* @fixable
|
|
495
|
+
* @see {@link https://typescript-eslint.io/rules/array-type}
|
|
496
|
+
*/
|
|
497
|
+
// '@typescript-eslint/array-type': 'off',
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Disallow awaiting a value that is not a Thenable.
|
|
501
|
+
* @config recommended
|
|
502
|
+
* @typeChecked
|
|
503
|
+
* @see {@link https://typescript-eslint.io/rules/await-thenable}
|
|
504
|
+
*/
|
|
505
|
+
// '@typescript-eslint/await-thenable': 'off',
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Disallow.
|
|
509
|
+
* @config recommended
|
|
510
|
+
* @see {@link https://typescript-eslint.io/rules/ban-ts-comment}
|
|
511
|
+
*/
|
|
512
|
+
// '@typescript-eslint/ban-ts-comment': 'off',
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Disallow.
|
|
516
|
+
* @config stylistic
|
|
517
|
+
* @fixable
|
|
518
|
+
* @see {@link https://typescript-eslint.io/rules/ban-tslint-comment}
|
|
519
|
+
*/
|
|
520
|
+
// '@typescript-eslint/ban-tslint-comment': 'off',
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Enforce that literals on classes are exposed in a consistent style.
|
|
524
|
+
* @config stylistic
|
|
525
|
+
* @see {@link https://typescript-eslint.io/rules/class-literal-property-style}
|
|
526
|
+
*/
|
|
527
|
+
// '@typescript-eslint/class-literal-property-style': 'off',
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
|
|
531
|
+
* @config stylistic
|
|
532
|
+
* @fixable
|
|
533
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-generic-constructors}
|
|
534
|
+
*/
|
|
535
|
+
// '@typescript-eslint/consistent-generic-constructors': 'off',
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Require or disallow the.
|
|
539
|
+
* @config stylistic
|
|
540
|
+
* @fixable
|
|
541
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-indexed-object-style}
|
|
542
|
+
*/
|
|
543
|
+
// '@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Enforce consistent usage of type assertions.
|
|
547
|
+
* @config stylistic
|
|
548
|
+
* @fixable
|
|
549
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-type-assertions}
|
|
550
|
+
*/
|
|
551
|
+
// '@typescript-eslint/consistent-type-assertions': 'off',
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Enforce type definitions to consistently use either.
|
|
555
|
+
* @config stylistic
|
|
556
|
+
* @fixable
|
|
557
|
+
* @see {@link https://typescript-eslint.io/rules/consistent-type-definitions}
|
|
558
|
+
*/
|
|
559
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Enforce dot notation whenever possible.
|
|
563
|
+
* @config stylistic
|
|
564
|
+
* @fixable
|
|
565
|
+
* @typeChecked
|
|
566
|
+
* @extension
|
|
567
|
+
* @see {@link https://typescript-eslint.io/rules/dot-notation}
|
|
568
|
+
*/
|
|
569
|
+
// '@typescript-eslint/dot-notation': 'off',
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Disallow generic.
|
|
573
|
+
* @config recommended
|
|
574
|
+
* @fixable
|
|
575
|
+
* @extension
|
|
576
|
+
* @see {@link https://typescript-eslint.io/rules/no-array-constructor}
|
|
577
|
+
*/
|
|
578
|
+
// '@typescript-eslint/no-array-constructor': 'off',
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Disallow using the.
|
|
582
|
+
* @config recommended
|
|
583
|
+
* @typeChecked
|
|
584
|
+
* @see {@link https://typescript-eslint.io/rules/no-array-delete}
|
|
585
|
+
*/
|
|
586
|
+
// '@typescript-eslint/no-array-delete': 'off',
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Require.
|
|
590
|
+
* @config recommended
|
|
591
|
+
* @typeChecked
|
|
592
|
+
* @see {@link https://typescript-eslint.io/rules/no-base-to-string}
|
|
593
|
+
*/
|
|
594
|
+
// '@typescript-eslint/no-base-to-string': 'off',
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Disallow non-null assertion in locations that may be confusing.
|
|
598
|
+
* @config stylistic
|
|
599
|
+
* @see {@link https://typescript-eslint.io/rules/no-confusing-non-null-assertion}
|
|
600
|
+
*/
|
|
601
|
+
// '@typescript-eslint/no-confusing-non-null-assertion': 'off',
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Require expressions of type void to appear in statement position.
|
|
605
|
+
* @config strict
|
|
606
|
+
* @fixable
|
|
607
|
+
* @typeChecked
|
|
608
|
+
* @see {@link https://typescript-eslint.io/rules/no-confusing-void-expression}
|
|
609
|
+
*/
|
|
610
|
+
'@typescript-eslint/no-confusing-void-expression': [
|
|
611
|
+
'error',
|
|
612
|
+
{ ignoreVoidOperator: true, ignoreVoidReturningFunctions: true },
|
|
613
|
+
],
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Disallow using code marked as.
|
|
617
|
+
* @config strict
|
|
618
|
+
* @typeChecked
|
|
619
|
+
* @see {@link https://typescript-eslint.io/rules/no-deprecated}
|
|
620
|
+
*/
|
|
621
|
+
// '@typescript-eslint/no-deprecated': 'off',
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Disallow duplicate enum member values.
|
|
625
|
+
* @config recommended
|
|
626
|
+
* @see {@link https://typescript-eslint.io/rules/no-duplicate-enum-values}
|
|
627
|
+
*/
|
|
628
|
+
// '@typescript-eslint/no-duplicate-enum-values': 'off',
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Disallow duplicate constituents of union or intersection types.
|
|
632
|
+
* @config recommended
|
|
633
|
+
* @fixable
|
|
634
|
+
* @typeChecked
|
|
635
|
+
* @see {@link https://typescript-eslint.io/rules/no-duplicate-type-constituents}
|
|
636
|
+
*/
|
|
637
|
+
// '@typescript-eslint/no-duplicate-type-constituents': 'off',
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Disallow using the.
|
|
641
|
+
* @config strict
|
|
642
|
+
* @fixable
|
|
643
|
+
* @see {@link https://typescript-eslint.io/rules/no-dynamic-delete}
|
|
644
|
+
*/
|
|
645
|
+
// '@typescript-eslint/no-dynamic-delete': 'off',
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Disallow empty functions.
|
|
649
|
+
* @config stylistic
|
|
650
|
+
* @extension
|
|
651
|
+
* @see {@link https://typescript-eslint.io/rules/no-empty-function}
|
|
652
|
+
*/
|
|
653
|
+
// '@typescript-eslint/no-empty-function': 'off',
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Disallow accidentally using the "empty object" type.
|
|
657
|
+
* @config recommended
|
|
658
|
+
* @see {@link https://typescript-eslint.io/rules/no-empty-object-type}
|
|
659
|
+
*/
|
|
660
|
+
// '@typescript-eslint/no-empty-object-type': 'off',
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Disallow the.
|
|
664
|
+
* @config recommended
|
|
665
|
+
* @fixable
|
|
666
|
+
* @see {@link https://typescript-eslint.io/rules/no-explicit-any}
|
|
667
|
+
*/
|
|
668
|
+
'@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Disallow extra non-null assertions.
|
|
672
|
+
* @config recommended
|
|
673
|
+
* @fixable
|
|
674
|
+
* @see {@link https://typescript-eslint.io/rules/no-extra-non-null-assertion}
|
|
675
|
+
*/
|
|
676
|
+
// '@typescript-eslint/no-extra-non-null-assertion': 'off',
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Disallow classes used as namespaces.
|
|
680
|
+
* @config strict
|
|
681
|
+
* @see {@link https://typescript-eslint.io/rules/no-extraneous-class}
|
|
682
|
+
*/
|
|
683
|
+
'@typescript-eslint/no-extraneous-class': 'off',
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Require Promise-like statements to be handled appropriately.
|
|
687
|
+
* @config recommended
|
|
688
|
+
* @typeChecked
|
|
689
|
+
* @see {@link https://typescript-eslint.io/rules/no-floating-promises}
|
|
690
|
+
*/
|
|
691
|
+
// '@typescript-eslint/no-floating-promises': 'off',
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Disallow iterating over an array with a for-in loop.
|
|
695
|
+
* @config recommended
|
|
696
|
+
* @typeChecked
|
|
697
|
+
* @see {@link https://typescript-eslint.io/rules/no-for-in-array}
|
|
698
|
+
*/
|
|
699
|
+
// '@typescript-eslint/no-for-in-array': 'off',
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Disallow the use of.
|
|
703
|
+
* @config recommended
|
|
704
|
+
* @typeChecked
|
|
705
|
+
* @extension
|
|
706
|
+
* @see {@link https://typescript-eslint.io/rules/no-implied-eval}
|
|
707
|
+
*/
|
|
708
|
+
// '@typescript-eslint/no-implied-eval': 'off',
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.
|
|
712
|
+
* @config stylistic
|
|
713
|
+
* @fixable
|
|
714
|
+
* @see {@link https://typescript-eslint.io/rules/no-inferrable-types}
|
|
715
|
+
*/
|
|
716
|
+
// '@typescript-eslint/no-inferrable-types': 'off',
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Disallow.
|
|
720
|
+
* @config strict
|
|
721
|
+
* @see {@link https://typescript-eslint.io/rules/no-invalid-void-type}
|
|
722
|
+
*/
|
|
723
|
+
// '@typescript-eslint/no-invalid-void-type': 'off',
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Disallow the.
|
|
727
|
+
* @config strict
|
|
728
|
+
* @fixable
|
|
729
|
+
* @typeChecked
|
|
730
|
+
* @see {@link https://typescript-eslint.io/rules/no-meaningless-void-operator}
|
|
731
|
+
*/
|
|
732
|
+
// '@typescript-eslint/no-meaningless-void-operator': 'off',
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Enforce valid definition of.
|
|
736
|
+
* @config recommended
|
|
737
|
+
* @see {@link https://typescript-eslint.io/rules/no-misused-new}
|
|
738
|
+
*/
|
|
739
|
+
// '@typescript-eslint/no-misused-new': 'off',
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Disallow Promises in places not designed to handle them.
|
|
743
|
+
* @config recommended
|
|
744
|
+
* @typeChecked
|
|
745
|
+
* @see {@link https://typescript-eslint.io/rules/no-misused-promises}
|
|
746
|
+
*/
|
|
747
|
+
// '@typescript-eslint/no-misused-promises': 'off',
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Disallow using the spread operator when it might cause unexpected behavior.
|
|
751
|
+
* @config strict
|
|
752
|
+
* @typeChecked
|
|
753
|
+
* @see {@link https://typescript-eslint.io/rules/no-misused-spread}
|
|
754
|
+
*/
|
|
755
|
+
// '@typescript-eslint/no-misused-spread': 'off',
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Disallow enums from having both number and string members.
|
|
759
|
+
* @config strict
|
|
760
|
+
* @typeChecked
|
|
761
|
+
* @see {@link https://typescript-eslint.io/rules/no-mixed-enums}
|
|
762
|
+
*/
|
|
763
|
+
// '@typescript-eslint/no-mixed-enums': 'off',
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Disallow TypeScript namespaces.
|
|
767
|
+
* @config recommended
|
|
768
|
+
* @see {@link https://typescript-eslint.io/rules/no-namespace}
|
|
769
|
+
*/
|
|
770
|
+
// '@typescript-eslint/no-namespace': 'off',
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Disallow non-null assertions in the left operand of a nullish coalescing operator.
|
|
774
|
+
* @config strict
|
|
775
|
+
* @see {@link https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing}
|
|
776
|
+
*/
|
|
777
|
+
// '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'off',
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Disallow non-null assertions after an optional chain expression.
|
|
781
|
+
* @config recommended
|
|
782
|
+
* @see {@link https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain}
|
|
783
|
+
*/
|
|
784
|
+
// '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Disallow non-null assertions using the.
|
|
788
|
+
* @config strict
|
|
789
|
+
* @see {@link https://typescript-eslint.io/rules/no-non-null-assertion}
|
|
790
|
+
*/
|
|
791
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Disallow members of unions and intersections that do nothing or override type information.
|
|
795
|
+
* @config recommended
|
|
796
|
+
* @typeChecked
|
|
797
|
+
* @see {@link https://typescript-eslint.io/rules/no-redundant-type-constituents}
|
|
798
|
+
*/
|
|
799
|
+
// '@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Disallow invocation of.
|
|
803
|
+
* @config recommended
|
|
804
|
+
* @see {@link https://typescript-eslint.io/rules/no-require-imports}
|
|
805
|
+
*/
|
|
806
|
+
// '@typescript-eslint/no-require-imports': 'off',
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Disallow aliasing.
|
|
810
|
+
* @config recommended
|
|
811
|
+
* @see {@link https://typescript-eslint.io/rules/no-this-alias}
|
|
812
|
+
*/
|
|
813
|
+
// '@typescript-eslint/no-this-alias': 'off',
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Disallow unnecessary equality comparisons against boolean literals.
|
|
817
|
+
* @config strict
|
|
818
|
+
* @fixable
|
|
819
|
+
* @typeChecked
|
|
820
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare}
|
|
821
|
+
*/
|
|
822
|
+
// '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Disallow conditionals where the type is always truthy or always falsy.
|
|
826
|
+
* @config strict
|
|
827
|
+
* @typeChecked
|
|
828
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-condition}
|
|
829
|
+
*/
|
|
830
|
+
// '@typescript-eslint/no-unnecessary-condition': 'off',
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Disallow unnecessary template expressions.
|
|
834
|
+
* @config strict
|
|
835
|
+
* @fixable
|
|
836
|
+
* @typeChecked
|
|
837
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-template-expression}
|
|
838
|
+
*/
|
|
839
|
+
// '@typescript-eslint/no-unnecessary-template-expression': 'off',
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Disallow type arguments that are equal to the default.
|
|
843
|
+
* @config strict
|
|
844
|
+
* @fixable
|
|
845
|
+
* @typeChecked
|
|
846
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-type-arguments}
|
|
847
|
+
*/
|
|
848
|
+
// '@typescript-eslint/no-unnecessary-type-arguments': 'off',
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Disallow type assertions that do not change the type of an expression.
|
|
852
|
+
* @config recommended
|
|
853
|
+
* @fixable
|
|
854
|
+
* @typeChecked
|
|
855
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-type-assertion}
|
|
856
|
+
*/
|
|
857
|
+
// '@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Disallow unnecessary constraints on generic types.
|
|
861
|
+
* @config recommended
|
|
862
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-type-constraint}
|
|
863
|
+
*/
|
|
864
|
+
// '@typescript-eslint/no-unnecessary-type-constraint': 'off',
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Disallow conversion idioms when they do not change the type or value of the expression.
|
|
868
|
+
* @config strict
|
|
869
|
+
* @typeChecked
|
|
870
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-type-conversion}
|
|
871
|
+
*/
|
|
872
|
+
// '@typescript-eslint/no-unnecessary-type-conversion': 'off',
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Disallow type parameters that aren't used multiple times.
|
|
876
|
+
* @config strict
|
|
877
|
+
* @typeChecked
|
|
878
|
+
* @see {@link https://typescript-eslint.io/rules/no-unnecessary-type-parameters}
|
|
879
|
+
*/
|
|
880
|
+
// '@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Disallow calling a function with a value with type.
|
|
884
|
+
* @config recommended
|
|
885
|
+
* @typeChecked
|
|
886
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-argument}
|
|
887
|
+
*/
|
|
888
|
+
// '@typescript-eslint/no-unsafe-argument': 'off',
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Disallow assigning a value with type.
|
|
892
|
+
* @config recommended
|
|
893
|
+
* @typeChecked
|
|
894
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-assignment}
|
|
895
|
+
*/
|
|
896
|
+
// '@typescript-eslint/no-unsafe-assignment': 'off',
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Disallow calling a value with type.
|
|
900
|
+
* @config recommended
|
|
901
|
+
* @typeChecked
|
|
902
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-call}
|
|
903
|
+
*/
|
|
904
|
+
// '@typescript-eslint/no-unsafe-call': 'off',
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Disallow unsafe declaration merging.
|
|
908
|
+
* @config recommended
|
|
909
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-declaration-merging}
|
|
910
|
+
*/
|
|
911
|
+
// '@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Disallow comparing an enum value with a non-enum value.
|
|
915
|
+
* @config recommended
|
|
916
|
+
* @typeChecked
|
|
917
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-enum-comparison}
|
|
918
|
+
*/
|
|
919
|
+
// '@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Disallow using the unsafe built-in Function type.
|
|
923
|
+
* @config recommended
|
|
924
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-function-type}
|
|
925
|
+
*/
|
|
926
|
+
// '@typescript-eslint/no-unsafe-function-type': 'off',
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Disallow member access on a value with type.
|
|
930
|
+
* @config recommended
|
|
931
|
+
* @typeChecked
|
|
932
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-member-access}
|
|
933
|
+
*/
|
|
934
|
+
// '@typescript-eslint/no-unsafe-member-access': 'off',
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Disallow returning a value with type.
|
|
938
|
+
* @config recommended
|
|
939
|
+
* @typeChecked
|
|
940
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-return}
|
|
941
|
+
*/
|
|
942
|
+
// '@typescript-eslint/no-unsafe-return': 'off',
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* Require unary negation to take a number.
|
|
946
|
+
* @config recommended
|
|
947
|
+
* @typeChecked
|
|
948
|
+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-unary-minus}
|
|
949
|
+
*/
|
|
950
|
+
// '@typescript-eslint/no-unsafe-unary-minus': 'off',
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Disallow unused expressions.
|
|
954
|
+
* @config recommended
|
|
955
|
+
* @extension
|
|
956
|
+
* @see {@link https://typescript-eslint.io/rules/no-unused-expressions}
|
|
957
|
+
*/
|
|
958
|
+
// '@typescript-eslint/no-unused-expressions': 'off',
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Disallow unused variables.
|
|
962
|
+
* @config recommended
|
|
963
|
+
* @extension
|
|
964
|
+
* @see {@link https://typescript-eslint.io/rules/no-unused-vars}
|
|
965
|
+
*/
|
|
966
|
+
'@typescript-eslint/no-unused-vars': [
|
|
967
|
+
'error',
|
|
968
|
+
{
|
|
969
|
+
args: 'all',
|
|
970
|
+
argsIgnorePattern: '^_',
|
|
971
|
+
caughtErrors: 'all',
|
|
972
|
+
caughtErrorsIgnorePattern: '^_',
|
|
973
|
+
destructuredArrayIgnorePattern: '^_',
|
|
974
|
+
varsIgnorePattern: '^_',
|
|
975
|
+
ignoreRestSiblings: true,
|
|
976
|
+
},
|
|
977
|
+
],
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Disallow unnecessary constructors.
|
|
981
|
+
* @config strict
|
|
982
|
+
* @extension
|
|
983
|
+
* @see {@link https://typescript-eslint.io/rules/no-useless-constructor}
|
|
984
|
+
*/
|
|
985
|
+
// '@typescript-eslint/no-useless-constructor': 'off',
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Disallow using confusing built-in primitive class wrappers.
|
|
989
|
+
* @config recommended
|
|
990
|
+
* @fixable
|
|
991
|
+
* @see {@link https://typescript-eslint.io/rules/no-wrapper-object-types}
|
|
992
|
+
*/
|
|
993
|
+
// '@typescript-eslint/no-wrapper-object-types': 'off',
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Enforce non-null assertions over explicit type assertions.
|
|
997
|
+
* @config stylistic
|
|
998
|
+
* @fixable
|
|
999
|
+
* @typeChecked
|
|
1000
|
+
* @see {@link https://typescript-eslint.io/rules/non-nullable-type-assertion-style}
|
|
1001
|
+
*/
|
|
1002
|
+
// '@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Disallow throwing non-.
|
|
1006
|
+
* @config recommended
|
|
1007
|
+
* @typeChecked
|
|
1008
|
+
* @extension
|
|
1009
|
+
* @see {@link https://typescript-eslint.io/rules/only-throw-error}
|
|
1010
|
+
*/
|
|
1011
|
+
// '@typescript-eslint/only-throw-error': 'off',
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Enforce the use of.
|
|
1015
|
+
* @config recommended
|
|
1016
|
+
* @fixable
|
|
1017
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-as-const}
|
|
1018
|
+
*/
|
|
1019
|
+
// '@typescript-eslint/prefer-as-const': 'off',
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
|
|
1023
|
+
* @config stylistic
|
|
1024
|
+
* @typeChecked
|
|
1025
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-find}
|
|
1026
|
+
*/
|
|
1027
|
+
// '@typescript-eslint/prefer-find': 'off',
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Enforce the use of.
|
|
1031
|
+
* @config stylistic
|
|
1032
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-for-of}
|
|
1033
|
+
*/
|
|
1034
|
+
// '@typescript-eslint/prefer-for-of': 'off',
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Enforce using function types instead of interfaces with call signatures.
|
|
1038
|
+
* @config stylistic
|
|
1039
|
+
* @fixable
|
|
1040
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-function-type}
|
|
1041
|
+
*/
|
|
1042
|
+
// '@typescript-eslint/prefer-function-type': 'off',
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Enforce.
|
|
1046
|
+
* @config stylistic
|
|
1047
|
+
* @fixable
|
|
1048
|
+
* @typeChecked
|
|
1049
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-includes}
|
|
1050
|
+
*/
|
|
1051
|
+
// '@typescript-eslint/prefer-includes': 'off',
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Require all enum members to be literal values.
|
|
1055
|
+
* @config strict
|
|
1056
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-literal-enum-member}
|
|
1057
|
+
*/
|
|
1058
|
+
// '@typescript-eslint/prefer-literal-enum-member': 'off',
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Require using.
|
|
1062
|
+
* @config recommended
|
|
1063
|
+
* @fixable
|
|
1064
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-namespace-keyword}
|
|
1065
|
+
*/
|
|
1066
|
+
// '@typescript-eslint/prefer-namespace-keyword': 'off',
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
1070
|
+
* @config stylistic
|
|
1071
|
+
* @typeChecked
|
|
1072
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-nullish-coalescing}
|
|
1073
|
+
*/
|
|
1074
|
+
// '@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
|
|
1078
|
+
* @config stylistic
|
|
1079
|
+
* @fixable
|
|
1080
|
+
* @typeChecked
|
|
1081
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-optional-chain}
|
|
1082
|
+
*/
|
|
1083
|
+
// '@typescript-eslint/prefer-optional-chain': 'off',
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Require using Error objects as Promise rejection reasons.
|
|
1087
|
+
* @config recommended
|
|
1088
|
+
* @typeChecked
|
|
1089
|
+
* @extension
|
|
1090
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-promise-reject-errors}
|
|
1091
|
+
*/
|
|
1092
|
+
// '@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Enforce using type parameter when calling.
|
|
1096
|
+
* @config strict
|
|
1097
|
+
* @fixable
|
|
1098
|
+
* @typeChecked
|
|
1099
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-reduce-type-parameter}
|
|
1100
|
+
*/
|
|
1101
|
+
// '@typescript-eslint/prefer-reduce-type-parameter': 'off',
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Enforce.
|
|
1105
|
+
* @config stylistic
|
|
1106
|
+
* @fixable
|
|
1107
|
+
* @typeChecked
|
|
1108
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-regexp-exec}
|
|
1109
|
+
*/
|
|
1110
|
+
// '@typescript-eslint/prefer-regexp-exec': 'off',
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Enforce that.
|
|
1114
|
+
* @config strict
|
|
1115
|
+
* @fixable
|
|
1116
|
+
* @typeChecked
|
|
1117
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-return-this-type}
|
|
1118
|
+
*/
|
|
1119
|
+
// '@typescript-eslint/prefer-return-this-type': 'off',
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Enforce using.
|
|
1123
|
+
* @config stylistic
|
|
1124
|
+
* @fixable
|
|
1125
|
+
* @typeChecked
|
|
1126
|
+
* @see {@link https://typescript-eslint.io/rules/prefer-string-starts-ends-with}
|
|
1127
|
+
*/
|
|
1128
|
+
// '@typescript-eslint/prefer-string-starts-ends-with': 'off',
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Enforce that.
|
|
1132
|
+
* @config strict
|
|
1133
|
+
* @typeChecked
|
|
1134
|
+
* @see {@link https://typescript-eslint.io/rules/related-getter-setter-pairs}
|
|
1135
|
+
*/
|
|
1136
|
+
// '@typescript-eslint/related-getter-setter-pairs': 'off',
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Disallow async functions which do not return promises and have no.
|
|
1140
|
+
* @config recommended
|
|
1141
|
+
* @typeChecked
|
|
1142
|
+
* @extension
|
|
1143
|
+
* @see {@link https://typescript-eslint.io/rules/require-await}
|
|
1144
|
+
*/
|
|
1145
|
+
// '@typescript-eslint/require-await': 'off',
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Require both operands of addition to be the same type and be.
|
|
1149
|
+
* @config recommended
|
|
1150
|
+
* @typeChecked
|
|
1151
|
+
* @see {@link https://typescript-eslint.io/rules/restrict-plus-operands}
|
|
1152
|
+
*/
|
|
1153
|
+
// '@typescript-eslint/restrict-plus-operands': 'off',
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Enforce template literal expressions to be of.
|
|
1157
|
+
* @config recommended
|
|
1158
|
+
* @typeChecked
|
|
1159
|
+
* @see {@link https://typescript-eslint.io/rules/restrict-template-expressions}
|
|
1160
|
+
*/
|
|
1161
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* Enforce consistent awaiting of returned promises.
|
|
1165
|
+
* @config strict
|
|
1166
|
+
* @fixable
|
|
1167
|
+
* @typeChecked
|
|
1168
|
+
* @see {@link https://typescript-eslint.io/rules/return-await}
|
|
1169
|
+
*/
|
|
1170
|
+
// '@typescript-eslint/return-await': 'off',
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Disallow certain triple slash directives in favor of ES6-style import declarations.
|
|
1174
|
+
* @config recommended
|
|
1175
|
+
* @see {@link https://typescript-eslint.io/rules/triple-slash-reference}
|
|
1176
|
+
*/
|
|
1177
|
+
// '@typescript-eslint/triple-slash-reference': 'off',
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Enforce unbound methods are called with their expected scope.
|
|
1181
|
+
* @config recommended
|
|
1182
|
+
* @typeChecked
|
|
1183
|
+
* @see {@link https://typescript-eslint.io/rules/unbound-method}
|
|
1184
|
+
*/
|
|
1185
|
+
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
|
|
1189
|
+
* @config strict
|
|
1190
|
+
* @see {@link https://typescript-eslint.io/rules/unified-signatures}
|
|
1191
|
+
*/
|
|
1192
|
+
// '@typescript-eslint/unified-signatures': 'off',
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Enforce typing arguments in Promise rejection callbacks as.
|
|
1196
|
+
* @config strict
|
|
1197
|
+
* @typeChecked
|
|
1198
|
+
* @see {@link https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable}
|
|
1199
|
+
*/
|
|
1200
|
+
// '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
|
|
1201
|
+
},
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
name: 'typescript-config-dts',
|
|
1205
|
+
files: ['**/*.d.ts'],
|
|
1206
|
+
rules: {
|
|
1207
|
+
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
1208
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
1209
|
+
},
|
|
1210
|
+
},
|
|
1211
|
+
]);
|