@tsslint/config 3.0.0-alpha.1 → 3.0.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.
@@ -1,4667 +1,3 @@
1
- export interface ESLintRulesConfig {
2
- /**
3
- * Require that function overload signatures be consecutive
4
- * @see https://typescript-eslint.io/rules/adjacent-overload-signatures
5
- */
6
- '@typescript-eslint/adjacent-overload-signatures'?: [],
7
- /**
8
- * Require consistently using either `T[]` or `Array<T>` for arrays
9
- * @see https://typescript-eslint.io/rules/array-type
10
- */
11
- '@typescript-eslint/array-type'?: [({
12
- /**
13
- * The array type expected for mutable cases.
14
- */
15
- default?: Def0_arrayOption,
16
- /**
17
- * The array type expected for readonly cases. If omitted, the value for `default` will be used.
18
- */
19
- readonly?: Def0_arrayOption,
20
- })?],
21
- /**
22
- * Disallow awaiting a value that is not a Thenable
23
- * @see https://typescript-eslint.io/rules/await-thenable
24
- */
25
- '@typescript-eslint/await-thenable'?: [],
26
- /**
27
- * Disallow `@ts-<directive>` comments or require descriptions after directives
28
- * @see https://typescript-eslint.io/rules/ban-ts-comment
29
- */
30
- '@typescript-eslint/ban-ts-comment'?: [({
31
- /**
32
- * A minimum character length for descriptions when `allow-with-description` is enabled.
33
- */
34
- minimumDescriptionLength?: number,
35
- /**
36
- * Whether allow ts-check directives, and with which restrictions.
37
- */
38
- 'ts-check'?: Def1_directiveConfigSchema,
39
- /**
40
- * Whether and when expect-error directives, and with which restrictions.
41
- */
42
- 'ts-expect-error'?: Def1_directiveConfigSchema,
43
- /**
44
- * Whether allow ts-ignore directives, and with which restrictions.
45
- */
46
- 'ts-ignore'?: Def1_directiveConfigSchema,
47
- /**
48
- * Whether allow ts-nocheck directives, and with which restrictions.
49
- */
50
- 'ts-nocheck'?: Def1_directiveConfigSchema,
51
- })?],
52
- /**
53
- * Disallow `// tslint:<rule-flag>` comments
54
- * @see https://typescript-eslint.io/rules/ban-tslint-comment
55
- */
56
- '@typescript-eslint/ban-tslint-comment'?: [],
57
- /**
58
- * Enforce that literals on classes are exposed in a consistent style
59
- * @see https://typescript-eslint.io/rules/class-literal-property-style
60
- */
61
- '@typescript-eslint/class-literal-property-style'?: [("fields" | "getters")?],
62
- /**
63
- * Enforce that class methods utilize `this`
64
- * @see https://typescript-eslint.io/rules/class-methods-use-this
65
- */
66
- '@typescript-eslint/class-methods-use-this'?: [({
67
- /**
68
- * Enforces that functions used as instance field initializers utilize `this`.
69
- */
70
- enforceForClassFields?: boolean,
71
- /**
72
- * Allows specified method names to be ignored with this rule.
73
- */
74
- exceptMethods?: (string)[],
75
- /**
76
- * Whether to ignore class members that are defined within a class that `implements` a type.
77
- */
78
- ignoreClassesThatImplementAnInterface?: boolean | "public-fields",
79
- /**
80
- * Whether to ignore members marked with the `override` modifier.
81
- */
82
- ignoreOverrideMethods?: boolean,
83
- })?],
84
- /**
85
- * Enforce specifying generic type arguments on type annotation or constructor name of a constructor call
86
- * @see https://typescript-eslint.io/rules/consistent-generic-constructors
87
- */
88
- '@typescript-eslint/consistent-generic-constructors'?: [("type-annotation" | "constructor")?],
89
- /**
90
- * Require or disallow the `Record` type
91
- * @see https://typescript-eslint.io/rules/consistent-indexed-object-style
92
- */
93
- '@typescript-eslint/consistent-indexed-object-style'?: [("record" | "index-signature")?],
94
- /**
95
- * Require `return` statements to either always or never specify values
96
- * @see https://typescript-eslint.io/rules/consistent-return
97
- */
98
- '@typescript-eslint/consistent-return'?: [({
99
- treatUndefinedAsUnspecified?: boolean,
100
- })?],
101
- /**
102
- * Enforce consistent usage of type assertions
103
- * @see https://typescript-eslint.io/rules/consistent-type-assertions
104
- */
105
- '@typescript-eslint/consistent-type-assertions'?: [({
106
- /**
107
- * The expected assertion style to enforce.
108
- */
109
- assertionStyle: "never",
110
- } | {
111
- /**
112
- * Whether to always prefer type declarations for array literals used as variable initializers, rather than type assertions.
113
- */
114
- arrayLiteralTypeAssertions?: "allow" | "allow-as-parameter" | "never",
115
- /**
116
- * The expected assertion style to enforce.
117
- */
118
- assertionStyle?: "as" | "angle-bracket",
119
- /**
120
- * Whether to always prefer type declarations for object literals used as variable initializers, rather than type assertions.
121
- */
122
- objectLiteralTypeAssertions?: "allow" | "allow-as-parameter" | "never",
123
- })?],
124
- /**
125
- * Enforce type definitions to consistently use either `interface` or `type`
126
- * @see https://typescript-eslint.io/rules/consistent-type-definitions
127
- */
128
- '@typescript-eslint/consistent-type-definitions'?: [("interface" | "type")?],
129
- /**
130
- * Enforce consistent usage of type exports
131
- * @see https://typescript-eslint.io/rules/consistent-type-exports
132
- */
133
- '@typescript-eslint/consistent-type-exports'?: [({
134
- /**
135
- * Whether the rule will autofix "mixed" export cases using TS inline type specifiers.
136
- */
137
- fixMixedExportsWithInlineTypeSpecifier?: boolean,
138
- })?],
139
- /**
140
- * Enforce consistent usage of type imports
141
- * @see https://typescript-eslint.io/rules/consistent-type-imports
142
- */
143
- '@typescript-eslint/consistent-type-imports'?: [({
144
- /**
145
- * Whether to disallow type imports in type annotations (`import()`).
146
- */
147
- disallowTypeAnnotations?: boolean,
148
- /**
149
- * The expected type modifier to be added when an import is detected as used only in the type position.
150
- */
151
- fixStyle?: "separate-type-imports" | "inline-type-imports",
152
- /**
153
- * The expected import kind for type-only imports.
154
- */
155
- prefer?: "type-imports" | "no-type-imports",
156
- })?],
157
- /**
158
- * Enforce default parameters to be last
159
- * @see https://typescript-eslint.io/rules/default-param-last
160
- */
161
- '@typescript-eslint/default-param-last'?: [],
162
- /**
163
- * Enforce dot notation whenever possible
164
- * @see https://typescript-eslint.io/rules/dot-notation
165
- */
166
- '@typescript-eslint/dot-notation'?: [({
167
- /**
168
- * Whether to allow accessing properties matching an index signature with array notation.
169
- */
170
- allowIndexSignaturePropertyAccess?: boolean,
171
- /**
172
- * Whether to allow keywords such as ["class"]`.
173
- */
174
- allowKeywords?: boolean,
175
- /**
176
- * Regular expression of names to allow.
177
- */
178
- allowPattern?: string,
179
- /**
180
- * Whether to allow accessing class members marked as `private` with array notation.
181
- */
182
- allowPrivateClassPropertyAccess?: boolean,
183
- /**
184
- * Whether to allow accessing class members marked as `protected` with array notation.
185
- */
186
- allowProtectedClassPropertyAccess?: boolean,
187
- })?],
188
- /**
189
- * Require explicit return types on functions and class methods
190
- * @see https://typescript-eslint.io/rules/explicit-function-return-type
191
- */
192
- '@typescript-eslint/explicit-function-return-type'?: [({
193
- /**
194
- * Whether to allow arrow functions that start with the `void` keyword.
195
- */
196
- allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean,
197
- /**
198
- * Whether to ignore arrow functions immediately returning a `as const` value.
199
- */
200
- allowDirectConstAssertionInArrowFunctions?: boolean,
201
- /**
202
- * An array of function/method names that will not have their arguments or return values checked.
203
- */
204
- allowedNames?: (string)[],
205
- /**
206
- * Whether to ignore function expressions (functions which are not part of a declaration).
207
- */
208
- allowExpressions?: boolean,
209
- /**
210
- * Whether to ignore functions that don't have generic type parameters.
211
- */
212
- allowFunctionsWithoutTypeParameters?: boolean,
213
- /**
214
- * Whether to ignore functions immediately returning another function expression.
215
- */
216
- allowHigherOrderFunctions?: boolean,
217
- /**
218
- * Whether to ignore immediately invoked function expressions (IIFEs).
219
- */
220
- allowIIFEs?: boolean,
221
- /**
222
- * Whether to ignore type annotations on the variable of function expressions.
223
- */
224
- allowTypedFunctionExpressions?: boolean,
225
- })?],
226
- /**
227
- * Require explicit accessibility modifiers on class properties and methods
228
- * @see https://typescript-eslint.io/rules/explicit-member-accessibility
229
- */
230
- '@typescript-eslint/explicit-member-accessibility'?: [({
231
- /**
232
- * Which accessibility modifier is required to exist or not exist.
233
- */
234
- accessibility?: Def2_accessibilityLevel,
235
- /**
236
- * Specific method names that may be ignored.
237
- */
238
- ignoredMethodNames?: (string)[],
239
- /**
240
- * Changes to required accessibility modifiers for specific kinds of class members.
241
- */
242
- overrides?: {
243
- /**
244
- * Which member accessibility modifier requirements to apply for accessors.
245
- */
246
- accessors?: Def2_accessibilityLevel,
247
- /**
248
- * Which member accessibility modifier requirements to apply for constructors.
249
- */
250
- constructors?: Def2_accessibilityLevel,
251
- /**
252
- * Which member accessibility modifier requirements to apply for methods.
253
- */
254
- methods?: Def2_accessibilityLevel,
255
- /**
256
- * Which member accessibility modifier requirements to apply for parameterProperties.
257
- */
258
- parameterProperties?: Def2_accessibilityLevel,
259
- /**
260
- * Which member accessibility modifier requirements to apply for properties.
261
- */
262
- properties?: Def2_accessibilityLevel,
263
- },
264
- })?],
265
- /**
266
- * Require explicit return and argument types on exported functions' and classes' public class methods
267
- * @see https://typescript-eslint.io/rules/explicit-module-boundary-types
268
- */
269
- '@typescript-eslint/explicit-module-boundary-types'?: [({
270
- /**
271
- * Whether to ignore arguments that are explicitly typed as `any`.
272
- */
273
- allowArgumentsExplicitlyTypedAsAny?: boolean,
274
- /**
275
- * Whether to ignore return type annotations on body-less arrow functions that return an `as const` type assertion.
276
- You must still type the parameters of the function.
277
- */
278
- allowDirectConstAssertionInArrowFunctions?: boolean,
279
- /**
280
- * An array of function/method names that will not have their arguments or return values checked.
281
- */
282
- allowedNames?: (string)[],
283
- /**
284
- * Whether to ignore return type annotations on functions immediately returning another function expression.
285
- You must still type the parameters of the function.
286
- */
287
- allowHigherOrderFunctions?: boolean,
288
- /**
289
- * Whether to ignore return type annotations on functions with overload signatures.
290
- */
291
- allowOverloadFunctions?: boolean,
292
- /**
293
- * Whether to ignore type annotations on the variable of a function expression.
294
- */
295
- allowTypedFunctionExpressions?: boolean,
296
- })?],
297
- /**
298
- * Require or disallow initialization in variable declarations
299
- * @see https://typescript-eslint.io/rules/init-declarations
300
- */
301
- '@typescript-eslint/init-declarations'?: ["always"] | ["never", {
302
- ignoreForLoopInit?: boolean,
303
- }],
304
- /**
305
- * Enforce a maximum number of parameters in function definitions
306
- * @see https://typescript-eslint.io/rules/max-params
307
- */
308
- '@typescript-eslint/max-params'?: [({
309
- /**
310
- * Whether to count a `this` declaration when the type is `void`.
311
- */
312
- countVoidThis?: boolean,
313
- /**
314
- * A maximum number of parameters in function definitions.
315
- */
316
- max?: number,
317
- /**
318
- * (deprecated) A maximum number of parameters in function definitions.
319
- */
320
- maximum?: number,
321
- })?],
322
- /**
323
- * Require a consistent member declaration order
324
- * @see https://typescript-eslint.io/rules/member-ordering
325
- */
326
- '@typescript-eslint/member-ordering'?: [({
327
- /**
328
- * Which ordering to enforce for classes.
329
- */
330
- classes?: Def3_baseConfig,
331
- /**
332
- * Which ordering to enforce for classExpressions.
333
- */
334
- classExpressions?: Def3_baseConfig,
335
- /**
336
- * Which ordering to enforce for default.
337
- */
338
- default?: Def3_baseConfig,
339
- /**
340
- * Which ordering to enforce for interfaces.
341
- */
342
- interfaces?: Def7_typesConfig,
343
- /**
344
- * Which ordering to enforce for typeLiterals.
345
- */
346
- typeLiterals?: Def7_typesConfig,
347
- })?],
348
- /**
349
- * Enforce using a particular method signature syntax
350
- * @see https://typescript-eslint.io/rules/method-signature-style
351
- */
352
- '@typescript-eslint/method-signature-style'?: [("property" | "method")?],
353
- /**
354
- * Enforce naming conventions for everything across a codebase
355
- * @see https://typescript-eslint.io/rules/naming-convention
356
- */
357
- '@typescript-eslint/naming-convention'?: ({
358
- custom?: Def9_matchRegexConfig,
359
- failureMessage?: string,
360
- format: Def10_formatOptionsConfig,
361
- leadingUnderscore?: Def12_underscoreOptions,
362
- prefix?: Def13_prefixSuffixConfig,
363
- suffix?: Def13_prefixSuffixConfig,
364
- trailingUnderscore?: Def12_underscoreOptions,
365
- filter?: string | Def9_matchRegexConfig,
366
- modifiers?: ("const" | "readonly" | "static" | "public" | "protected" | "private" | "#private" | "abstract" | "destructured" | "global" | "exported" | "unused" | "requiresQuotes" | "override" | "async" | "default" | "namespace")[],
367
- selector: ("default" | "variableLike" | "memberLike" | "typeLike" | "method" | "property" | "accessor" | "variable" | "function" | "parameter" | "parameterProperty" | "classicAccessor" | "enumMember" | "classMethod" | "objectLiteralMethod" | "typeMethod" | "classProperty" | "objectLiteralProperty" | "typeProperty" | "autoAccessor" | "class" | "interface" | "typeAlias" | "enum" | "typeParameter" | "import")[],
368
- types?: (Def14_typeModifiers)[],
369
- } | {
370
- custom?: Def9_matchRegexConfig,
371
- failureMessage?: string,
372
- format: Def10_formatOptionsConfig,
373
- leadingUnderscore?: Def12_underscoreOptions,
374
- prefix?: Def13_prefixSuffixConfig,
375
- suffix?: Def13_prefixSuffixConfig,
376
- trailingUnderscore?: Def12_underscoreOptions,
377
- filter?: string | Def9_matchRegexConfig,
378
- selector: "default",
379
- modifiers?: ("const" | "readonly" | "static" | "public" | "protected" | "private" | "#private" | "abstract" | "destructured" | "global" | "exported" | "unused" | "requiresQuotes" | "override" | "async" | "default" | "namespace")[],
380
- } | {
381
- custom?: Def9_matchRegexConfig,
382
- failureMessage?: string,
383
- format: Def10_formatOptionsConfig,
384
- leadingUnderscore?: Def12_underscoreOptions,
385
- prefix?: Def13_prefixSuffixConfig,
386
- suffix?: Def13_prefixSuffixConfig,
387
- trailingUnderscore?: Def12_underscoreOptions,
388
- filter?: string | Def9_matchRegexConfig,
389
- selector: "variableLike",
390
- modifiers?: ("unused" | "async")[],
391
- } | {
392
- custom?: Def9_matchRegexConfig,
393
- failureMessage?: string,
394
- format: Def10_formatOptionsConfig,
395
- leadingUnderscore?: Def12_underscoreOptions,
396
- prefix?: Def13_prefixSuffixConfig,
397
- suffix?: Def13_prefixSuffixConfig,
398
- trailingUnderscore?: Def12_underscoreOptions,
399
- filter?: string | Def9_matchRegexConfig,
400
- selector: "variable",
401
- modifiers?: ("const" | "destructured" | "exported" | "global" | "unused" | "async")[],
402
- types?: (Def14_typeModifiers)[],
403
- } | {
404
- custom?: Def9_matchRegexConfig,
405
- failureMessage?: string,
406
- format: Def10_formatOptionsConfig,
407
- leadingUnderscore?: Def12_underscoreOptions,
408
- prefix?: Def13_prefixSuffixConfig,
409
- suffix?: Def13_prefixSuffixConfig,
410
- trailingUnderscore?: Def12_underscoreOptions,
411
- filter?: string | Def9_matchRegexConfig,
412
- selector: "function",
413
- modifiers?: ("exported" | "global" | "unused" | "async")[],
414
- } | {
415
- custom?: Def9_matchRegexConfig,
416
- failureMessage?: string,
417
- format: Def10_formatOptionsConfig,
418
- leadingUnderscore?: Def12_underscoreOptions,
419
- prefix?: Def13_prefixSuffixConfig,
420
- suffix?: Def13_prefixSuffixConfig,
421
- trailingUnderscore?: Def12_underscoreOptions,
422
- filter?: string | Def9_matchRegexConfig,
423
- selector: "parameter",
424
- modifiers?: ("destructured" | "unused")[],
425
- types?: (Def14_typeModifiers)[],
426
- } | {
427
- custom?: Def9_matchRegexConfig,
428
- failureMessage?: string,
429
- format: Def10_formatOptionsConfig,
430
- leadingUnderscore?: Def12_underscoreOptions,
431
- prefix?: Def13_prefixSuffixConfig,
432
- suffix?: Def13_prefixSuffixConfig,
433
- trailingUnderscore?: Def12_underscoreOptions,
434
- filter?: string | Def9_matchRegexConfig,
435
- selector: "memberLike",
436
- modifiers?: ("abstract" | "private" | "#private" | "protected" | "public" | "readonly" | "requiresQuotes" | "static" | "override" | "async")[],
437
- } | {
438
- custom?: Def9_matchRegexConfig,
439
- failureMessage?: string,
440
- format: Def10_formatOptionsConfig,
441
- leadingUnderscore?: Def12_underscoreOptions,
442
- prefix?: Def13_prefixSuffixConfig,
443
- suffix?: Def13_prefixSuffixConfig,
444
- trailingUnderscore?: Def12_underscoreOptions,
445
- filter?: string | Def9_matchRegexConfig,
446
- selector: "classProperty",
447
- modifiers?: ("abstract" | "private" | "#private" | "protected" | "public" | "readonly" | "requiresQuotes" | "static" | "override")[],
448
- types?: (Def14_typeModifiers)[],
449
- } | {
450
- custom?: Def9_matchRegexConfig,
451
- failureMessage?: string,
452
- format: Def10_formatOptionsConfig,
453
- leadingUnderscore?: Def12_underscoreOptions,
454
- prefix?: Def13_prefixSuffixConfig,
455
- suffix?: Def13_prefixSuffixConfig,
456
- trailingUnderscore?: Def12_underscoreOptions,
457
- filter?: string | Def9_matchRegexConfig,
458
- selector: "objectLiteralProperty",
459
- modifiers?: ("public" | "requiresQuotes")[],
460
- types?: (Def14_typeModifiers)[],
461
- } | {
462
- custom?: Def9_matchRegexConfig,
463
- failureMessage?: string,
464
- format: Def10_formatOptionsConfig,
465
- leadingUnderscore?: Def12_underscoreOptions,
466
- prefix?: Def13_prefixSuffixConfig,
467
- suffix?: Def13_prefixSuffixConfig,
468
- trailingUnderscore?: Def12_underscoreOptions,
469
- filter?: string | Def9_matchRegexConfig,
470
- selector: "typeProperty",
471
- modifiers?: ("public" | "readonly" | "requiresQuotes")[],
472
- types?: (Def14_typeModifiers)[],
473
- } | {
474
- custom?: Def9_matchRegexConfig,
475
- failureMessage?: string,
476
- format: Def10_formatOptionsConfig,
477
- leadingUnderscore?: Def12_underscoreOptions,
478
- prefix?: Def13_prefixSuffixConfig,
479
- suffix?: Def13_prefixSuffixConfig,
480
- trailingUnderscore?: Def12_underscoreOptions,
481
- filter?: string | Def9_matchRegexConfig,
482
- selector: "parameterProperty",
483
- modifiers?: ("private" | "protected" | "public" | "readonly")[],
484
- types?: (Def14_typeModifiers)[],
485
- } | {
486
- custom?: Def9_matchRegexConfig,
487
- failureMessage?: string,
488
- format: Def10_formatOptionsConfig,
489
- leadingUnderscore?: Def12_underscoreOptions,
490
- prefix?: Def13_prefixSuffixConfig,
491
- suffix?: Def13_prefixSuffixConfig,
492
- trailingUnderscore?: Def12_underscoreOptions,
493
- filter?: string | Def9_matchRegexConfig,
494
- selector: "property",
495
- modifiers?: ("abstract" | "private" | "#private" | "protected" | "public" | "readonly" | "requiresQuotes" | "static" | "override" | "async")[],
496
- types?: (Def14_typeModifiers)[],
497
- } | {
498
- custom?: Def9_matchRegexConfig,
499
- failureMessage?: string,
500
- format: Def10_formatOptionsConfig,
501
- leadingUnderscore?: Def12_underscoreOptions,
502
- prefix?: Def13_prefixSuffixConfig,
503
- suffix?: Def13_prefixSuffixConfig,
504
- trailingUnderscore?: Def12_underscoreOptions,
505
- filter?: string | Def9_matchRegexConfig,
506
- selector: "classMethod",
507
- modifiers?: ("abstract" | "private" | "#private" | "protected" | "public" | "requiresQuotes" | "static" | "override" | "async")[],
508
- } | {
509
- custom?: Def9_matchRegexConfig,
510
- failureMessage?: string,
511
- format: Def10_formatOptionsConfig,
512
- leadingUnderscore?: Def12_underscoreOptions,
513
- prefix?: Def13_prefixSuffixConfig,
514
- suffix?: Def13_prefixSuffixConfig,
515
- trailingUnderscore?: Def12_underscoreOptions,
516
- filter?: string | Def9_matchRegexConfig,
517
- selector: "objectLiteralMethod",
518
- modifiers?: ("public" | "requiresQuotes" | "async")[],
519
- } | {
520
- custom?: Def9_matchRegexConfig,
521
- failureMessage?: string,
522
- format: Def10_formatOptionsConfig,
523
- leadingUnderscore?: Def12_underscoreOptions,
524
- prefix?: Def13_prefixSuffixConfig,
525
- suffix?: Def13_prefixSuffixConfig,
526
- trailingUnderscore?: Def12_underscoreOptions,
527
- filter?: string | Def9_matchRegexConfig,
528
- selector: "typeMethod",
529
- modifiers?: ("public" | "requiresQuotes")[],
530
- } | {
531
- custom?: Def9_matchRegexConfig,
532
- failureMessage?: string,
533
- format: Def10_formatOptionsConfig,
534
- leadingUnderscore?: Def12_underscoreOptions,
535
- prefix?: Def13_prefixSuffixConfig,
536
- suffix?: Def13_prefixSuffixConfig,
537
- trailingUnderscore?: Def12_underscoreOptions,
538
- filter?: string | Def9_matchRegexConfig,
539
- selector: "method",
540
- modifiers?: ("abstract" | "private" | "#private" | "protected" | "public" | "requiresQuotes" | "static" | "override" | "async")[],
541
- } | {
542
- custom?: Def9_matchRegexConfig,
543
- failureMessage?: string,
544
- format: Def10_formatOptionsConfig,
545
- leadingUnderscore?: Def12_underscoreOptions,
546
- prefix?: Def13_prefixSuffixConfig,
547
- suffix?: Def13_prefixSuffixConfig,
548
- trailingUnderscore?: Def12_underscoreOptions,
549
- filter?: string | Def9_matchRegexConfig,
550
- selector: "classicAccessor",
551
- modifiers?: ("abstract" | "private" | "protected" | "public" | "requiresQuotes" | "static" | "override")[],
552
- types?: (Def14_typeModifiers)[],
553
- } | {
554
- custom?: Def9_matchRegexConfig,
555
- failureMessage?: string,
556
- format: Def10_formatOptionsConfig,
557
- leadingUnderscore?: Def12_underscoreOptions,
558
- prefix?: Def13_prefixSuffixConfig,
559
- suffix?: Def13_prefixSuffixConfig,
560
- trailingUnderscore?: Def12_underscoreOptions,
561
- filter?: string | Def9_matchRegexConfig,
562
- selector: "autoAccessor",
563
- modifiers?: ("abstract" | "private" | "protected" | "public" | "requiresQuotes" | "static" | "override")[],
564
- types?: (Def14_typeModifiers)[],
565
- } | {
566
- custom?: Def9_matchRegexConfig,
567
- failureMessage?: string,
568
- format: Def10_formatOptionsConfig,
569
- leadingUnderscore?: Def12_underscoreOptions,
570
- prefix?: Def13_prefixSuffixConfig,
571
- suffix?: Def13_prefixSuffixConfig,
572
- trailingUnderscore?: Def12_underscoreOptions,
573
- filter?: string | Def9_matchRegexConfig,
574
- selector: "accessor",
575
- modifiers?: ("abstract" | "private" | "protected" | "public" | "requiresQuotes" | "static" | "override")[],
576
- types?: (Def14_typeModifiers)[],
577
- } | {
578
- custom?: Def9_matchRegexConfig,
579
- failureMessage?: string,
580
- format: Def10_formatOptionsConfig,
581
- leadingUnderscore?: Def12_underscoreOptions,
582
- prefix?: Def13_prefixSuffixConfig,
583
- suffix?: Def13_prefixSuffixConfig,
584
- trailingUnderscore?: Def12_underscoreOptions,
585
- filter?: string | Def9_matchRegexConfig,
586
- selector: "enumMember",
587
- modifiers?: ("requiresQuotes")[],
588
- } | {
589
- custom?: Def9_matchRegexConfig,
590
- failureMessage?: string,
591
- format: Def10_formatOptionsConfig,
592
- leadingUnderscore?: Def12_underscoreOptions,
593
- prefix?: Def13_prefixSuffixConfig,
594
- suffix?: Def13_prefixSuffixConfig,
595
- trailingUnderscore?: Def12_underscoreOptions,
596
- filter?: string | Def9_matchRegexConfig,
597
- selector: "typeLike",
598
- modifiers?: ("abstract" | "exported" | "unused")[],
599
- } | {
600
- custom?: Def9_matchRegexConfig,
601
- failureMessage?: string,
602
- format: Def10_formatOptionsConfig,
603
- leadingUnderscore?: Def12_underscoreOptions,
604
- prefix?: Def13_prefixSuffixConfig,
605
- suffix?: Def13_prefixSuffixConfig,
606
- trailingUnderscore?: Def12_underscoreOptions,
607
- filter?: string | Def9_matchRegexConfig,
608
- selector: "class",
609
- modifiers?: ("abstract" | "exported" | "unused")[],
610
- } | {
611
- custom?: Def9_matchRegexConfig,
612
- failureMessage?: string,
613
- format: Def10_formatOptionsConfig,
614
- leadingUnderscore?: Def12_underscoreOptions,
615
- prefix?: Def13_prefixSuffixConfig,
616
- suffix?: Def13_prefixSuffixConfig,
617
- trailingUnderscore?: Def12_underscoreOptions,
618
- filter?: string | Def9_matchRegexConfig,
619
- selector: "interface",
620
- modifiers?: ("exported" | "unused")[],
621
- } | {
622
- custom?: Def9_matchRegexConfig,
623
- failureMessage?: string,
624
- format: Def10_formatOptionsConfig,
625
- leadingUnderscore?: Def12_underscoreOptions,
626
- prefix?: Def13_prefixSuffixConfig,
627
- suffix?: Def13_prefixSuffixConfig,
628
- trailingUnderscore?: Def12_underscoreOptions,
629
- filter?: string | Def9_matchRegexConfig,
630
- selector: "typeAlias",
631
- modifiers?: ("exported" | "unused")[],
632
- } | {
633
- custom?: Def9_matchRegexConfig,
634
- failureMessage?: string,
635
- format: Def10_formatOptionsConfig,
636
- leadingUnderscore?: Def12_underscoreOptions,
637
- prefix?: Def13_prefixSuffixConfig,
638
- suffix?: Def13_prefixSuffixConfig,
639
- trailingUnderscore?: Def12_underscoreOptions,
640
- filter?: string | Def9_matchRegexConfig,
641
- selector: "enum",
642
- modifiers?: ("exported" | "unused")[],
643
- } | {
644
- custom?: Def9_matchRegexConfig,
645
- failureMessage?: string,
646
- format: Def10_formatOptionsConfig,
647
- leadingUnderscore?: Def12_underscoreOptions,
648
- prefix?: Def13_prefixSuffixConfig,
649
- suffix?: Def13_prefixSuffixConfig,
650
- trailingUnderscore?: Def12_underscoreOptions,
651
- filter?: string | Def9_matchRegexConfig,
652
- selector: "typeParameter",
653
- modifiers?: ("unused")[],
654
- } | {
655
- custom?: Def9_matchRegexConfig,
656
- failureMessage?: string,
657
- format: Def10_formatOptionsConfig,
658
- leadingUnderscore?: Def12_underscoreOptions,
659
- prefix?: Def13_prefixSuffixConfig,
660
- suffix?: Def13_prefixSuffixConfig,
661
- trailingUnderscore?: Def12_underscoreOptions,
662
- filter?: string | Def9_matchRegexConfig,
663
- selector: "import",
664
- modifiers?: ("default" | "namespace")[],
665
- })[],
666
- /**
667
- * Disallow generic `Array` constructors
668
- * @see https://typescript-eslint.io/rules/no-array-constructor
669
- */
670
- '@typescript-eslint/no-array-constructor'?: [],
671
- /**
672
- * Disallow using the `delete` operator on array values
673
- * @see https://typescript-eslint.io/rules/no-array-delete
674
- */
675
- '@typescript-eslint/no-array-delete'?: [],
676
- /**
677
- * Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified
678
- * @see https://typescript-eslint.io/rules/no-base-to-string
679
- */
680
- '@typescript-eslint/no-base-to-string'?: [({
681
- /**
682
- * Whether to also check values of type `unknown`
683
- */
684
- checkUnknown?: boolean,
685
- /**
686
- * Stringified type names to ignore.
687
- */
688
- ignoredTypeNames?: (string)[],
689
- })?],
690
- /**
691
- * Disallow non-null assertion in locations that may be confusing
692
- * @see https://typescript-eslint.io/rules/no-confusing-non-null-assertion
693
- */
694
- '@typescript-eslint/no-confusing-non-null-assertion'?: [],
695
- /**
696
- * Require expressions of type void to appear in statement position
697
- * @see https://typescript-eslint.io/rules/no-confusing-void-expression
698
- */
699
- '@typescript-eslint/no-confusing-void-expression'?: [({
700
- /**
701
- * Whether to ignore "shorthand" `() =>` arrow functions: those without `{ ... }` braces.
702
- */
703
- ignoreArrowShorthand?: boolean,
704
- /**
705
- * Whether to ignore returns that start with the `void` operator.
706
- */
707
- ignoreVoidOperator?: boolean,
708
- /**
709
- * Whether to ignore returns from functions with explicit `void` return types and functions with contextual `void` return types.
710
- */
711
- ignoreVoidReturningFunctions?: boolean,
712
- })?],
713
- /**
714
- * Disallow using code marked as `@deprecated`
715
- * @see https://typescript-eslint.io/rules/no-deprecated
716
- */
717
- '@typescript-eslint/no-deprecated'?: [({
718
- /**
719
- * Type specifiers that can be allowed.
720
- */
721
- allow?: (string | {
722
- from: "file",
723
- name: string | (string)[],
724
- path?: string,
725
- } | {
726
- from: "lib",
727
- name: string | (string)[],
728
- } | {
729
- from: "package",
730
- name: string | (string)[],
731
- package: string,
732
- })[],
733
- })?],
734
- /**
735
- * Disallow duplicate class members
736
- * @see https://typescript-eslint.io/rules/no-dupe-class-members
737
- */
738
- '@typescript-eslint/no-dupe-class-members'?: [],
739
- /**
740
- * Disallow duplicate enum member values
741
- * @see https://typescript-eslint.io/rules/no-duplicate-enum-values
742
- */
743
- '@typescript-eslint/no-duplicate-enum-values'?: [],
744
- /**
745
- * Disallow duplicate constituents of union or intersection types
746
- * @see https://typescript-eslint.io/rules/no-duplicate-type-constituents
747
- */
748
- '@typescript-eslint/no-duplicate-type-constituents'?: [({
749
- /**
750
- * Whether to ignore `&` intersections.
751
- */
752
- ignoreIntersections?: boolean,
753
- /**
754
- * Whether to ignore `|` unions.
755
- */
756
- ignoreUnions?: boolean,
757
- })?],
758
- /**
759
- * Disallow using the `delete` operator on computed key expressions
760
- * @see https://typescript-eslint.io/rules/no-dynamic-delete
761
- */
762
- '@typescript-eslint/no-dynamic-delete'?: [],
763
- /**
764
- * Disallow empty functions
765
- * @see https://typescript-eslint.io/rules/no-empty-function
766
- */
767
- '@typescript-eslint/no-empty-function'?: [({
768
- /**
769
- * Locations and kinds of functions that are allowed to be empty.
770
- */
771
- allow?: ("functions" | "arrowFunctions" | "generatorFunctions" | "methods" | "generatorMethods" | "getters" | "setters" | "constructors" | "private-constructors" | "protected-constructors" | "asyncFunctions" | "asyncMethods" | "decoratedFunctions" | "overrideMethods")[],
772
- })?],
773
- /**
774
- * Disallow the declaration of empty interfaces
775
- * @see https://typescript-eslint.io/rules/no-empty-interface
776
- */
777
- '@typescript-eslint/no-empty-interface'?: [({
778
- /**
779
- * Whether to allow empty interfaces that extend a single other interface.
780
- */
781
- allowSingleExtends?: boolean,
782
- })?],
783
- /**
784
- * Disallow accidentally using the "empty object" type
785
- * @see https://typescript-eslint.io/rules/no-empty-object-type
786
- */
787
- '@typescript-eslint/no-empty-object-type'?: [({
788
- /**
789
- * Whether to allow empty interfaces.
790
- */
791
- allowInterfaces?: "always" | "never" | "with-single-extends",
792
- /**
793
- * Whether to allow empty object type literals.
794
- */
795
- allowObjectTypes?: "always" | "never",
796
- /**
797
- * A stringified regular expression to allow interfaces and object type aliases with the configured name.
798
- */
799
- allowWithName?: string,
800
- })?],
801
- /**
802
- * Disallow the `any` type
803
- * @see https://typescript-eslint.io/rules/no-explicit-any
804
- */
805
- '@typescript-eslint/no-explicit-any'?: [({
806
- /**
807
- * Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.
808
- */
809
- fixToUnknown?: boolean,
810
- /**
811
- * Whether to ignore rest parameter arrays.
812
- */
813
- ignoreRestArgs?: boolean,
814
- })?],
815
- /**
816
- * Disallow extra non-null assertions
817
- * @see https://typescript-eslint.io/rules/no-extra-non-null-assertion
818
- */
819
- '@typescript-eslint/no-extra-non-null-assertion'?: [],
820
- /**
821
- * Disallow classes used as namespaces
822
- * @see https://typescript-eslint.io/rules/no-extraneous-class
823
- */
824
- '@typescript-eslint/no-extraneous-class'?: [({
825
- /**
826
- * Whether to allow extraneous classes that contain only a constructor.
827
- */
828
- allowConstructorOnly?: boolean,
829
- /**
830
- * Whether to allow extraneous classes that have no body (i.e. are empty).
831
- */
832
- allowEmpty?: boolean,
833
- /**
834
- * Whether to allow extraneous classes that only contain static members.
835
- */
836
- allowStaticOnly?: boolean,
837
- /**
838
- * Whether to allow extraneous classes that include a decorator.
839
- */
840
- allowWithDecorator?: boolean,
841
- })?],
842
- /**
843
- * Require Promise-like statements to be handled appropriately
844
- * @see https://typescript-eslint.io/rules/no-floating-promises
845
- */
846
- '@typescript-eslint/no-floating-promises'?: [({
847
- /**
848
- * Type specifiers of functions whose calls are safe to float.
849
- */
850
- allowForKnownSafeCalls?: (string | {
851
- from: "file",
852
- name: string | (string)[],
853
- path?: string,
854
- } | {
855
- from: "lib",
856
- name: string | (string)[],
857
- } | {
858
- from: "package",
859
- name: string | (string)[],
860
- package: string,
861
- })[],
862
- /**
863
- * Type specifiers that are known to be safe to float.
864
- */
865
- allowForKnownSafePromises?: (string | {
866
- from: "file",
867
- name: string | (string)[],
868
- path?: string,
869
- } | {
870
- from: "lib",
871
- name: string | (string)[],
872
- } | {
873
- from: "package",
874
- name: string | (string)[],
875
- package: string,
876
- })[],
877
- /**
878
- * Whether to check all "Thenable"s, not just the built-in Promise type.
879
- */
880
- checkThenables?: boolean,
881
- /**
882
- * Whether to ignore async IIFEs (Immediately Invoked Function Expressions).
883
- */
884
- ignoreIIFE?: boolean,
885
- /**
886
- * Whether to ignore `void` expressions.
887
- */
888
- ignoreVoid?: boolean,
889
- })?],
890
- /**
891
- * Disallow iterating over an array with a for-in loop
892
- * @see https://typescript-eslint.io/rules/no-for-in-array
893
- */
894
- '@typescript-eslint/no-for-in-array'?: [],
895
- /**
896
- * Disallow the use of `eval()`-like functions
897
- * @see https://typescript-eslint.io/rules/no-implied-eval
898
- */
899
- '@typescript-eslint/no-implied-eval'?: [],
900
- /**
901
- * Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
902
- * @see https://typescript-eslint.io/rules/no-import-type-side-effects
903
- */
904
- '@typescript-eslint/no-import-type-side-effects'?: [],
905
- /**
906
- * Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean
907
- * @see https://typescript-eslint.io/rules/no-inferrable-types
908
- */
909
- '@typescript-eslint/no-inferrable-types'?: [({
910
- /**
911
- * Whether to ignore function parameters.
912
- */
913
- ignoreParameters?: boolean,
914
- /**
915
- * Whether to ignore class properties.
916
- */
917
- ignoreProperties?: boolean,
918
- })?],
919
- /**
920
- * Disallow `this` keywords outside of classes or class-like objects
921
- * @see https://typescript-eslint.io/rules/no-invalid-this
922
- */
923
- '@typescript-eslint/no-invalid-this'?: [({
924
- capIsConstructor?: boolean,
925
- })?],
926
- /**
927
- * Disallow `void` type outside of generic or return types
928
- * @see https://typescript-eslint.io/rules/no-invalid-void-type
929
- */
930
- '@typescript-eslint/no-invalid-void-type'?: [({
931
- /**
932
- * Whether a `this` parameter of a function may be `void`.
933
- */
934
- allowAsThisParameter?: boolean,
935
- /**
936
- * Whether `void` can be used as a valid value for generic type parameters.
937
- */
938
- allowInGenericTypeArguments?: boolean | (string)[],
939
- })?],
940
- /**
941
- * Disallow function declarations that contain unsafe references inside loop statements
942
- * @see https://typescript-eslint.io/rules/no-loop-func
943
- */
944
- '@typescript-eslint/no-loop-func'?: [],
945
- /**
946
- * Disallow literal numbers that lose precision
947
- * @see https://typescript-eslint.io/rules/no-loss-of-precision
948
- */
949
- '@typescript-eslint/no-loss-of-precision'?: [],
950
- /**
951
- * Disallow magic numbers
952
- * @see https://typescript-eslint.io/rules/no-magic-numbers
953
- */
954
- '@typescript-eslint/no-magic-numbers'?: [({
955
- detectObjects?: boolean,
956
- enforceConst?: boolean,
957
- ignore?: (number | string)[],
958
- ignoreArrayIndexes?: boolean,
959
- ignoreDefaultValues?: boolean,
960
- ignoreClassFieldInitialValues?: boolean,
961
- /**
962
- * Whether enums used in TypeScript are considered okay.
963
- */
964
- ignoreEnums?: boolean,
965
- /**
966
- * Whether numbers used in TypeScript numeric literal types are considered okay.
967
- */
968
- ignoreNumericLiteralTypes?: boolean,
969
- /**
970
- * Whether `readonly` class properties are considered okay.
971
- */
972
- ignoreReadonlyClassProperties?: boolean,
973
- /**
974
- * Whether numbers used to index types are okay.
975
- */
976
- ignoreTypeIndexes?: boolean,
977
- })?],
978
- /**
979
- * Disallow the `void` operator except when used to discard a value
980
- * @see https://typescript-eslint.io/rules/no-meaningless-void-operator
981
- */
982
- '@typescript-eslint/no-meaningless-void-operator'?: [({
983
- /**
984
- * Whether to suggest removing `void` when the argument has type `never`.
985
- */
986
- checkNever?: boolean,
987
- })?],
988
- /**
989
- * Enforce valid definition of `new` and `constructor`
990
- * @see https://typescript-eslint.io/rules/no-misused-new
991
- */
992
- '@typescript-eslint/no-misused-new'?: [],
993
- /**
994
- * Disallow Promises in places not designed to handle them
995
- * @see https://typescript-eslint.io/rules/no-misused-promises
996
- */
997
- '@typescript-eslint/no-misused-promises'?: [({
998
- /**
999
- * Whether to warn when a Promise is provided to conditional statements.
1000
- */
1001
- checksConditionals?: boolean,
1002
- /**
1003
- * Whether to warn when `...` spreading a `Promise`.
1004
- */
1005
- checksSpreads?: boolean,
1006
- /**
1007
- * Whether to warn when a Promise is returned from a function typed as returning `void`.
1008
- */
1009
- checksVoidReturn?: boolean | {
1010
- /**
1011
- * Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns `void`.
1012
- */
1013
- arguments?: boolean,
1014
- /**
1015
- * Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns `void`.
1016
- */
1017
- attributes?: boolean,
1018
- /**
1019
- * Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return `void`.
1020
- */
1021
- inheritedMethods?: boolean,
1022
- /**
1023
- * Disables checking an asynchronous function passed as an object property expected to be a function that returns `void`.
1024
- */
1025
- properties?: boolean,
1026
- /**
1027
- * Disables checking an asynchronous function returned in a function whose return type is a function that returns `void`.
1028
- */
1029
- returns?: boolean,
1030
- /**
1031
- * Disables checking an asynchronous function used as a variable whose return type is a function that returns `void`.
1032
- */
1033
- variables?: boolean,
1034
- },
1035
- })?],
1036
- /**
1037
- * Disallow using the spread operator when it might cause unexpected behavior
1038
- * @see https://typescript-eslint.io/rules/no-misused-spread
1039
- */
1040
- '@typescript-eslint/no-misused-spread'?: [({
1041
- /**
1042
- * An array of type specifiers that are known to be safe to spread.
1043
- */
1044
- allow?: (string | {
1045
- from: "file",
1046
- name: string | (string)[],
1047
- path?: string,
1048
- } | {
1049
- from: "lib",
1050
- name: string | (string)[],
1051
- } | {
1052
- from: "package",
1053
- name: string | (string)[],
1054
- package: string,
1055
- })[],
1056
- })?],
1057
- /**
1058
- * Disallow enums from having both number and string members
1059
- * @see https://typescript-eslint.io/rules/no-mixed-enums
1060
- */
1061
- '@typescript-eslint/no-mixed-enums'?: [],
1062
- /**
1063
- * Disallow TypeScript namespaces
1064
- * @see https://typescript-eslint.io/rules/no-namespace
1065
- */
1066
- '@typescript-eslint/no-namespace'?: [({
1067
- /**
1068
- * Whether to allow `declare` with custom TypeScript namespaces.
1069
- */
1070
- allowDeclarations?: boolean,
1071
- /**
1072
- * Whether to allow `declare` with custom TypeScript namespaces inside definition files.
1073
- */
1074
- allowDefinitionFiles?: boolean,
1075
- })?],
1076
- /**
1077
- * Disallow non-null assertions in the left operand of a nullish coalescing operator
1078
- * @see https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
1079
- */
1080
- '@typescript-eslint/no-non-null-asserted-nullish-coalescing'?: [],
1081
- /**
1082
- * Disallow non-null assertions after an optional chain expression
1083
- * @see https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
1084
- */
1085
- '@typescript-eslint/no-non-null-asserted-optional-chain'?: [],
1086
- /**
1087
- * Disallow non-null assertions using the `!` postfix operator
1088
- * @see https://typescript-eslint.io/rules/no-non-null-assertion
1089
- */
1090
- '@typescript-eslint/no-non-null-assertion'?: [],
1091
- /**
1092
- * Disallow variable redeclaration
1093
- * @see https://typescript-eslint.io/rules/no-redeclare
1094
- */
1095
- '@typescript-eslint/no-redeclare'?: [({
1096
- /**
1097
- * Whether to report shadowing of built-in global variables.
1098
- */
1099
- builtinGlobals?: boolean,
1100
- /**
1101
- * Whether to ignore declaration merges between certain TypeScript declaration types.
1102
- */
1103
- ignoreDeclarationMerge?: boolean,
1104
- })?],
1105
- /**
1106
- * Disallow members of unions and intersections that do nothing or override type information
1107
- * @see https://typescript-eslint.io/rules/no-redundant-type-constituents
1108
- */
1109
- '@typescript-eslint/no-redundant-type-constituents'?: [],
1110
- /**
1111
- * Disallow invocation of `require()`
1112
- * @see https://typescript-eslint.io/rules/no-require-imports
1113
- */
1114
- '@typescript-eslint/no-require-imports'?: [({
1115
- /**
1116
- * Patterns of import paths to allow requiring from.
1117
- */
1118
- allow?: (string)[],
1119
- /**
1120
- * Allows `require` statements in import declarations.
1121
- */
1122
- allowAsImport?: boolean,
1123
- })?],
1124
- /**
1125
- * Disallow specified modules when loaded by `import`
1126
- * @see https://typescript-eslint.io/rules/no-restricted-imports
1127
- */
1128
- '@typescript-eslint/no-restricted-imports'?: (string | {
1129
- name: string,
1130
- message?: string,
1131
- importNames?: (string)[],
1132
- allowImportNames?: (string)[],
1133
- /**
1134
- * Whether to allow type-only imports for a path.
1135
- */
1136
- allowTypeImports?: boolean,
1137
- })[] | [{
1138
- paths?: (string | {
1139
- name: string,
1140
- message?: string,
1141
- importNames?: (string)[],
1142
- allowImportNames?: (string)[],
1143
- /**
1144
- * Whether to allow type-only imports for a path.
1145
- */
1146
- allowTypeImports?: boolean,
1147
- })[],
1148
- patterns?: (string)[] | ({
1149
- importNames?: (string)[],
1150
- allowImportNames?: (string)[],
1151
- group?: (string)[],
1152
- regex?: string,
1153
- importNamePattern?: string,
1154
- allowImportNamePattern?: string,
1155
- message?: string,
1156
- caseSensitive?: boolean,
1157
- /**
1158
- * Whether to allow type-only imports for a path.
1159
- */
1160
- allowTypeImports?: boolean,
1161
- })[],
1162
- }],
1163
- /**
1164
- * Disallow certain types
1165
- * @see https://typescript-eslint.io/rules/no-restricted-types
1166
- */
1167
- '@typescript-eslint/no-restricted-types'?: [({
1168
- /**
1169
- * An object whose keys are the types you want to ban, and the values are error messages.
1170
- */
1171
- types?: { [key: string]: unknown },
1172
- })?],
1173
- /**
1174
- * Disallow variable declarations from shadowing variables declared in the outer scope
1175
- * @see https://typescript-eslint.io/rules/no-shadow
1176
- */
1177
- '@typescript-eslint/no-shadow'?: [({
1178
- /**
1179
- * Identifier names for which shadowing is allowed.
1180
- */
1181
- allow?: (string)[],
1182
- /**
1183
- * Whether to report shadowing of built-in global variables.
1184
- */
1185
- builtinGlobals?: boolean,
1186
- /**
1187
- * Whether to report shadowing before outer functions or variables are defined.
1188
- */
1189
- hoist?: "all" | "functions" | "functions-and-types" | "never" | "types",
1190
- /**
1191
- * Whether to ignore function parameters named the same as a variable.
1192
- */
1193
- ignoreFunctionTypeParameterNameValueShadow?: boolean,
1194
- /**
1195
- * Whether to ignore the variable initializers when the shadowed variable is presumably still unitialized.
1196
- */
1197
- ignoreOnInitialization?: boolean,
1198
- /**
1199
- * Whether to ignore types named the same as a variable.
1200
- */
1201
- ignoreTypeValueShadow?: boolean,
1202
- })?],
1203
- /**
1204
- * Disallow aliasing `this`
1205
- * @see https://typescript-eslint.io/rules/no-this-alias
1206
- */
1207
- '@typescript-eslint/no-this-alias'?: [({
1208
- /**
1209
- * Whether to ignore destructurings, such as `const { props, state } = this`.
1210
- */
1211
- allowDestructuring?: boolean,
1212
- /**
1213
- * Names to ignore, such as ["self"] for `const self = this;`.
1214
- */
1215
- allowedNames?: (string)[],
1216
- })?],
1217
- /**
1218
- * Disallow type aliases
1219
- * @see https://typescript-eslint.io/rules/no-type-alias
1220
- */
1221
- '@typescript-eslint/no-type-alias'?: [({
1222
- /**
1223
- * Whether to allow direct one-to-one type aliases.
1224
- */
1225
- allowAliases?: Def15_expandedOptions,
1226
- /**
1227
- * Whether to allow type aliases for callbacks.
1228
- */
1229
- allowCallbacks?: Def16_simpleOptions,
1230
- /**
1231
- * Whether to allow type aliases for conditional types.
1232
- */
1233
- allowConditionalTypes?: Def16_simpleOptions,
1234
- /**
1235
- * Whether to allow type aliases with constructors.
1236
- */
1237
- allowConstructors?: Def16_simpleOptions,
1238
- /**
1239
- * Whether to allow type aliases with generic types.
1240
- */
1241
- allowGenerics?: Def16_simpleOptions,
1242
- /**
1243
- * Whether to allow type aliases with object literal types.
1244
- */
1245
- allowLiterals?: Def15_expandedOptions,
1246
- /**
1247
- * Whether to allow type aliases with mapped types.
1248
- */
1249
- allowMappedTypes?: Def15_expandedOptions,
1250
- /**
1251
- * Whether to allow type aliases with tuple types.
1252
- */
1253
- allowTupleTypes?: Def15_expandedOptions,
1254
- })?],
1255
- /**
1256
- * Disallow unnecessary equality comparisons against boolean literals
1257
- * @see https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
1258
- */
1259
- '@typescript-eslint/no-unnecessary-boolean-literal-compare'?: [({
1260
- /**
1261
- * Whether to allow comparisons between nullable boolean variables and `false`.
1262
- */
1263
- allowComparingNullableBooleansToFalse?: boolean,
1264
- /**
1265
- * Whether to allow comparisons between nullable boolean variables and `true`.
1266
- */
1267
- allowComparingNullableBooleansToTrue?: boolean,
1268
- /**
1269
- * Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.
1270
- */
1271
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean,
1272
- })?],
1273
- /**
1274
- * Disallow conditionals where the type is always truthy or always falsy
1275
- * @see https://typescript-eslint.io/rules/no-unnecessary-condition
1276
- */
1277
- '@typescript-eslint/no-unnecessary-condition'?: [({
1278
- /**
1279
- * Whether to ignore constant loop conditions, such as `while (true)`.
1280
- */
1281
- allowConstantLoopConditions?: boolean | "always" | "never" | "only-allowed-literals",
1282
- /**
1283
- * Whether to not error when running with a tsconfig that has strictNullChecks turned.
1284
- */
1285
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean,
1286
- /**
1287
- * Whether to check the asserted argument of a type predicate function for unnecessary conditions
1288
- */
1289
- checkTypePredicates?: boolean,
1290
- })?],
1291
- /**
1292
- * Disallow unnecessary assignment of constructor property parameter
1293
- * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
1294
- */
1295
- '@typescript-eslint/no-unnecessary-parameter-property-assignment'?: [],
1296
- /**
1297
- * Disallow unnecessary namespace qualifiers
1298
- * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier
1299
- */
1300
- '@typescript-eslint/no-unnecessary-qualifier'?: [],
1301
- /**
1302
- * Disallow unnecessary template expressions
1303
- * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression
1304
- */
1305
- '@typescript-eslint/no-unnecessary-template-expression'?: [],
1306
- /**
1307
- * Disallow type arguments that are equal to the default
1308
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments
1309
- */
1310
- '@typescript-eslint/no-unnecessary-type-arguments'?: [],
1311
- /**
1312
- * Disallow type assertions that do not change the type of an expression
1313
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-assertion
1314
- */
1315
- '@typescript-eslint/no-unnecessary-type-assertion'?: [({
1316
- /**
1317
- * Whether to check literal const assertions.
1318
- */
1319
- checkLiteralConstAssertions?: boolean,
1320
- /**
1321
- * A list of type names to ignore.
1322
- */
1323
- typesToIgnore?: (string)[],
1324
- })?],
1325
- /**
1326
- * Disallow unnecessary constraints on generic types
1327
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
1328
- */
1329
- '@typescript-eslint/no-unnecessary-type-constraint'?: [],
1330
- /**
1331
- * Disallow conversion idioms when they do not change the type or value of the expression
1332
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-conversion
1333
- */
1334
- '@typescript-eslint/no-unnecessary-type-conversion'?: [],
1335
- /**
1336
- * Disallow type parameters that aren't used multiple times
1337
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
1338
- */
1339
- '@typescript-eslint/no-unnecessary-type-parameters'?: [],
1340
- /**
1341
- * Disallow calling a function with a value with type `any`
1342
- * @see https://typescript-eslint.io/rules/no-unsafe-argument
1343
- */
1344
- '@typescript-eslint/no-unsafe-argument'?: [],
1345
- /**
1346
- * Disallow assigning a value with type `any` to variables and properties
1347
- * @see https://typescript-eslint.io/rules/no-unsafe-assignment
1348
- */
1349
- '@typescript-eslint/no-unsafe-assignment'?: [],
1350
- /**
1351
- * Disallow calling a value with type `any`
1352
- * @see https://typescript-eslint.io/rules/no-unsafe-call
1353
- */
1354
- '@typescript-eslint/no-unsafe-call'?: [],
1355
- /**
1356
- * Disallow unsafe declaration merging
1357
- * @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging
1358
- */
1359
- '@typescript-eslint/no-unsafe-declaration-merging'?: [],
1360
- /**
1361
- * Disallow comparing an enum value with a non-enum value
1362
- * @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
1363
- */
1364
- '@typescript-eslint/no-unsafe-enum-comparison'?: [],
1365
- /**
1366
- * Disallow using the unsafe built-in Function type
1367
- * @see https://typescript-eslint.io/rules/no-unsafe-function-type
1368
- */
1369
- '@typescript-eslint/no-unsafe-function-type'?: [],
1370
- /**
1371
- * Disallow member access on a value with type `any`
1372
- * @see https://typescript-eslint.io/rules/no-unsafe-member-access
1373
- */
1374
- '@typescript-eslint/no-unsafe-member-access'?: [({
1375
- /**
1376
- * Whether to allow `?.` optional chains on `any` values.
1377
- */
1378
- allowOptionalChaining?: boolean,
1379
- })?],
1380
- /**
1381
- * Disallow returning a value with type `any` from a function
1382
- * @see https://typescript-eslint.io/rules/no-unsafe-return
1383
- */
1384
- '@typescript-eslint/no-unsafe-return'?: [],
1385
- /**
1386
- * Disallow type assertions that narrow a type
1387
- * @see https://typescript-eslint.io/rules/no-unsafe-type-assertion
1388
- */
1389
- '@typescript-eslint/no-unsafe-type-assertion'?: [],
1390
- /**
1391
- * Require unary negation to take a number
1392
- * @see https://typescript-eslint.io/rules/no-unsafe-unary-minus
1393
- */
1394
- '@typescript-eslint/no-unsafe-unary-minus'?: [],
1395
- /**
1396
- * Disallow unused expressions
1397
- * @see https://typescript-eslint.io/rules/no-unused-expressions
1398
- */
1399
- '@typescript-eslint/no-unused-expressions'?: [({
1400
- allowShortCircuit?: boolean,
1401
- allowTernary?: boolean,
1402
- allowTaggedTemplates?: boolean,
1403
- enforceForJSX?: boolean,
1404
- ignoreDirectives?: boolean,
1405
- })?],
1406
- /**
1407
- * Disallow unused private class members
1408
- * @see https://typescript-eslint.io/rules/no-unused-private-class-members
1409
- */
1410
- '@typescript-eslint/no-unused-private-class-members'?: [],
1411
- /**
1412
- * Disallow unused variables
1413
- * @see https://typescript-eslint.io/rules/no-unused-vars
1414
- */
1415
- '@typescript-eslint/no-unused-vars'?: [("all" | "local" | {
1416
- /**
1417
- * Whether to check all, some, or no arguments.
1418
- */
1419
- args?: "all" | "after-used" | "none",
1420
- /**
1421
- * Regular expressions of argument names to not check for usage.
1422
- */
1423
- argsIgnorePattern?: string,
1424
- /**
1425
- * Whether to check catch block arguments.
1426
- */
1427
- caughtErrors?: "all" | "none",
1428
- /**
1429
- * Regular expressions of catch block argument names to not check for usage.
1430
- */
1431
- caughtErrorsIgnorePattern?: string,
1432
- /**
1433
- * Regular expressions of destructured array variable names to not check for usage.
1434
- */
1435
- destructuredArrayIgnorePattern?: string,
1436
- /**
1437
- * Configurable automatic fixes for different types of unused variables.
1438
- */
1439
- enableAutofixRemoval?: {
1440
- /**
1441
- * Whether to enable automatic removal of unused imports.
1442
- */
1443
- imports?: boolean,
1444
- },
1445
- /**
1446
- * Whether to ignore classes with at least one static initialization block.
1447
- */
1448
- ignoreClassWithStaticInitBlock?: boolean,
1449
- /**
1450
- * Whether to ignore sibling properties in `...` destructurings.
1451
- */
1452
- ignoreRestSiblings?: boolean,
1453
- /**
1454
- * Whether to ignore using or await using declarations.
1455
- */
1456
- ignoreUsingDeclarations?: boolean,
1457
- /**
1458
- * Whether to report variables that match any of the valid ignore pattern options if they have been used.
1459
- */
1460
- reportUsedIgnorePattern?: boolean,
1461
- /**
1462
- * Whether to check all variables or only locally-declared variables.
1463
- */
1464
- vars?: "all" | "local",
1465
- /**
1466
- * Regular expressions of variable names to not check for usage.
1467
- */
1468
- varsIgnorePattern?: string,
1469
- })?],
1470
- /**
1471
- * Disallow the use of variables before they are defined
1472
- * @see https://typescript-eslint.io/rules/no-use-before-define
1473
- */
1474
- '@typescript-eslint/no-use-before-define'?: [("nofunc" | {
1475
- /**
1476
- * Whether to ignore named exports.
1477
- */
1478
- allowNamedExports?: boolean,
1479
- /**
1480
- * Whether to ignore references to class declarations.
1481
- */
1482
- classes?: boolean,
1483
- /**
1484
- * Whether to check references to enums.
1485
- */
1486
- enums?: boolean,
1487
- /**
1488
- * Whether to ignore references to function declarations.
1489
- */
1490
- functions?: boolean,
1491
- /**
1492
- * Whether to ignore type references, such as in type annotations and assertions.
1493
- */
1494
- ignoreTypeReferences?: boolean,
1495
- /**
1496
- * Whether to check references to types.
1497
- */
1498
- typedefs?: boolean,
1499
- /**
1500
- * Whether to ignore references to variables.
1501
- */
1502
- variables?: boolean,
1503
- })?],
1504
- /**
1505
- * Disallow unnecessary constructors
1506
- * @see https://typescript-eslint.io/rules/no-useless-constructor
1507
- */
1508
- '@typescript-eslint/no-useless-constructor'?: [],
1509
- /**
1510
- * Disallow default values that will never be used
1511
- * @see https://typescript-eslint.io/rules/no-useless-default-assignment
1512
- */
1513
- '@typescript-eslint/no-useless-default-assignment'?: [],
1514
- /**
1515
- * Disallow empty exports that don't change anything in a module file
1516
- * @see https://typescript-eslint.io/rules/no-useless-empty-export
1517
- */
1518
- '@typescript-eslint/no-useless-empty-export'?: [],
1519
- /**
1520
- * Disallow `require` statements except in import statements
1521
- * @see https://typescript-eslint.io/rules/no-var-requires
1522
- */
1523
- '@typescript-eslint/no-var-requires'?: [({
1524
- /**
1525
- * Patterns of import paths to allow requiring from.
1526
- */
1527
- allow?: (string)[],
1528
- })?],
1529
- /**
1530
- * Disallow using confusing built-in primitive class wrappers
1531
- * @see https://typescript-eslint.io/rules/no-wrapper-object-types
1532
- */
1533
- '@typescript-eslint/no-wrapper-object-types'?: [],
1534
- /**
1535
- * Enforce non-null assertions over explicit type assertions
1536
- * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style
1537
- */
1538
- '@typescript-eslint/non-nullable-type-assertion-style'?: [],
1539
- /**
1540
- * Disallow throwing non-`Error` values as exceptions
1541
- * @see https://typescript-eslint.io/rules/only-throw-error
1542
- */
1543
- '@typescript-eslint/only-throw-error'?: [({
1544
- /**
1545
- * Type specifiers that can be thrown.
1546
- */
1547
- allow?: (string | {
1548
- from: "file",
1549
- name: string | (string)[],
1550
- path?: string,
1551
- } | {
1552
- from: "lib",
1553
- name: string | (string)[],
1554
- } | {
1555
- from: "package",
1556
- name: string | (string)[],
1557
- package: string,
1558
- })[],
1559
- /**
1560
- * Whether to allow rethrowing caught values that are not `Error` objects.
1561
- */
1562
- allowRethrowing?: boolean,
1563
- /**
1564
- * Whether to always allow throwing values typed as `any`.
1565
- */
1566
- allowThrowingAny?: boolean,
1567
- /**
1568
- * Whether to always allow throwing values typed as `unknown`.
1569
- */
1570
- allowThrowingUnknown?: boolean,
1571
- })?],
1572
- /**
1573
- * Require or disallow parameter properties in class constructors
1574
- * @see https://typescript-eslint.io/rules/parameter-properties
1575
- */
1576
- '@typescript-eslint/parameter-properties'?: [({
1577
- /**
1578
- * Whether to allow certain kinds of properties to be ignored.
1579
- */
1580
- allow?: (Def17_modifier)[],
1581
- /**
1582
- * Whether to prefer class properties or parameter properties.
1583
- */
1584
- prefer?: "class-property" | "parameter-property",
1585
- })?],
1586
- /**
1587
- * Enforce the use of `as const` over literal type
1588
- * @see https://typescript-eslint.io/rules/prefer-as-const
1589
- */
1590
- '@typescript-eslint/prefer-as-const'?: [],
1591
- /**
1592
- * Require destructuring from arrays and/or objects
1593
- * @see https://typescript-eslint.io/rules/prefer-destructuring
1594
- */
1595
- '@typescript-eslint/prefer-destructuring'?: [({
1596
- AssignmentExpression?: {
1597
- array?: boolean,
1598
- object?: boolean,
1599
- },
1600
- VariableDeclarator?: {
1601
- array?: boolean,
1602
- object?: boolean,
1603
- },
1604
- } | {
1605
- array?: boolean,
1606
- object?: boolean,
1607
- })?, ({
1608
- /**
1609
- * Whether to enforce destructuring on variable declarations with type annotations.
1610
- */
1611
- enforceForDeclarationWithTypeAnnotation?: boolean,
1612
- /**
1613
- * Whether to enforce destructuring that use a different variable name than the property name.
1614
- */
1615
- enforceForRenamedProperties?: boolean,
1616
- })?],
1617
- /**
1618
- * Require each enum member value to be explicitly initialized
1619
- * @see https://typescript-eslint.io/rules/prefer-enum-initializers
1620
- */
1621
- '@typescript-eslint/prefer-enum-initializers'?: [],
1622
- /**
1623
- * Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result
1624
- * @see https://typescript-eslint.io/rules/prefer-find
1625
- */
1626
- '@typescript-eslint/prefer-find'?: [],
1627
- /**
1628
- * Enforce the use of `for-of` loop over the standard `for` loop where possible
1629
- * @see https://typescript-eslint.io/rules/prefer-for-of
1630
- */
1631
- '@typescript-eslint/prefer-for-of'?: [],
1632
- /**
1633
- * Enforce using function types instead of interfaces with call signatures
1634
- * @see https://typescript-eslint.io/rules/prefer-function-type
1635
- */
1636
- '@typescript-eslint/prefer-function-type'?: [],
1637
- /**
1638
- * Enforce `includes` method over `indexOf` method
1639
- * @see https://typescript-eslint.io/rules/prefer-includes
1640
- */
1641
- '@typescript-eslint/prefer-includes'?: [],
1642
- /**
1643
- * Require all enum members to be literal values
1644
- * @see https://typescript-eslint.io/rules/prefer-literal-enum-member
1645
- */
1646
- '@typescript-eslint/prefer-literal-enum-member'?: [({
1647
- /**
1648
- * Whether to allow using bitwise expressions in enum initializers.
1649
- */
1650
- allowBitwiseExpressions?: boolean,
1651
- })?],
1652
- /**
1653
- * Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules
1654
- * @see https://typescript-eslint.io/rules/prefer-namespace-keyword
1655
- */
1656
- '@typescript-eslint/prefer-namespace-keyword'?: [],
1657
- /**
1658
- * Enforce using the nullish coalescing operator instead of logical assignments or chaining
1659
- * @see https://typescript-eslint.io/rules/prefer-nullish-coalescing
1660
- */
1661
- '@typescript-eslint/prefer-nullish-coalescing'?: [({
1662
- /**
1663
- * Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.
1664
- */
1665
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean,
1666
- /**
1667
- * Whether to ignore arguments to the `Boolean` constructor
1668
- */
1669
- ignoreBooleanCoercion?: boolean,
1670
- /**
1671
- * Whether to ignore cases that are located within a conditional test.
1672
- */
1673
- ignoreConditionalTests?: boolean,
1674
- /**
1675
- * Whether to ignore any if statements that could be simplified by using the nullish coalescing operator.
1676
- */
1677
- ignoreIfStatements?: boolean,
1678
- /**
1679
- * Whether to ignore any logical or expressions that are part of a mixed logical expression (with `&&`).
1680
- */
1681
- ignoreMixedLogicalExpressions?: boolean,
1682
- /**
1683
- * Whether to ignore all (`true`) or some (an object with properties) primitive types.
1684
- */
1685
- ignorePrimitives?: {
1686
- /**
1687
- * Ignore bigint primitive types.
1688
- */
1689
- bigint?: boolean,
1690
- /**
1691
- * Ignore boolean primitive types.
1692
- */
1693
- boolean?: boolean,
1694
- /**
1695
- * Ignore number primitive types.
1696
- */
1697
- number?: boolean,
1698
- /**
1699
- * Ignore string primitive types.
1700
- */
1701
- string?: boolean,
1702
- } | true,
1703
- /**
1704
- * Whether to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.
1705
- */
1706
- ignoreTernaryTests?: boolean,
1707
- })?],
1708
- /**
1709
- * Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
1710
- * @see https://typescript-eslint.io/rules/prefer-optional-chain
1711
- */
1712
- '@typescript-eslint/prefer-optional-chain'?: [({
1713
- /**
1714
- * Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.
1715
- */
1716
- allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing?: boolean,
1717
- /**
1718
- * Check operands that are typed as `any` when inspecting "loose boolean" operands.
1719
- */
1720
- checkAny?: boolean,
1721
- /**
1722
- * Check operands that are typed as `bigint` when inspecting "loose boolean" operands.
1723
- */
1724
- checkBigInt?: boolean,
1725
- /**
1726
- * Check operands that are typed as `boolean` when inspecting "loose boolean" operands.
1727
- */
1728
- checkBoolean?: boolean,
1729
- /**
1730
- * Check operands that are typed as `number` when inspecting "loose boolean" operands.
1731
- */
1732
- checkNumber?: boolean,
1733
- /**
1734
- * Check operands that are typed as `string` when inspecting "loose boolean" operands.
1735
- */
1736
- checkString?: boolean,
1737
- /**
1738
- * Check operands that are typed as `unknown` when inspecting "loose boolean" operands.
1739
- */
1740
- checkUnknown?: boolean,
1741
- /**
1742
- * Skip operands that are not typed with `null` and/or `undefined` when inspecting "loose boolean" operands.
1743
- */
1744
- requireNullish?: boolean,
1745
- })?],
1746
- /**
1747
- * Require using Error objects as Promise rejection reasons
1748
- * @see https://typescript-eslint.io/rules/prefer-promise-reject-errors
1749
- */
1750
- '@typescript-eslint/prefer-promise-reject-errors'?: [({
1751
- /**
1752
- * Whether to allow calls to `Promise.reject()` with no arguments.
1753
- */
1754
- allowEmptyReject?: boolean,
1755
- /**
1756
- * Whether to always allow throwing values typed as `any`.
1757
- */
1758
- allowThrowingAny?: boolean,
1759
- /**
1760
- * Whether to always allow throwing values typed as `unknown`.
1761
- */
1762
- allowThrowingUnknown?: boolean,
1763
- })?],
1764
- /**
1765
- * Require private members to be marked as `readonly` if they're never modified outside of the constructor
1766
- * @see https://typescript-eslint.io/rules/prefer-readonly
1767
- */
1768
- '@typescript-eslint/prefer-readonly'?: [({
1769
- /**
1770
- * Whether to restrict checking only to members immediately assigned a lambda value.
1771
- */
1772
- onlyInlineLambdas?: boolean,
1773
- })?],
1774
- /**
1775
- * Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs
1776
- * @see https://typescript-eslint.io/rules/prefer-readonly-parameter-types
1777
- */
1778
- '@typescript-eslint/prefer-readonly-parameter-types'?: [({
1779
- /**
1780
- * An array of type specifiers to ignore.
1781
- */
1782
- allow?: (string | {
1783
- from: "file",
1784
- name: string | (string)[],
1785
- path?: string,
1786
- } | {
1787
- from: "lib",
1788
- name: string | (string)[],
1789
- } | {
1790
- from: "package",
1791
- name: string | (string)[],
1792
- package: string,
1793
- })[],
1794
- /**
1795
- * Whether to check class parameter properties.
1796
- */
1797
- checkParameterProperties?: boolean,
1798
- /**
1799
- * Whether to ignore parameters which don't explicitly specify a type.
1800
- */
1801
- ignoreInferredTypes?: boolean,
1802
- /**
1803
- * Whether to treat all mutable methods as though they are readonly.
1804
- */
1805
- treatMethodsAsReadonly?: boolean,
1806
- })?],
1807
- /**
1808
- * Enforce using type parameter when calling `Array#reduce` instead of using a type assertion
1809
- * @see https://typescript-eslint.io/rules/prefer-reduce-type-parameter
1810
- */
1811
- '@typescript-eslint/prefer-reduce-type-parameter'?: [],
1812
- /**
1813
- * Enforce `RegExp#exec` over `String#match` if no global flag is provided
1814
- * @see https://typescript-eslint.io/rules/prefer-regexp-exec
1815
- */
1816
- '@typescript-eslint/prefer-regexp-exec'?: [],
1817
- /**
1818
- * Enforce that `this` is used when only `this` type is returned
1819
- * @see https://typescript-eslint.io/rules/prefer-return-this-type
1820
- */
1821
- '@typescript-eslint/prefer-return-this-type'?: [],
1822
- /**
1823
- * Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings
1824
- * @see https://typescript-eslint.io/rules/prefer-string-starts-ends-with
1825
- */
1826
- '@typescript-eslint/prefer-string-starts-ends-with'?: [({
1827
- /**
1828
- * Whether to allow equality checks against the first or last element of a string.
1829
- */
1830
- allowSingleElementEquality?: "always" | "never",
1831
- })?],
1832
- /**
1833
- * Enforce using `@ts-expect-error` over `@ts-ignore`
1834
- * @see https://typescript-eslint.io/rules/prefer-ts-expect-error
1835
- */
1836
- '@typescript-eslint/prefer-ts-expect-error'?: [],
1837
- /**
1838
- * Require any function or method that returns a Promise to be marked async
1839
- * @see https://typescript-eslint.io/rules/promise-function-async
1840
- */
1841
- '@typescript-eslint/promise-function-async'?: [({
1842
- /**
1843
- * Whether to consider `any` and `unknown` to be Promises.
1844
- */
1845
- allowAny?: boolean,
1846
- /**
1847
- * Any extra names of classes or interfaces to be considered Promises.
1848
- */
1849
- allowedPromiseNames?: (string)[],
1850
- /**
1851
- * Whether to check arrow functions.
1852
- */
1853
- checkArrowFunctions?: boolean,
1854
- /**
1855
- * Whether to check standalone function declarations.
1856
- */
1857
- checkFunctionDeclarations?: boolean,
1858
- /**
1859
- * Whether to check inline function expressions
1860
- */
1861
- checkFunctionExpressions?: boolean,
1862
- /**
1863
- * Whether to check methods on classes and object literals.
1864
- */
1865
- checkMethodDeclarations?: boolean,
1866
- })?],
1867
- /**
1868
- * Enforce that `get()` types should be assignable to their equivalent `set()` type
1869
- * @see https://typescript-eslint.io/rules/related-getter-setter-pairs
1870
- */
1871
- '@typescript-eslint/related-getter-setter-pairs'?: [],
1872
- /**
1873
- * Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`
1874
- * @see https://typescript-eslint.io/rules/require-array-sort-compare
1875
- */
1876
- '@typescript-eslint/require-array-sort-compare'?: [({
1877
- /**
1878
- * Whether to ignore arrays in which all elements are strings.
1879
- */
1880
- ignoreStringArrays?: boolean,
1881
- })?],
1882
- /**
1883
- * Disallow async functions which do not return promises and have no `await` expression
1884
- * @see https://typescript-eslint.io/rules/require-await
1885
- */
1886
- '@typescript-eslint/require-await'?: [],
1887
- /**
1888
- * Require both operands of addition to be the same type and be `bigint`, `number`, or `string`
1889
- * @see https://typescript-eslint.io/rules/restrict-plus-operands
1890
- */
1891
- '@typescript-eslint/restrict-plus-operands'?: [({
1892
- /**
1893
- * Whether to allow `any` typed values.
1894
- */
1895
- allowAny?: boolean,
1896
- /**
1897
- * Whether to allow `boolean` typed values.
1898
- */
1899
- allowBoolean?: boolean,
1900
- /**
1901
- * Whether to allow potentially `null` or `undefined` typed values.
1902
- */
1903
- allowNullish?: boolean,
1904
- /**
1905
- * Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.
1906
- */
1907
- allowNumberAndString?: boolean,
1908
- /**
1909
- * Whether to allow `regexp` typed values.
1910
- */
1911
- allowRegExp?: boolean,
1912
- /**
1913
- * Whether to skip compound assignments such as `+=`.
1914
- */
1915
- skipCompoundAssignments?: boolean,
1916
- })?],
1917
- /**
1918
- * Enforce template literal expressions to be of `string` type
1919
- * @see https://typescript-eslint.io/rules/restrict-template-expressions
1920
- */
1921
- '@typescript-eslint/restrict-template-expressions'?: [({
1922
- /**
1923
- * Whether to allow `any` typed values in template expressions.
1924
- */
1925
- allowAny?: boolean,
1926
- /**
1927
- * Whether to allow `array` typed values in template expressions.
1928
- */
1929
- allowArray?: boolean,
1930
- /**
1931
- * Whether to allow `boolean` typed values in template expressions.
1932
- */
1933
- allowBoolean?: boolean,
1934
- /**
1935
- * Whether to allow `nullish` typed values in template expressions.
1936
- */
1937
- allowNullish?: boolean,
1938
- /**
1939
- * Whether to allow `number` typed values in template expressions.
1940
- */
1941
- allowNumber?: boolean,
1942
- /**
1943
- * Whether to allow `regexp` typed values in template expressions.
1944
- */
1945
- allowRegExp?: boolean,
1946
- /**
1947
- * Whether to allow `never` typed values in template expressions.
1948
- */
1949
- allowNever?: boolean,
1950
- /**
1951
- * Types to allow in template expressions.
1952
- */
1953
- allow?: (string | {
1954
- from: "file",
1955
- name: string | (string)[],
1956
- path?: string,
1957
- } | {
1958
- from: "lib",
1959
- name: string | (string)[],
1960
- } | {
1961
- from: "package",
1962
- name: string | (string)[],
1963
- package: string,
1964
- })[],
1965
- })?],
1966
- /**
1967
- * Enforce consistent awaiting of returned promises
1968
- * @see https://typescript-eslint.io/rules/return-await
1969
- */
1970
- '@typescript-eslint/return-await'?: [(string)?],
1971
- /**
1972
- * Enforce constituents of a type union/intersection to be sorted alphabetically
1973
- * @see https://typescript-eslint.io/rules/sort-type-constituents
1974
- */
1975
- '@typescript-eslint/sort-type-constituents'?: [({
1976
- /**
1977
- * Whether to sort using case sensitive string comparisons.
1978
- */
1979
- caseSensitive?: boolean,
1980
- /**
1981
- * Whether to check intersection types (`&`).
1982
- */
1983
- checkIntersections?: boolean,
1984
- /**
1985
- * Whether to check union types (`|`).
1986
- */
1987
- checkUnions?: boolean,
1988
- /**
1989
- * Ordering of the groups.
1990
- */
1991
- groupOrder?: ("conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union")[],
1992
- })?],
1993
- /**
1994
- * Disallow certain types in boolean expressions
1995
- * @see https://typescript-eslint.io/rules/strict-boolean-expressions
1996
- */
1997
- '@typescript-eslint/strict-boolean-expressions'?: [({
1998
- /**
1999
- * Whether to allow `any`s in a boolean context.
2000
- */
2001
- allowAny?: boolean,
2002
- /**
2003
- * Whether to allow nullable `boolean`s in a boolean context.
2004
- */
2005
- allowNullableBoolean?: boolean,
2006
- /**
2007
- * Whether to allow nullable `enum`s in a boolean context.
2008
- */
2009
- allowNullableEnum?: boolean,
2010
- /**
2011
- * Whether to allow nullable `number`s in a boolean context.
2012
- */
2013
- allowNullableNumber?: boolean,
2014
- /**
2015
- * Whether to allow nullable `object`s, `symbol`s, and functions in a boolean context.
2016
- */
2017
- allowNullableObject?: boolean,
2018
- /**
2019
- * Whether to allow nullable `string`s in a boolean context.
2020
- */
2021
- allowNullableString?: boolean,
2022
- /**
2023
- * Whether to allow `number`s in a boolean context.
2024
- */
2025
- allowNumber?: boolean,
2026
- /**
2027
- * Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.
2028
- */
2029
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean,
2030
- /**
2031
- * Whether to allow `string`s in a boolean context.
2032
- */
2033
- allowString?: boolean,
2034
- })?],
2035
- /**
2036
- * Disallow passing a value-returning function in a position accepting a void function
2037
- * @see https://typescript-eslint.io/rules/strict-void-return
2038
- */
2039
- '@typescript-eslint/strict-void-return'?: [({
2040
- /**
2041
- * Whether to allow functions returning `any` to be used in place expecting a `void` function.
2042
- */
2043
- allowReturnAny?: boolean,
2044
- })?],
2045
- /**
2046
- * Require switch-case statements to be exhaustive
2047
- * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check
2048
- */
2049
- '@typescript-eslint/switch-exhaustiveness-check'?: [({
2050
- /**
2051
- * If 'true', allow 'default' cases on switch statements with exhaustive cases.
2052
- */
2053
- allowDefaultCaseForExhaustiveSwitch?: boolean,
2054
- /**
2055
- * If 'true', the 'default' clause is used to determine whether the switch statement is exhaustive for union type
2056
- */
2057
- considerDefaultExhaustiveForUnions?: boolean,
2058
- /**
2059
- * Regular expression for a comment that can indicate an intentionally omitted default case.
2060
- */
2061
- defaultCaseCommentPattern?: string,
2062
- /**
2063
- * If 'true', require a 'default' clause for switches on non-union types.
2064
- */
2065
- requireDefaultForNonUnion?: boolean,
2066
- })?],
2067
- /**
2068
- * Disallow certain triple slash directives in favor of ES6-style import declarations
2069
- * @see https://typescript-eslint.io/rules/triple-slash-reference
2070
- */
2071
- '@typescript-eslint/triple-slash-reference'?: [({
2072
- /**
2073
- * What to enforce for `/// <reference lib="..." />` references.
2074
- */
2075
- lib?: "always" | "never",
2076
- /**
2077
- * What to enforce for `/// <reference path="..." />` references.
2078
- */
2079
- path?: "always" | "never",
2080
- /**
2081
- * What to enforce for `/// <reference types="..." />` references.
2082
- */
2083
- types?: "always" | "never" | "prefer-import",
2084
- })?],
2085
- /**
2086
- * Require type annotations in certain places
2087
- * @see https://typescript-eslint.io/rules/typedef
2088
- */
2089
- '@typescript-eslint/typedef'?: [({
2090
- /**
2091
- * Whether to enforce type annotations on variables declared using array destructuring.
2092
- */
2093
- arrayDestructuring?: boolean,
2094
- /**
2095
- * Whether to enforce type annotations for parameters of arrow functions.
2096
- */
2097
- arrowParameter?: boolean,
2098
- /**
2099
- * Whether to enforce type annotations on member variables of classes.
2100
- */
2101
- memberVariableDeclaration?: boolean,
2102
- /**
2103
- * Whether to enforce type annotations on variables declared using object destructuring.
2104
- */
2105
- objectDestructuring?: boolean,
2106
- /**
2107
- * Whether to enforce type annotations for parameters of functions and methods.
2108
- */
2109
- parameter?: boolean,
2110
- /**
2111
- * Whether to enforce type annotations for properties of interfaces and types.
2112
- */
2113
- propertyDeclaration?: boolean,
2114
- /**
2115
- * Whether to enforce type annotations for variable declarations, excluding array and object destructuring.
2116
- */
2117
- variableDeclaration?: boolean,
2118
- /**
2119
- * Whether to ignore variable declarations for non-arrow and arrow functions.
2120
- */
2121
- variableDeclarationIgnoreFunction?: boolean,
2122
- })?],
2123
- /**
2124
- * Enforce unbound methods are called with their expected scope
2125
- * @see https://typescript-eslint.io/rules/unbound-method
2126
- */
2127
- '@typescript-eslint/unbound-method'?: [({
2128
- /**
2129
- * Whether to skip checking whether `static` methods are correctly bound.
2130
- */
2131
- ignoreStatic?: boolean,
2132
- })?],
2133
- /**
2134
- * Disallow two overloads that could be unified into one with a union or an optional/rest parameter
2135
- * @see https://typescript-eslint.io/rules/unified-signatures
2136
- */
2137
- '@typescript-eslint/unified-signatures'?: [({
2138
- /**
2139
- * Whether two parameters with different names at the same index should be considered different even if their types are the same.
2140
- */
2141
- ignoreDifferentlyNamedParameters?: boolean,
2142
- /**
2143
- * Whether two overloads with different JSDoc comments should be considered different even if their parameter and return types are the same.
2144
- */
2145
- ignoreOverloadsWithDifferentJSDoc?: boolean,
2146
- })?],
2147
- /**
2148
- * Enforce typing arguments in Promise rejection callbacks as `unknown`
2149
- * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
2150
- */
2151
- '@typescript-eslint/use-unknown-in-catch-callback-variable'?: [],
2152
- /**
2153
- * Enforce getter and setter pairs in objects and classes
2154
- * @see https://eslint.org/docs/latest/rules/accessor-pairs
2155
- */
2156
- 'accessor-pairs'?: [({
2157
- getWithoutSet?: boolean,
2158
- setWithoutGet?: boolean,
2159
- enforceForClassMembers?: boolean,
2160
- })?],
2161
- /**
2162
- * Enforce linebreaks after opening and before closing array brackets
2163
- * @see https://eslint.org/docs/latest/rules/array-bracket-newline
2164
- */
2165
- 'array-bracket-newline'?: [("always" | "never" | "consistent" | {
2166
- multiline?: boolean,
2167
- minItems?: number | null,
2168
- })?],
2169
- /**
2170
- * Enforce consistent spacing inside array brackets
2171
- * @see https://eslint.org/docs/latest/rules/array-bracket-spacing
2172
- */
2173
- 'array-bracket-spacing'?: [("always" | "never")?, ({
2174
- singleValue?: boolean,
2175
- objectsInArrays?: boolean,
2176
- arraysInArrays?: boolean,
2177
- })?],
2178
- /**
2179
- * Enforce `return` statements in callbacks of array methods
2180
- * @see https://eslint.org/docs/latest/rules/array-callback-return
2181
- */
2182
- 'array-callback-return'?: [({
2183
- allowImplicit?: boolean,
2184
- checkForEach?: boolean,
2185
- allowVoid?: boolean,
2186
- })?],
2187
- /**
2188
- * Enforce line breaks after each array element
2189
- * @see https://eslint.org/docs/latest/rules/array-element-newline
2190
- */
2191
- 'array-element-newline'?: [Def18_basicConfig | {
2192
- ArrayExpression?: Def18_basicConfig,
2193
- ArrayPattern?: Def18_basicConfig,
2194
- }],
2195
- /**
2196
- * Require braces around arrow function bodies
2197
- * @see https://eslint.org/docs/latest/rules/arrow-body-style
2198
- */
2199
- 'arrow-body-style'?: ["always" | "never"] | ["as-needed", {
2200
- requireReturnForObjectLiteral?: boolean,
2201
- }],
2202
- /**
2203
- * Require parentheses around arrow function arguments
2204
- * @see https://eslint.org/docs/latest/rules/arrow-parens
2205
- */
2206
- 'arrow-parens'?: [("always" | "as-needed")?, ({
2207
- requireForBlockBody?: boolean,
2208
- })?],
2209
- /**
2210
- * Enforce consistent spacing before and after the arrow in arrow functions
2211
- * @see https://eslint.org/docs/latest/rules/arrow-spacing
2212
- */
2213
- 'arrow-spacing'?: [({
2214
- before?: boolean,
2215
- after?: boolean,
2216
- })?],
2217
- /**
2218
- * Enforce the use of variables within the scope they are defined
2219
- * @see https://eslint.org/docs/latest/rules/block-scoped-var
2220
- */
2221
- 'block-scoped-var'?: [],
2222
- /**
2223
- * Disallow or enforce spaces inside of blocks after opening block and before closing block
2224
- * @see https://eslint.org/docs/latest/rules/block-spacing
2225
- */
2226
- 'block-spacing'?: [("always" | "never")?],
2227
- /**
2228
- * Enforce consistent brace style for blocks
2229
- * @see https://eslint.org/docs/latest/rules/brace-style
2230
- */
2231
- 'brace-style'?: [("1tbs" | "stroustrup" | "allman")?, ({
2232
- allowSingleLine?: boolean,
2233
- })?],
2234
- /**
2235
- * Require `return` statements after callbacks
2236
- * @see https://eslint.org/docs/latest/rules/callback-return
2237
- */
2238
- 'callback-return'?: [((string)[])?],
2239
- /**
2240
- * Enforce camelcase naming convention
2241
- * @see https://eslint.org/docs/latest/rules/camelcase
2242
- */
2243
- 'camelcase'?: [({
2244
- ignoreDestructuring?: boolean,
2245
- ignoreImports?: boolean,
2246
- ignoreGlobals?: boolean,
2247
- properties?: "always" | "never",
2248
- allow?: (string)[],
2249
- })?],
2250
- /**
2251
- * Enforce or disallow capitalization of the first letter of a comment
2252
- * @see https://eslint.org/docs/latest/rules/capitalized-comments
2253
- */
2254
- 'capitalized-comments'?: [("always" | "never")?, ({
2255
- ignorePattern?: string,
2256
- ignoreInlineComments?: boolean,
2257
- ignoreConsecutiveComments?: boolean,
2258
- } | {
2259
- line?: {
2260
- ignorePattern?: string,
2261
- ignoreInlineComments?: boolean,
2262
- ignoreConsecutiveComments?: boolean,
2263
- },
2264
- block?: {
2265
- ignorePattern?: string,
2266
- ignoreInlineComments?: boolean,
2267
- ignoreConsecutiveComments?: boolean,
2268
- },
2269
- })?],
2270
- /**
2271
- * Enforce that class methods utilize `this`
2272
- * @see https://eslint.org/docs/latest/rules/class-methods-use-this
2273
- */
2274
- 'class-methods-use-this'?: [({
2275
- exceptMethods?: (string)[],
2276
- enforceForClassFields?: boolean,
2277
- ignoreOverrideMethods?: boolean,
2278
- ignoreClassesWithImplements?: "all" | "public-fields",
2279
- })?],
2280
- /**
2281
- * Require or disallow trailing commas
2282
- * @see https://eslint.org/docs/latest/rules/comma-dangle
2283
- */
2284
- 'comma-dangle'?: [Def19_value | {
2285
- arrays?: Def20_valueWithIgnore,
2286
- objects?: Def20_valueWithIgnore,
2287
- imports?: Def20_valueWithIgnore,
2288
- exports?: Def20_valueWithIgnore,
2289
- functions?: Def20_valueWithIgnore,
2290
- }],
2291
- /**
2292
- * Enforce consistent spacing before and after commas
2293
- * @see https://eslint.org/docs/latest/rules/comma-spacing
2294
- */
2295
- 'comma-spacing'?: [({
2296
- before?: boolean,
2297
- after?: boolean,
2298
- })?],
2299
- /**
2300
- * Enforce consistent comma style
2301
- * @see https://eslint.org/docs/latest/rules/comma-style
2302
- */
2303
- 'comma-style'?: [("first" | "last")?, ({
2304
- exceptions?: { [key: string]: unknown },
2305
- })?],
2306
- /**
2307
- * Enforce a maximum cyclomatic complexity allowed in a program
2308
- * @see https://eslint.org/docs/latest/rules/complexity
2309
- */
2310
- 'complexity'?: [(number | {
2311
- maximum?: number,
2312
- max?: number,
2313
- variant?: "classic" | "modified",
2314
- })?],
2315
- /**
2316
- * Enforce consistent spacing inside computed property brackets
2317
- * @see https://eslint.org/docs/latest/rules/computed-property-spacing
2318
- */
2319
- 'computed-property-spacing'?: [("always" | "never")?, ({
2320
- enforceForClassMembers?: boolean,
2321
- })?],
2322
- /**
2323
- * Require `return` statements to either always or never specify values
2324
- * @see https://eslint.org/docs/latest/rules/consistent-return
2325
- */
2326
- 'consistent-return'?: [({
2327
- treatUndefinedAsUnspecified?: boolean,
2328
- })?],
2329
- /**
2330
- * Enforce consistent naming when capturing the current execution context
2331
- * @see https://eslint.org/docs/latest/rules/consistent-this
2332
- */
2333
- 'consistent-this'?: (string)[],
2334
- /**
2335
- * Require `super()` calls in constructors
2336
- * @see https://eslint.org/docs/latest/rules/constructor-super
2337
- */
2338
- 'constructor-super'?: [],
2339
- /**
2340
- * Enforce consistent brace style for all control statements
2341
- * @see https://eslint.org/docs/latest/rules/curly
2342
- */
2343
- 'curly'?: ["all"] | ["multi" | "multi-line" | "multi-or-nest", "consistent"],
2344
- /**
2345
- * Enforce `default` clauses in `switch` statements to be last
2346
- * @see https://eslint.org/docs/latest/rules/default-case-last
2347
- */
2348
- 'default-case-last'?: [],
2349
- /**
2350
- * Require `default` cases in `switch` statements
2351
- * @see https://eslint.org/docs/latest/rules/default-case
2352
- */
2353
- 'default-case'?: [({
2354
- commentPattern?: string,
2355
- })?],
2356
- /**
2357
- * Enforce default parameters to be last
2358
- * @see https://eslint.org/docs/latest/rules/default-param-last
2359
- */
2360
- 'default-param-last'?: [],
2361
- /**
2362
- * Enforce consistent newlines before and after dots
2363
- * @see https://eslint.org/docs/latest/rules/dot-location
2364
- */
2365
- 'dot-location'?: [("object" | "property")?],
2366
- /**
2367
- * Enforce dot notation whenever possible
2368
- * @see https://eslint.org/docs/latest/rules/dot-notation
2369
- */
2370
- 'dot-notation'?: [({
2371
- allowKeywords?: boolean,
2372
- allowPattern?: string,
2373
- })?],
2374
- /**
2375
- * Require or disallow newline at the end of files
2376
- * @see https://eslint.org/docs/latest/rules/eol-last
2377
- */
2378
- 'eol-last'?: [("always" | "never" | "unix" | "windows")?],
2379
- /**
2380
- * Require the use of `===` and `!==`
2381
- * @see https://eslint.org/docs/latest/rules/eqeqeq
2382
- */
2383
- 'eqeqeq'?: ["always", {
2384
- null?: "always" | "never" | "ignore",
2385
- }] | ["smart" | "allow-null"],
2386
- /**
2387
- * Enforce `for` loop update clause moving the counter in the right direction
2388
- * @see https://eslint.org/docs/latest/rules/for-direction
2389
- */
2390
- 'for-direction'?: [],
2391
- /**
2392
- * Require or disallow spacing between function identifiers and their invocations
2393
- * @see https://eslint.org/docs/latest/rules/func-call-spacing
2394
- */
2395
- 'func-call-spacing'?: ["never"] | ["always", {
2396
- allowNewlines?: boolean,
2397
- }],
2398
- /**
2399
- * Require function names to match the name of the variable or property to which they are assigned
2400
- * @see https://eslint.org/docs/latest/rules/func-name-matching
2401
- */
2402
- 'func-name-matching'?: ["always" | "never", {
2403
- considerPropertyDescriptor?: boolean,
2404
- includeCommonJSModuleExports?: boolean,
2405
- }] | [{
2406
- considerPropertyDescriptor?: boolean,
2407
- includeCommonJSModuleExports?: boolean,
2408
- }],
2409
- /**
2410
- * Require or disallow named `function` expressions
2411
- * @see https://eslint.org/docs/latest/rules/func-names
2412
- */
2413
- 'func-names'?: unknown,
2414
- /**
2415
- * Enforce the consistent use of either `function` declarations or expressions assigned to variables
2416
- * @see https://eslint.org/docs/latest/rules/func-style
2417
- */
2418
- 'func-style'?: [("declaration" | "expression")?, ({
2419
- allowArrowFunctions?: boolean,
2420
- overrides?: {
2421
- namedExports?: "declaration" | "expression" | "ignore",
2422
- },
2423
- })?],
2424
- /**
2425
- * Enforce line breaks between arguments of a function call
2426
- * @see https://eslint.org/docs/latest/rules/function-call-argument-newline
2427
- */
2428
- 'function-call-argument-newline'?: [("always" | "never" | "consistent")?],
2429
- /**
2430
- * Enforce consistent line breaks inside function parentheses
2431
- * @see https://eslint.org/docs/latest/rules/function-paren-newline
2432
- */
2433
- 'function-paren-newline'?: [("always" | "never" | "consistent" | "multiline" | "multiline-arguments" | {
2434
- minItems?: number,
2435
- })?],
2436
- /**
2437
- * Enforce consistent spacing around `*` operators in generator functions
2438
- * @see https://eslint.org/docs/latest/rules/generator-star-spacing
2439
- */
2440
- 'generator-star-spacing'?: [("before" | "after" | "both" | "neither" | {
2441
- before?: boolean,
2442
- after?: boolean,
2443
- named?: "before" | "after" | "both" | "neither" | {
2444
- before?: boolean,
2445
- after?: boolean,
2446
- },
2447
- anonymous?: "before" | "after" | "both" | "neither" | {
2448
- before?: boolean,
2449
- after?: boolean,
2450
- },
2451
- method?: "before" | "after" | "both" | "neither" | {
2452
- before?: boolean,
2453
- after?: boolean,
2454
- },
2455
- })?],
2456
- /**
2457
- * Enforce `return` statements in getters
2458
- * @see https://eslint.org/docs/latest/rules/getter-return
2459
- */
2460
- 'getter-return'?: [({
2461
- allowImplicit?: boolean,
2462
- })?],
2463
- /**
2464
- * Require `require()` calls to be placed at top-level module scope
2465
- * @see https://eslint.org/docs/latest/rules/global-require
2466
- */
2467
- 'global-require'?: [],
2468
- /**
2469
- * Require grouped accessor pairs in object literals and classes
2470
- * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs
2471
- */
2472
- 'grouped-accessor-pairs'?: [("anyOrder" | "getBeforeSet" | "setBeforeGet")?],
2473
- /**
2474
- * Require `for-in` loops to include an `if` statement
2475
- * @see https://eslint.org/docs/latest/rules/guard-for-in
2476
- */
2477
- 'guard-for-in'?: [],
2478
- /**
2479
- * Require error handling in callbacks
2480
- * @see https://eslint.org/docs/latest/rules/handle-callback-err
2481
- */
2482
- 'handle-callback-err'?: [(string)?],
2483
- /**
2484
- * Disallow specified identifiers
2485
- * @see https://eslint.org/docs/latest/rules/id-blacklist
2486
- */
2487
- 'id-blacklist'?: (string)[],
2488
- /**
2489
- * Disallow specified identifiers
2490
- * @see https://eslint.org/docs/latest/rules/id-denylist
2491
- */
2492
- 'id-denylist'?: (string)[],
2493
- /**
2494
- * Enforce minimum and maximum identifier lengths
2495
- * @see https://eslint.org/docs/latest/rules/id-length
2496
- */
2497
- 'id-length'?: [({
2498
- min?: number,
2499
- max?: number,
2500
- exceptions?: (string)[],
2501
- exceptionPatterns?: (string)[],
2502
- properties?: "always" | "never",
2503
- })?],
2504
- /**
2505
- * Require identifiers to match a specified regular expression
2506
- * @see https://eslint.org/docs/latest/rules/id-match
2507
- */
2508
- 'id-match'?: [(string)?, ({
2509
- properties?: boolean,
2510
- classFields?: boolean,
2511
- onlyDeclarations?: boolean,
2512
- ignoreDestructuring?: boolean,
2513
- })?],
2514
- /**
2515
- * Enforce the location of arrow function bodies
2516
- * @see https://eslint.org/docs/latest/rules/implicit-arrow-linebreak
2517
- */
2518
- 'implicit-arrow-linebreak'?: [("beside" | "below")?],
2519
- /**
2520
- * Enforce consistent indentation
2521
- * @see https://eslint.org/docs/latest/rules/indent-legacy
2522
- */
2523
- 'indent-legacy'?: [("tab" | number)?, ({
2524
- SwitchCase?: number,
2525
- VariableDeclarator?: number | {
2526
- var?: number,
2527
- let?: number,
2528
- const?: number,
2529
- },
2530
- outerIIFEBody?: number,
2531
- MemberExpression?: number,
2532
- FunctionDeclaration?: {
2533
- parameters?: number | "first",
2534
- body?: number,
2535
- },
2536
- FunctionExpression?: {
2537
- parameters?: number | "first",
2538
- body?: number,
2539
- },
2540
- CallExpression?: {
2541
- parameters?: number | "first",
2542
- },
2543
- ArrayExpression?: number | "first",
2544
- ObjectExpression?: number | "first",
2545
- })?],
2546
- /**
2547
- * Enforce consistent indentation
2548
- * @see https://eslint.org/docs/latest/rules/indent
2549
- */
2550
- 'indent'?: [("tab" | number)?, ({
2551
- SwitchCase?: number,
2552
- VariableDeclarator?: number | "first" | "off" | {
2553
- var?: number | "first" | "off",
2554
- let?: number | "first" | "off",
2555
- const?: number | "first" | "off",
2556
- },
2557
- outerIIFEBody?: number | "off",
2558
- MemberExpression?: number | "off",
2559
- FunctionDeclaration?: {
2560
- parameters?: number | "first" | "off",
2561
- body?: number,
2562
- },
2563
- FunctionExpression?: {
2564
- parameters?: number | "first" | "off",
2565
- body?: number,
2566
- },
2567
- StaticBlock?: {
2568
- body?: number,
2569
- },
2570
- CallExpression?: {
2571
- arguments?: number | "first" | "off",
2572
- },
2573
- ArrayExpression?: number | "first" | "off",
2574
- ObjectExpression?: number | "first" | "off",
2575
- ImportDeclaration?: number | "first" | "off",
2576
- flatTernaryExpressions?: boolean,
2577
- offsetTernaryExpressions?: boolean,
2578
- ignoredNodes?: (string)[],
2579
- ignoreComments?: boolean,
2580
- })?],
2581
- 'index'?: any[],
2582
- /**
2583
- * Require or disallow initialization in variable declarations
2584
- * @see https://eslint.org/docs/latest/rules/init-declarations
2585
- */
2586
- 'init-declarations'?: ["always"] | ["never", {
2587
- ignoreForLoopInit?: boolean,
2588
- }],
2589
- /**
2590
- * Enforce the consistent use of either double or single quotes in JSX attributes
2591
- * @see https://eslint.org/docs/latest/rules/jsx-quotes
2592
- */
2593
- 'jsx-quotes'?: [("prefer-single" | "prefer-double")?],
2594
- /**
2595
- * Enforce consistent spacing between keys and values in object literal properties
2596
- * @see https://eslint.org/docs/latest/rules/key-spacing
2597
- */
2598
- 'key-spacing'?: [({
2599
- align?: "colon" | "value" | {
2600
- mode?: "strict" | "minimum",
2601
- on?: "colon" | "value",
2602
- beforeColon?: boolean,
2603
- afterColon?: boolean,
2604
- },
2605
- mode?: "strict" | "minimum",
2606
- beforeColon?: boolean,
2607
- afterColon?: boolean,
2608
- } | {
2609
- singleLine?: {
2610
- mode?: "strict" | "minimum",
2611
- beforeColon?: boolean,
2612
- afterColon?: boolean,
2613
- },
2614
- multiLine?: {
2615
- align?: "colon" | "value" | {
2616
- mode?: "strict" | "minimum",
2617
- on?: "colon" | "value",
2618
- beforeColon?: boolean,
2619
- afterColon?: boolean,
2620
- },
2621
- mode?: "strict" | "minimum",
2622
- beforeColon?: boolean,
2623
- afterColon?: boolean,
2624
- },
2625
- } | {
2626
- singleLine?: {
2627
- mode?: "strict" | "minimum",
2628
- beforeColon?: boolean,
2629
- afterColon?: boolean,
2630
- },
2631
- multiLine?: {
2632
- mode?: "strict" | "minimum",
2633
- beforeColon?: boolean,
2634
- afterColon?: boolean,
2635
- },
2636
- align?: {
2637
- mode?: "strict" | "minimum",
2638
- on?: "colon" | "value",
2639
- beforeColon?: boolean,
2640
- afterColon?: boolean,
2641
- },
2642
- })?],
2643
- /**
2644
- * Enforce consistent spacing before and after keywords
2645
- * @see https://eslint.org/docs/latest/rules/keyword-spacing
2646
- */
2647
- 'keyword-spacing'?: [({
2648
- before?: boolean,
2649
- after?: boolean,
2650
- overrides?: {
2651
- abstract?: {
2652
- before?: boolean,
2653
- after?: boolean,
2654
- },
2655
- as?: {
2656
- before?: boolean,
2657
- after?: boolean,
2658
- },
2659
- async?: {
2660
- before?: boolean,
2661
- after?: boolean,
2662
- },
2663
- await?: {
2664
- before?: boolean,
2665
- after?: boolean,
2666
- },
2667
- boolean?: {
2668
- before?: boolean,
2669
- after?: boolean,
2670
- },
2671
- break?: {
2672
- before?: boolean,
2673
- after?: boolean,
2674
- },
2675
- byte?: {
2676
- before?: boolean,
2677
- after?: boolean,
2678
- },
2679
- case?: {
2680
- before?: boolean,
2681
- after?: boolean,
2682
- },
2683
- catch?: {
2684
- before?: boolean,
2685
- after?: boolean,
2686
- },
2687
- char?: {
2688
- before?: boolean,
2689
- after?: boolean,
2690
- },
2691
- class?: {
2692
- before?: boolean,
2693
- after?: boolean,
2694
- },
2695
- const?: {
2696
- before?: boolean,
2697
- after?: boolean,
2698
- },
2699
- continue?: {
2700
- before?: boolean,
2701
- after?: boolean,
2702
- },
2703
- debugger?: {
2704
- before?: boolean,
2705
- after?: boolean,
2706
- },
2707
- default?: {
2708
- before?: boolean,
2709
- after?: boolean,
2710
- },
2711
- delete?: {
2712
- before?: boolean,
2713
- after?: boolean,
2714
- },
2715
- do?: {
2716
- before?: boolean,
2717
- after?: boolean,
2718
- },
2719
- double?: {
2720
- before?: boolean,
2721
- after?: boolean,
2722
- },
2723
- else?: {
2724
- before?: boolean,
2725
- after?: boolean,
2726
- },
2727
- enum?: {
2728
- before?: boolean,
2729
- after?: boolean,
2730
- },
2731
- export?: {
2732
- before?: boolean,
2733
- after?: boolean,
2734
- },
2735
- extends?: {
2736
- before?: boolean,
2737
- after?: boolean,
2738
- },
2739
- false?: {
2740
- before?: boolean,
2741
- after?: boolean,
2742
- },
2743
- final?: {
2744
- before?: boolean,
2745
- after?: boolean,
2746
- },
2747
- finally?: {
2748
- before?: boolean,
2749
- after?: boolean,
2750
- },
2751
- float?: {
2752
- before?: boolean,
2753
- after?: boolean,
2754
- },
2755
- for?: {
2756
- before?: boolean,
2757
- after?: boolean,
2758
- },
2759
- from?: {
2760
- before?: boolean,
2761
- after?: boolean,
2762
- },
2763
- function?: {
2764
- before?: boolean,
2765
- after?: boolean,
2766
- },
2767
- get?: {
2768
- before?: boolean,
2769
- after?: boolean,
2770
- },
2771
- goto?: {
2772
- before?: boolean,
2773
- after?: boolean,
2774
- },
2775
- if?: {
2776
- before?: boolean,
2777
- after?: boolean,
2778
- },
2779
- implements?: {
2780
- before?: boolean,
2781
- after?: boolean,
2782
- },
2783
- import?: {
2784
- before?: boolean,
2785
- after?: boolean,
2786
- },
2787
- in?: {
2788
- before?: boolean,
2789
- after?: boolean,
2790
- },
2791
- instanceof?: {
2792
- before?: boolean,
2793
- after?: boolean,
2794
- },
2795
- int?: {
2796
- before?: boolean,
2797
- after?: boolean,
2798
- },
2799
- interface?: {
2800
- before?: boolean,
2801
- after?: boolean,
2802
- },
2803
- let?: {
2804
- before?: boolean,
2805
- after?: boolean,
2806
- },
2807
- long?: {
2808
- before?: boolean,
2809
- after?: boolean,
2810
- },
2811
- native?: {
2812
- before?: boolean,
2813
- after?: boolean,
2814
- },
2815
- new?: {
2816
- before?: boolean,
2817
- after?: boolean,
2818
- },
2819
- null?: {
2820
- before?: boolean,
2821
- after?: boolean,
2822
- },
2823
- of?: {
2824
- before?: boolean,
2825
- after?: boolean,
2826
- },
2827
- package?: {
2828
- before?: boolean,
2829
- after?: boolean,
2830
- },
2831
- private?: {
2832
- before?: boolean,
2833
- after?: boolean,
2834
- },
2835
- protected?: {
2836
- before?: boolean,
2837
- after?: boolean,
2838
- },
2839
- public?: {
2840
- before?: boolean,
2841
- after?: boolean,
2842
- },
2843
- return?: {
2844
- before?: boolean,
2845
- after?: boolean,
2846
- },
2847
- set?: {
2848
- before?: boolean,
2849
- after?: boolean,
2850
- },
2851
- short?: {
2852
- before?: boolean,
2853
- after?: boolean,
2854
- },
2855
- static?: {
2856
- before?: boolean,
2857
- after?: boolean,
2858
- },
2859
- super?: {
2860
- before?: boolean,
2861
- after?: boolean,
2862
- },
2863
- switch?: {
2864
- before?: boolean,
2865
- after?: boolean,
2866
- },
2867
- synchronized?: {
2868
- before?: boolean,
2869
- after?: boolean,
2870
- },
2871
- this?: {
2872
- before?: boolean,
2873
- after?: boolean,
2874
- },
2875
- throw?: {
2876
- before?: boolean,
2877
- after?: boolean,
2878
- },
2879
- throws?: {
2880
- before?: boolean,
2881
- after?: boolean,
2882
- },
2883
- transient?: {
2884
- before?: boolean,
2885
- after?: boolean,
2886
- },
2887
- true?: {
2888
- before?: boolean,
2889
- after?: boolean,
2890
- },
2891
- try?: {
2892
- before?: boolean,
2893
- after?: boolean,
2894
- },
2895
- typeof?: {
2896
- before?: boolean,
2897
- after?: boolean,
2898
- },
2899
- var?: {
2900
- before?: boolean,
2901
- after?: boolean,
2902
- },
2903
- void?: {
2904
- before?: boolean,
2905
- after?: boolean,
2906
- },
2907
- volatile?: {
2908
- before?: boolean,
2909
- after?: boolean,
2910
- },
2911
- while?: {
2912
- before?: boolean,
2913
- after?: boolean,
2914
- },
2915
- with?: {
2916
- before?: boolean,
2917
- after?: boolean,
2918
- },
2919
- yield?: {
2920
- before?: boolean,
2921
- after?: boolean,
2922
- },
2923
- },
2924
- })?],
2925
- /**
2926
- * Enforce position of line comments
2927
- * @see https://eslint.org/docs/latest/rules/line-comment-position
2928
- */
2929
- 'line-comment-position'?: [("above" | "beside" | {
2930
- position?: "above" | "beside",
2931
- ignorePattern?: string,
2932
- applyDefaultPatterns?: boolean,
2933
- applyDefaultIgnorePatterns?: boolean,
2934
- })?],
2935
- /**
2936
- * Enforce consistent linebreak style
2937
- * @see https://eslint.org/docs/latest/rules/linebreak-style
2938
- */
2939
- 'linebreak-style'?: [("unix" | "windows")?],
2940
- /**
2941
- * Require empty lines around comments
2942
- * @see https://eslint.org/docs/latest/rules/lines-around-comment
2943
- */
2944
- 'lines-around-comment'?: [({
2945
- beforeBlockComment?: boolean,
2946
- afterBlockComment?: boolean,
2947
- beforeLineComment?: boolean,
2948
- afterLineComment?: boolean,
2949
- allowBlockStart?: boolean,
2950
- allowBlockEnd?: boolean,
2951
- allowClassStart?: boolean,
2952
- allowClassEnd?: boolean,
2953
- allowObjectStart?: boolean,
2954
- allowObjectEnd?: boolean,
2955
- allowArrayStart?: boolean,
2956
- allowArrayEnd?: boolean,
2957
- ignorePattern?: string,
2958
- applyDefaultIgnorePatterns?: boolean,
2959
- afterHashbangComment?: boolean,
2960
- })?],
2961
- /**
2962
- * Require or disallow newlines around directives
2963
- * @see https://eslint.org/docs/latest/rules/lines-around-directive
2964
- */
2965
- 'lines-around-directive'?: [("always" | "never" | {
2966
- before?: "always" | "never",
2967
- after?: "always" | "never",
2968
- })?],
2969
- /**
2970
- * Require or disallow an empty line between class members
2971
- * @see https://eslint.org/docs/latest/rules/lines-between-class-members
2972
- */
2973
- 'lines-between-class-members'?: [({
2974
- enforce: ({
2975
- blankLine: "always" | "never",
2976
- prev: "method" | "field" | "*",
2977
- next: "method" | "field" | "*",
2978
- })[],
2979
- } | "always" | "never")?, ({
2980
- exceptAfterSingleLine?: boolean,
2981
- })?],
2982
- /**
2983
- * Require or disallow logical assignment operator shorthand
2984
- * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
2985
- */
2986
- 'logical-assignment-operators'?: any[],
2987
- /**
2988
- * Enforce a maximum number of classes per file
2989
- * @see https://eslint.org/docs/latest/rules/max-classes-per-file
2990
- */
2991
- 'max-classes-per-file'?: [(number | {
2992
- ignoreExpressions?: boolean,
2993
- max?: number,
2994
- })?],
2995
- /**
2996
- * Enforce a maximum depth that blocks can be nested
2997
- * @see https://eslint.org/docs/latest/rules/max-depth
2998
- */
2999
- 'max-depth'?: [(number | {
3000
- maximum?: number,
3001
- max?: number,
3002
- })?],
3003
- /**
3004
- * Enforce a maximum line length
3005
- * @see https://eslint.org/docs/latest/rules/max-len
3006
- */
3007
- 'max-len'?: [({
3008
- code?: number,
3009
- comments?: number,
3010
- tabWidth?: number,
3011
- ignorePattern?: string,
3012
- ignoreComments?: boolean,
3013
- ignoreStrings?: boolean,
3014
- ignoreUrls?: boolean,
3015
- ignoreTemplateLiterals?: boolean,
3016
- ignoreRegExpLiterals?: boolean,
3017
- ignoreTrailingComments?: boolean,
3018
- } | number)?, ({
3019
- code?: number,
3020
- comments?: number,
3021
- tabWidth?: number,
3022
- ignorePattern?: string,
3023
- ignoreComments?: boolean,
3024
- ignoreStrings?: boolean,
3025
- ignoreUrls?: boolean,
3026
- ignoreTemplateLiterals?: boolean,
3027
- ignoreRegExpLiterals?: boolean,
3028
- ignoreTrailingComments?: boolean,
3029
- } | number)?, ({
3030
- code?: number,
3031
- comments?: number,
3032
- tabWidth?: number,
3033
- ignorePattern?: string,
3034
- ignoreComments?: boolean,
3035
- ignoreStrings?: boolean,
3036
- ignoreUrls?: boolean,
3037
- ignoreTemplateLiterals?: boolean,
3038
- ignoreRegExpLiterals?: boolean,
3039
- ignoreTrailingComments?: boolean,
3040
- })?],
3041
- /**
3042
- * Enforce a maximum number of lines of code in a function
3043
- * @see https://eslint.org/docs/latest/rules/max-lines-per-function
3044
- */
3045
- 'max-lines-per-function'?: [({
3046
- max?: number,
3047
- skipComments?: boolean,
3048
- skipBlankLines?: boolean,
3049
- IIFEs?: boolean,
3050
- } | number)?],
3051
- /**
3052
- * Enforce a maximum number of lines per file
3053
- * @see https://eslint.org/docs/latest/rules/max-lines
3054
- */
3055
- 'max-lines'?: [(number | {
3056
- max?: number,
3057
- skipComments?: boolean,
3058
- skipBlankLines?: boolean,
3059
- })?],
3060
- /**
3061
- * Enforce a maximum depth that callbacks can be nested
3062
- * @see https://eslint.org/docs/latest/rules/max-nested-callbacks
3063
- */
3064
- 'max-nested-callbacks'?: [(number | {
3065
- maximum?: number,
3066
- max?: number,
3067
- })?],
3068
- /**
3069
- * Enforce a maximum number of parameters in function definitions
3070
- * @see https://eslint.org/docs/latest/rules/max-params
3071
- */
3072
- 'max-params'?: [(number | {
3073
- maximum?: number,
3074
- max?: number,
3075
- /**
3076
- * Whether to count a `this` declaration when the type is `void`.
3077
- */
3078
- countVoidThis?: boolean,
3079
- })?],
3080
- /**
3081
- * Enforce a maximum number of statements allowed per line
3082
- * @see https://eslint.org/docs/latest/rules/max-statements-per-line
3083
- */
3084
- 'max-statements-per-line'?: [({
3085
- max?: number,
3086
- })?],
3087
- /**
3088
- * Enforce a maximum number of statements allowed in function blocks
3089
- * @see https://eslint.org/docs/latest/rules/max-statements
3090
- */
3091
- 'max-statements'?: [(number | {
3092
- maximum?: number,
3093
- max?: number,
3094
- })?, ({
3095
- ignoreTopLevelFunctions?: boolean,
3096
- })?],
3097
- /**
3098
- * Enforce a particular style for multiline comments
3099
- * @see https://eslint.org/docs/latest/rules/multiline-comment-style
3100
- */
3101
- 'multiline-comment-style'?: ["starred-block" | "bare-block"] | ["separate-lines", {
3102
- checkJSDoc?: boolean,
3103
- }],
3104
- /**
3105
- * Enforce newlines between operands of ternary expressions
3106
- * @see https://eslint.org/docs/latest/rules/multiline-ternary
3107
- */
3108
- 'multiline-ternary'?: [("always" | "always-multiline" | "never")?],
3109
- /**
3110
- * Require constructor names to begin with a capital letter
3111
- * @see https://eslint.org/docs/latest/rules/new-cap
3112
- */
3113
- 'new-cap'?: [({
3114
- newIsCap?: boolean,
3115
- capIsNew?: boolean,
3116
- newIsCapExceptions?: (string)[],
3117
- newIsCapExceptionPattern?: string,
3118
- capIsNewExceptions?: (string)[],
3119
- capIsNewExceptionPattern?: string,
3120
- properties?: boolean,
3121
- })?],
3122
- /**
3123
- * Enforce or disallow parentheses when invoking a constructor with no arguments
3124
- * @see https://eslint.org/docs/latest/rules/new-parens
3125
- */
3126
- 'new-parens'?: [("always" | "never")?],
3127
- /**
3128
- * Require or disallow an empty line after variable declarations
3129
- * @see https://eslint.org/docs/latest/rules/newline-after-var
3130
- */
3131
- 'newline-after-var'?: [("never" | "always")?],
3132
- /**
3133
- * Require an empty line before `return` statements
3134
- * @see https://eslint.org/docs/latest/rules/newline-before-return
3135
- */
3136
- 'newline-before-return'?: [],
3137
- /**
3138
- * Require a newline after each call in a method chain
3139
- * @see https://eslint.org/docs/latest/rules/newline-per-chained-call
3140
- */
3141
- 'newline-per-chained-call'?: [({
3142
- ignoreChainWithDepth?: number,
3143
- })?],
3144
- /**
3145
- * Disallow the use of `alert`, `confirm`, and `prompt`
3146
- * @see https://eslint.org/docs/latest/rules/no-alert
3147
- */
3148
- 'no-alert'?: [],
3149
- /**
3150
- * Disallow `Array` constructors
3151
- * @see https://eslint.org/docs/latest/rules/no-array-constructor
3152
- */
3153
- 'no-array-constructor'?: [],
3154
- /**
3155
- * Disallow using an async function as a Promise executor
3156
- * @see https://eslint.org/docs/latest/rules/no-async-promise-executor
3157
- */
3158
- 'no-async-promise-executor'?: [],
3159
- /**
3160
- * Disallow `await` inside of loops
3161
- * @see https://eslint.org/docs/latest/rules/no-await-in-loop
3162
- */
3163
- 'no-await-in-loop'?: [],
3164
- /**
3165
- * Disallow bitwise operators
3166
- * @see https://eslint.org/docs/latest/rules/no-bitwise
3167
- */
3168
- 'no-bitwise'?: [({
3169
- allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[],
3170
- int32Hint?: boolean,
3171
- })?],
3172
- /**
3173
- * Disallow use of the `Buffer()` constructor
3174
- * @see https://eslint.org/docs/latest/rules/no-buffer-constructor
3175
- */
3176
- 'no-buffer-constructor'?: [],
3177
- /**
3178
- * Disallow the use of `arguments.caller` or `arguments.callee`
3179
- * @see https://eslint.org/docs/latest/rules/no-caller
3180
- */
3181
- 'no-caller'?: [],
3182
- /**
3183
- * Disallow lexical declarations in case clauses
3184
- * @see https://eslint.org/docs/latest/rules/no-case-declarations
3185
- */
3186
- 'no-case-declarations'?: [],
3187
- /**
3188
- * Disallow `catch` clause parameters from shadowing variables in the outer scope
3189
- * @see https://eslint.org/docs/latest/rules/no-catch-shadow
3190
- */
3191
- 'no-catch-shadow'?: [],
3192
- /**
3193
- * Disallow reassigning class members
3194
- * @see https://eslint.org/docs/latest/rules/no-class-assign
3195
- */
3196
- 'no-class-assign'?: [],
3197
- /**
3198
- * Disallow comparing against `-0`
3199
- * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero
3200
- */
3201
- 'no-compare-neg-zero'?: [],
3202
- /**
3203
- * Disallow assignment operators in conditional expressions
3204
- * @see https://eslint.org/docs/latest/rules/no-cond-assign
3205
- */
3206
- 'no-cond-assign'?: [("except-parens" | "always")?],
3207
- /**
3208
- * Disallow arrow functions where they could be confused with comparisons
3209
- * @see https://eslint.org/docs/latest/rules/no-confusing-arrow
3210
- */
3211
- 'no-confusing-arrow'?: [({
3212
- allowParens?: boolean,
3213
- onlyOneSimpleParam?: boolean,
3214
- })?],
3215
- /**
3216
- * Disallow the use of `console`
3217
- * @see https://eslint.org/docs/latest/rules/no-console
3218
- */
3219
- 'no-console'?: [({
3220
- allow?: (string)[],
3221
- })?],
3222
- /**
3223
- * Disallow reassigning `const` variables
3224
- * @see https://eslint.org/docs/latest/rules/no-const-assign
3225
- */
3226
- 'no-const-assign'?: [],
3227
- /**
3228
- * Disallow expressions where the operation doesn't affect the value
3229
- * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
3230
- */
3231
- 'no-constant-binary-expression'?: [],
3232
- /**
3233
- * Disallow constant expressions in conditions
3234
- * @see https://eslint.org/docs/latest/rules/no-constant-condition
3235
- */
3236
- 'no-constant-condition'?: [({
3237
- checkLoops?: "all" | "allExceptWhileTrue" | "none" | true | false,
3238
- })?],
3239
- /**
3240
- * Disallow returning value from constructor
3241
- * @see https://eslint.org/docs/latest/rules/no-constructor-return
3242
- */
3243
- 'no-constructor-return'?: [],
3244
- /**
3245
- * Disallow `continue` statements
3246
- * @see https://eslint.org/docs/latest/rules/no-continue
3247
- */
3248
- 'no-continue'?: [],
3249
- /**
3250
- * Disallow control characters in regular expressions
3251
- * @see https://eslint.org/docs/latest/rules/no-control-regex
3252
- */
3253
- 'no-control-regex'?: [],
3254
- /**
3255
- * Disallow the use of `debugger`
3256
- * @see https://eslint.org/docs/latest/rules/no-debugger
3257
- */
3258
- 'no-debugger'?: [],
3259
- /**
3260
- * Disallow deleting variables
3261
- * @see https://eslint.org/docs/latest/rules/no-delete-var
3262
- */
3263
- 'no-delete-var'?: [],
3264
- /**
3265
- * Disallow equal signs explicitly at the beginning of regular expressions
3266
- * @see https://eslint.org/docs/latest/rules/no-div-regex
3267
- */
3268
- 'no-div-regex'?: [],
3269
- /**
3270
- * Disallow duplicate arguments in `function` definitions
3271
- * @see https://eslint.org/docs/latest/rules/no-dupe-args
3272
- */
3273
- 'no-dupe-args'?: [],
3274
- /**
3275
- * Disallow duplicate class members
3276
- * @see https://eslint.org/docs/latest/rules/no-dupe-class-members
3277
- */
3278
- 'no-dupe-class-members'?: [],
3279
- /**
3280
- * Disallow duplicate conditions in if-else-if chains
3281
- * @see https://eslint.org/docs/latest/rules/no-dupe-else-if
3282
- */
3283
- 'no-dupe-else-if'?: [],
3284
- /**
3285
- * Disallow duplicate keys in object literals
3286
- * @see https://eslint.org/docs/latest/rules/no-dupe-keys
3287
- */
3288
- 'no-dupe-keys'?: [],
3289
- /**
3290
- * Disallow duplicate case labels
3291
- * @see https://eslint.org/docs/latest/rules/no-duplicate-case
3292
- */
3293
- 'no-duplicate-case'?: [],
3294
- /**
3295
- * Disallow duplicate module imports
3296
- * @see https://eslint.org/docs/latest/rules/no-duplicate-imports
3297
- */
3298
- 'no-duplicate-imports'?: [({
3299
- includeExports?: boolean,
3300
- })?],
3301
- /**
3302
- * Disallow `else` blocks after `return` statements in `if` statements
3303
- * @see https://eslint.org/docs/latest/rules/no-else-return
3304
- */
3305
- 'no-else-return'?: [({
3306
- allowElseIf?: boolean,
3307
- })?],
3308
- /**
3309
- * Disallow empty character classes in regular expressions
3310
- * @see https://eslint.org/docs/latest/rules/no-empty-character-class
3311
- */
3312
- 'no-empty-character-class'?: [],
3313
- /**
3314
- * Disallow empty functions
3315
- * @see https://eslint.org/docs/latest/rules/no-empty-function
3316
- */
3317
- 'no-empty-function'?: [({
3318
- allow?: ("functions" | "arrowFunctions" | "generatorFunctions" | "methods" | "generatorMethods" | "getters" | "setters" | "constructors" | "asyncFunctions" | "asyncMethods" | "privateConstructors" | "protectedConstructors" | "decoratedFunctions" | "overrideMethods")[],
3319
- })?],
3320
- /**
3321
- * Disallow empty destructuring patterns
3322
- * @see https://eslint.org/docs/latest/rules/no-empty-pattern
3323
- */
3324
- 'no-empty-pattern'?: [({
3325
- allowObjectPatternsAsParameters?: boolean,
3326
- })?],
3327
- /**
3328
- * Disallow empty static blocks
3329
- * @see https://eslint.org/docs/latest/rules/no-empty-static-block
3330
- */
3331
- 'no-empty-static-block'?: [],
3332
- /**
3333
- * Disallow empty block statements
3334
- * @see https://eslint.org/docs/latest/rules/no-empty
3335
- */
3336
- 'no-empty'?: [({
3337
- allowEmptyCatch?: boolean,
3338
- })?],
3339
- /**
3340
- * Disallow `null` comparisons without type-checking operators
3341
- * @see https://eslint.org/docs/latest/rules/no-eq-null
3342
- */
3343
- 'no-eq-null'?: [],
3344
- /**
3345
- * Disallow the use of `eval()`
3346
- * @see https://eslint.org/docs/latest/rules/no-eval
3347
- */
3348
- 'no-eval'?: [({
3349
- allowIndirect?: boolean,
3350
- })?],
3351
- /**
3352
- * Disallow reassigning exceptions in `catch` clauses
3353
- * @see https://eslint.org/docs/latest/rules/no-ex-assign
3354
- */
3355
- 'no-ex-assign'?: [],
3356
- /**
3357
- * Disallow extending native types
3358
- * @see https://eslint.org/docs/latest/rules/no-extend-native
3359
- */
3360
- 'no-extend-native'?: [({
3361
- exceptions?: (string)[],
3362
- })?],
3363
- /**
3364
- * Disallow unnecessary calls to `.bind()`
3365
- * @see https://eslint.org/docs/latest/rules/no-extra-bind
3366
- */
3367
- 'no-extra-bind'?: [],
3368
- /**
3369
- * Disallow unnecessary boolean casts
3370
- * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast
3371
- */
3372
- 'no-extra-boolean-cast'?: [({
3373
- enforceForInnerExpressions?: boolean,
3374
- } | {
3375
- enforceForLogicalOperands?: boolean,
3376
- })?],
3377
- /**
3378
- * Disallow unnecessary labels
3379
- * @see https://eslint.org/docs/latest/rules/no-extra-label
3380
- */
3381
- 'no-extra-label'?: [],
3382
- /**
3383
- * Disallow unnecessary parentheses
3384
- * @see https://eslint.org/docs/latest/rules/no-extra-parens
3385
- */
3386
- 'no-extra-parens'?: ["functions"] | ["all", {
3387
- conditionalAssign?: boolean,
3388
- ternaryOperandBinaryExpressions?: boolean,
3389
- nestedBinaryExpressions?: boolean,
3390
- returnAssign?: boolean,
3391
- ignoreJSX?: "none" | "all" | "single-line" | "multi-line",
3392
- enforceForArrowConditionals?: boolean,
3393
- enforceForSequenceExpressions?: boolean,
3394
- enforceForNewInMemberExpressions?: boolean,
3395
- enforceForFunctionPrototypeMethods?: boolean,
3396
- allowParensAfterCommentPattern?: string,
3397
- }],
3398
- /**
3399
- * Disallow unnecessary semicolons
3400
- * @see https://eslint.org/docs/latest/rules/no-extra-semi
3401
- */
3402
- 'no-extra-semi'?: [],
3403
- /**
3404
- * Disallow fallthrough of `case` statements
3405
- * @see https://eslint.org/docs/latest/rules/no-fallthrough
3406
- */
3407
- 'no-fallthrough'?: [({
3408
- commentPattern?: string,
3409
- allowEmptyCase?: boolean,
3410
- reportUnusedFallthroughComment?: boolean,
3411
- })?],
3412
- /**
3413
- * Disallow leading or trailing decimal points in numeric literals
3414
- * @see https://eslint.org/docs/latest/rules/no-floating-decimal
3415
- */
3416
- 'no-floating-decimal'?: [],
3417
- /**
3418
- * Disallow reassigning `function` declarations
3419
- * @see https://eslint.org/docs/latest/rules/no-func-assign
3420
- */
3421
- 'no-func-assign'?: [],
3422
- /**
3423
- * Disallow assignments to native objects or read-only global variables
3424
- * @see https://eslint.org/docs/latest/rules/no-global-assign
3425
- */
3426
- 'no-global-assign'?: [({
3427
- exceptions?: (string)[],
3428
- })?],
3429
- /**
3430
- * Disallow shorthand type conversions
3431
- * @see https://eslint.org/docs/latest/rules/no-implicit-coercion
3432
- */
3433
- 'no-implicit-coercion'?: [({
3434
- boolean?: boolean,
3435
- number?: boolean,
3436
- string?: boolean,
3437
- disallowTemplateShorthand?: boolean,
3438
- allow?: ("~" | "!!" | "+" | "- -" | "-" | "*")[],
3439
- })?],
3440
- /**
3441
- * Disallow declarations in the global scope
3442
- * @see https://eslint.org/docs/latest/rules/no-implicit-globals
3443
- */
3444
- 'no-implicit-globals'?: [({
3445
- lexicalBindings?: boolean,
3446
- })?],
3447
- /**
3448
- * Disallow the use of `eval()`-like methods
3449
- * @see https://eslint.org/docs/latest/rules/no-implied-eval
3450
- */
3451
- 'no-implied-eval'?: [],
3452
- /**
3453
- * Disallow assigning to imported bindings
3454
- * @see https://eslint.org/docs/latest/rules/no-import-assign
3455
- */
3456
- 'no-import-assign'?: [],
3457
- /**
3458
- * Disallow inline comments after code
3459
- * @see https://eslint.org/docs/latest/rules/no-inline-comments
3460
- */
3461
- 'no-inline-comments'?: [({
3462
- ignorePattern?: string,
3463
- })?],
3464
- /**
3465
- * Disallow variable or `function` declarations in nested blocks
3466
- * @see https://eslint.org/docs/latest/rules/no-inner-declarations
3467
- */
3468
- 'no-inner-declarations'?: [("functions" | "both")?, ({
3469
- blockScopedFunctions?: "allow" | "disallow",
3470
- })?],
3471
- /**
3472
- * Disallow invalid regular expression strings in `RegExp` constructors
3473
- * @see https://eslint.org/docs/latest/rules/no-invalid-regexp
3474
- */
3475
- 'no-invalid-regexp'?: [({
3476
- allowConstructorFlags?: (string)[],
3477
- })?],
3478
- /**
3479
- * Disallow use of `this` in contexts where the value of `this` is `undefined`
3480
- * @see https://eslint.org/docs/latest/rules/no-invalid-this
3481
- */
3482
- 'no-invalid-this'?: [({
3483
- capIsConstructor?: boolean,
3484
- })?],
3485
- /**
3486
- * Disallow irregular whitespace
3487
- * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace
3488
- */
3489
- 'no-irregular-whitespace'?: [({
3490
- skipComments?: boolean,
3491
- skipStrings?: boolean,
3492
- skipTemplates?: boolean,
3493
- skipRegExps?: boolean,
3494
- skipJSXText?: boolean,
3495
- })?],
3496
- /**
3497
- * Disallow the use of the `__iterator__` property
3498
- * @see https://eslint.org/docs/latest/rules/no-iterator
3499
- */
3500
- 'no-iterator'?: [],
3501
- /**
3502
- * Disallow labels that share a name with a variable
3503
- * @see https://eslint.org/docs/latest/rules/no-label-var
3504
- */
3505
- 'no-label-var'?: [],
3506
- /**
3507
- * Disallow labeled statements
3508
- * @see https://eslint.org/docs/latest/rules/no-labels
3509
- */
3510
- 'no-labels'?: [({
3511
- allowLoop?: boolean,
3512
- allowSwitch?: boolean,
3513
- })?],
3514
- /**
3515
- * Disallow unnecessary nested blocks
3516
- * @see https://eslint.org/docs/latest/rules/no-lone-blocks
3517
- */
3518
- 'no-lone-blocks'?: [],
3519
- /**
3520
- * Disallow `if` statements as the only statement in `else` blocks
3521
- * @see https://eslint.org/docs/latest/rules/no-lonely-if
3522
- */
3523
- 'no-lonely-if'?: [],
3524
- /**
3525
- * Disallow function declarations that contain unsafe references inside loop statements
3526
- * @see https://eslint.org/docs/latest/rules/no-loop-func
3527
- */
3528
- 'no-loop-func'?: [],
3529
- /**
3530
- * Disallow literal numbers that lose precision
3531
- * @see https://eslint.org/docs/latest/rules/no-loss-of-precision
3532
- */
3533
- 'no-loss-of-precision'?: [],
3534
- /**
3535
- * Disallow magic numbers
3536
- * @see https://eslint.org/docs/latest/rules/no-magic-numbers
3537
- */
3538
- 'no-magic-numbers'?: [({
3539
- detectObjects?: boolean,
3540
- enforceConst?: boolean,
3541
- ignore?: (number | string)[],
3542
- ignoreArrayIndexes?: boolean,
3543
- ignoreDefaultValues?: boolean,
3544
- ignoreClassFieldInitialValues?: boolean,
3545
- })?],
3546
- /**
3547
- * Disallow characters which are made with multiple code points in character class syntax
3548
- * @see https://eslint.org/docs/latest/rules/no-misleading-character-class
3549
- */
3550
- 'no-misleading-character-class'?: [({
3551
- allowEscape?: boolean,
3552
- })?],
3553
- /**
3554
- * Disallow mixed binary operators
3555
- * @see https://eslint.org/docs/latest/rules/no-mixed-operators
3556
- */
3557
- 'no-mixed-operators'?: [({
3558
- groups?: (("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??")[])[],
3559
- allowSamePrecedence?: boolean,
3560
- })?],
3561
- /**
3562
- * Disallow `require` calls to be mixed with regular variable declarations
3563
- * @see https://eslint.org/docs/latest/rules/no-mixed-requires
3564
- */
3565
- 'no-mixed-requires'?: [(boolean | {
3566
- grouping?: boolean,
3567
- allowCall?: boolean,
3568
- })?],
3569
- /**
3570
- * Disallow mixed spaces and tabs for indentation
3571
- * @see https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs
3572
- */
3573
- 'no-mixed-spaces-and-tabs'?: [("smart-tabs" | true | false)?],
3574
- /**
3575
- * Disallow use of chained assignment expressions
3576
- * @see https://eslint.org/docs/latest/rules/no-multi-assign
3577
- */
3578
- 'no-multi-assign'?: [({
3579
- ignoreNonDeclaration?: boolean,
3580
- })?],
3581
- /**
3582
- * Disallow multiple spaces
3583
- * @see https://eslint.org/docs/latest/rules/no-multi-spaces
3584
- */
3585
- 'no-multi-spaces'?: [({
3586
- exceptions?: { [key: string]: unknown },
3587
- ignoreEOLComments?: boolean,
3588
- })?],
3589
- /**
3590
- * Disallow multiline strings
3591
- * @see https://eslint.org/docs/latest/rules/no-multi-str
3592
- */
3593
- 'no-multi-str'?: [],
3594
- /**
3595
- * Disallow multiple empty lines
3596
- * @see https://eslint.org/docs/latest/rules/no-multiple-empty-lines
3597
- */
3598
- 'no-multiple-empty-lines'?: [({
3599
- max: number,
3600
- maxEOF?: number,
3601
- maxBOF?: number,
3602
- })?],
3603
- /**
3604
- * Disallow assignments to native objects or read-only global variables
3605
- * @see https://eslint.org/docs/latest/rules/no-native-reassign
3606
- */
3607
- 'no-native-reassign'?: [({
3608
- exceptions?: (string)[],
3609
- })?],
3610
- /**
3611
- * Disallow negated conditions
3612
- * @see https://eslint.org/docs/latest/rules/no-negated-condition
3613
- */
3614
- 'no-negated-condition'?: [],
3615
- /**
3616
- * Disallow negating the left operand in `in` expressions
3617
- * @see https://eslint.org/docs/latest/rules/no-negated-in-lhs
3618
- */
3619
- 'no-negated-in-lhs'?: [],
3620
- /**
3621
- * Disallow nested ternary expressions
3622
- * @see https://eslint.org/docs/latest/rules/no-nested-ternary
3623
- */
3624
- 'no-nested-ternary'?: [],
3625
- /**
3626
- * Disallow `new` operators with the `Function` object
3627
- * @see https://eslint.org/docs/latest/rules/no-new-func
3628
- */
3629
- 'no-new-func'?: [],
3630
- /**
3631
- * Disallow `new` operators with global non-constructor functions
3632
- * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
3633
- */
3634
- 'no-new-native-nonconstructor'?: [],
3635
- /**
3636
- * Disallow `Object` constructors
3637
- * @see https://eslint.org/docs/latest/rules/no-new-object
3638
- */
3639
- 'no-new-object'?: [],
3640
- /**
3641
- * Disallow `new` operators with calls to `require`
3642
- * @see https://eslint.org/docs/latest/rules/no-new-require
3643
- */
3644
- 'no-new-require'?: [],
3645
- /**
3646
- * Disallow `new` operators with the `Symbol` object
3647
- * @see https://eslint.org/docs/latest/rules/no-new-symbol
3648
- */
3649
- 'no-new-symbol'?: [],
3650
- /**
3651
- * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects
3652
- * @see https://eslint.org/docs/latest/rules/no-new-wrappers
3653
- */
3654
- 'no-new-wrappers'?: [],
3655
- /**
3656
- * Disallow `new` operators outside of assignments or comparisons
3657
- * @see https://eslint.org/docs/latest/rules/no-new
3658
- */
3659
- 'no-new'?: [],
3660
- /**
3661
- * Disallow `\8` and `\9` escape sequences in string literals
3662
- * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape
3663
- */
3664
- 'no-nonoctal-decimal-escape'?: [],
3665
- /**
3666
- * Disallow calling global object properties as functions
3667
- * @see https://eslint.org/docs/latest/rules/no-obj-calls
3668
- */
3669
- 'no-obj-calls'?: [],
3670
- /**
3671
- * Disallow calls to the `Object` constructor without an argument
3672
- * @see https://eslint.org/docs/latest/rules/no-object-constructor
3673
- */
3674
- 'no-object-constructor'?: [],
3675
- /**
3676
- * Disallow octal escape sequences in string literals
3677
- * @see https://eslint.org/docs/latest/rules/no-octal-escape
3678
- */
3679
- 'no-octal-escape'?: [],
3680
- /**
3681
- * Disallow octal literals
3682
- * @see https://eslint.org/docs/latest/rules/no-octal
3683
- */
3684
- 'no-octal'?: [],
3685
- /**
3686
- * Disallow reassigning function parameters
3687
- * @see https://eslint.org/docs/latest/rules/no-param-reassign
3688
- */
3689
- 'no-param-reassign'?: [({
3690
- props?: false,
3691
- } | {
3692
- props?: true,
3693
- ignorePropertyModificationsFor?: (string)[],
3694
- ignorePropertyModificationsForRegex?: (string)[],
3695
- })?],
3696
- /**
3697
- * Disallow string concatenation with `__dirname` and `__filename`
3698
- * @see https://eslint.org/docs/latest/rules/no-path-concat
3699
- */
3700
- 'no-path-concat'?: [],
3701
- /**
3702
- * Disallow the unary operators `++` and `--`
3703
- * @see https://eslint.org/docs/latest/rules/no-plusplus
3704
- */
3705
- 'no-plusplus'?: [({
3706
- allowForLoopAfterthoughts?: boolean,
3707
- })?],
3708
- /**
3709
- * Disallow the use of `process.env`
3710
- * @see https://eslint.org/docs/latest/rules/no-process-env
3711
- */
3712
- 'no-process-env'?: [],
3713
- /**
3714
- * Disallow the use of `process.exit()`
3715
- * @see https://eslint.org/docs/latest/rules/no-process-exit
3716
- */
3717
- 'no-process-exit'?: [],
3718
- /**
3719
- * Disallow returning values from Promise executor functions
3720
- * @see https://eslint.org/docs/latest/rules/no-promise-executor-return
3721
- */
3722
- 'no-promise-executor-return'?: [({
3723
- allowVoid?: boolean,
3724
- })?],
3725
- /**
3726
- * Disallow the use of the `__proto__` property
3727
- * @see https://eslint.org/docs/latest/rules/no-proto
3728
- */
3729
- 'no-proto'?: [],
3730
- /**
3731
- * Disallow calling some `Object.prototype` methods directly on objects
3732
- * @see https://eslint.org/docs/latest/rules/no-prototype-builtins
3733
- */
3734
- 'no-prototype-builtins'?: [],
3735
- /**
3736
- * Disallow variable redeclaration
3737
- * @see https://eslint.org/docs/latest/rules/no-redeclare
3738
- */
3739
- 'no-redeclare'?: [({
3740
- builtinGlobals?: boolean,
3741
- })?],
3742
- /**
3743
- * Disallow multiple spaces in regular expressions
3744
- * @see https://eslint.org/docs/latest/rules/no-regex-spaces
3745
- */
3746
- 'no-regex-spaces'?: [],
3747
- /**
3748
- * Disallow specified names in exports
3749
- * @see https://eslint.org/docs/latest/rules/no-restricted-exports
3750
- */
3751
- 'no-restricted-exports'?: [({
3752
- restrictedNamedExports?: (string)[],
3753
- restrictedNamedExportsPattern?: string,
3754
- } | {
3755
- restrictedNamedExports?: (string)[],
3756
- restrictedNamedExportsPattern?: string,
3757
- restrictDefaultExports?: {
3758
- direct?: boolean,
3759
- named?: boolean,
3760
- defaultFrom?: boolean,
3761
- namedFrom?: boolean,
3762
- namespaceFrom?: boolean,
3763
- },
3764
- })?],
3765
- /**
3766
- * Disallow specified global variables
3767
- * @see https://eslint.org/docs/latest/rules/no-restricted-globals
3768
- */
3769
- 'no-restricted-globals'?: (string | {
3770
- name: string,
3771
- message?: string,
3772
- })[],
3773
- /**
3774
- * Disallow specified modules when loaded by `import`
3775
- * @see https://eslint.org/docs/latest/rules/no-restricted-imports
3776
- */
3777
- 'no-restricted-imports'?: (string | {
3778
- name: string,
3779
- message?: string,
3780
- importNames?: (string)[],
3781
- allowImportNames?: (string)[],
3782
- })[] | [{
3783
- paths?: (string | {
3784
- name: string,
3785
- message?: string,
3786
- importNames?: (string)[],
3787
- allowImportNames?: (string)[],
3788
- })[],
3789
- patterns?: (string)[] | ({
3790
- importNames?: (string)[],
3791
- allowImportNames?: (string)[],
3792
- group?: (string)[],
3793
- regex?: string,
3794
- importNamePattern?: string,
3795
- allowImportNamePattern?: string,
3796
- message?: string,
3797
- caseSensitive?: boolean,
3798
- })[],
3799
- }],
3800
- /**
3801
- * Disallow specified modules when loaded by `require`
3802
- * @see https://eslint.org/docs/latest/rules/no-restricted-modules
3803
- */
3804
- 'no-restricted-modules'?: (string | {
3805
- name: string,
3806
- message?: string,
3807
- })[] | ({
3808
- paths?: (string | {
3809
- name: string,
3810
- message?: string,
3811
- })[],
3812
- patterns?: (string)[],
3813
- })[],
3814
- /**
3815
- * Disallow certain properties on certain objects
3816
- * @see https://eslint.org/docs/latest/rules/no-restricted-properties
3817
- */
3818
- 'no-restricted-properties'?: ({
3819
- object?: string,
3820
- property?: string,
3821
- allowObjects?: (string)[],
3822
- message?: string,
3823
- })[],
3824
- /**
3825
- * Disallow specified syntax
3826
- * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
3827
- */
3828
- 'no-restricted-syntax'?: (string | {
3829
- selector: string,
3830
- message?: string,
3831
- })[],
3832
- /**
3833
- * Disallow assignment operators in `return` statements
3834
- * @see https://eslint.org/docs/latest/rules/no-return-assign
3835
- */
3836
- 'no-return-assign'?: [("except-parens" | "always")?],
3837
- /**
3838
- * Disallow unnecessary `return await`
3839
- * @see https://eslint.org/docs/latest/rules/no-return-await
3840
- */
3841
- 'no-return-await'?: [],
3842
- /**
3843
- * Disallow `javascript:` URLs
3844
- * @see https://eslint.org/docs/latest/rules/no-script-url
3845
- */
3846
- 'no-script-url'?: [],
3847
- /**
3848
- * Disallow assignments where both sides are exactly the same
3849
- * @see https://eslint.org/docs/latest/rules/no-self-assign
3850
- */
3851
- 'no-self-assign'?: [({
3852
- props?: boolean,
3853
- })?],
3854
- /**
3855
- * Disallow comparisons where both sides are exactly the same
3856
- * @see https://eslint.org/docs/latest/rules/no-self-compare
3857
- */
3858
- 'no-self-compare'?: [],
3859
- /**
3860
- * Disallow comma operators
3861
- * @see https://eslint.org/docs/latest/rules/no-sequences
3862
- */
3863
- 'no-sequences'?: [({
3864
- allowInParentheses?: boolean,
3865
- })?],
3866
- /**
3867
- * Disallow returning values from setters
3868
- * @see https://eslint.org/docs/latest/rules/no-setter-return
3869
- */
3870
- 'no-setter-return'?: [],
3871
- /**
3872
- * Disallow identifiers from shadowing restricted names
3873
- * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names
3874
- */
3875
- 'no-shadow-restricted-names'?: [({
3876
- reportGlobalThis?: boolean,
3877
- })?],
3878
- /**
3879
- * Disallow variable declarations from shadowing variables declared in the outer scope
3880
- * @see https://eslint.org/docs/latest/rules/no-shadow
3881
- */
3882
- 'no-shadow'?: [({
3883
- builtinGlobals?: boolean,
3884
- hoist?: "all" | "functions" | "never",
3885
- allow?: (string)[],
3886
- ignoreOnInitialization?: boolean,
3887
- })?],
3888
- /**
3889
- * Disallow spacing between function identifiers and their applications (deprecated)
3890
- * @see https://eslint.org/docs/latest/rules/no-spaced-func
3891
- */
3892
- 'no-spaced-func'?: [],
3893
- /**
3894
- * Disallow sparse arrays
3895
- * @see https://eslint.org/docs/latest/rules/no-sparse-arrays
3896
- */
3897
- 'no-sparse-arrays'?: [],
3898
- /**
3899
- * Disallow synchronous methods
3900
- * @see https://eslint.org/docs/latest/rules/no-sync
3901
- */
3902
- 'no-sync'?: [({
3903
- allowAtRootLevel?: boolean,
3904
- })?],
3905
- /**
3906
- * Disallow all tabs
3907
- * @see https://eslint.org/docs/latest/rules/no-tabs
3908
- */
3909
- 'no-tabs'?: [({
3910
- allowIndentationTabs?: boolean,
3911
- })?],
3912
- /**
3913
- * Disallow template literal placeholder syntax in regular strings
3914
- * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string
3915
- */
3916
- 'no-template-curly-in-string'?: [],
3917
- /**
3918
- * Disallow ternary operators
3919
- * @see https://eslint.org/docs/latest/rules/no-ternary
3920
- */
3921
- 'no-ternary'?: [],
3922
- /**
3923
- * Disallow `this`/`super` before calling `super()` in constructors
3924
- * @see https://eslint.org/docs/latest/rules/no-this-before-super
3925
- */
3926
- 'no-this-before-super'?: [],
3927
- /**
3928
- * Disallow throwing literals as exceptions
3929
- * @see https://eslint.org/docs/latest/rules/no-throw-literal
3930
- */
3931
- 'no-throw-literal'?: [],
3932
- /**
3933
- * Disallow trailing whitespace at the end of lines
3934
- * @see https://eslint.org/docs/latest/rules/no-trailing-spaces
3935
- */
3936
- 'no-trailing-spaces'?: [({
3937
- skipBlankLines?: boolean,
3938
- ignoreComments?: boolean,
3939
- })?],
3940
- /**
3941
- * Disallow `let` or `var` variables that are read but never assigned
3942
- * @see https://eslint.org/docs/latest/rules/no-unassigned-vars
3943
- */
3944
- 'no-unassigned-vars'?: [],
3945
- /**
3946
- * Disallow initializing variables to `undefined`
3947
- * @see https://eslint.org/docs/latest/rules/no-undef-init
3948
- */
3949
- 'no-undef-init'?: [],
3950
- /**
3951
- * Disallow the use of undeclared variables unless mentioned in `/*global * /` comments
3952
- * @see https://eslint.org/docs/latest/rules/no-undef
3953
- */
3954
- 'no-undef'?: [({
3955
- typeof?: boolean,
3956
- })?],
3957
- /**
3958
- * Disallow the use of `undefined` as an identifier
3959
- * @see https://eslint.org/docs/latest/rules/no-undefined
3960
- */
3961
- 'no-undefined'?: [],
3962
- /**
3963
- * Disallow dangling underscores in identifiers
3964
- * @see https://eslint.org/docs/latest/rules/no-underscore-dangle
3965
- */
3966
- 'no-underscore-dangle'?: [({
3967
- allow?: (string)[],
3968
- allowAfterThis?: boolean,
3969
- allowAfterSuper?: boolean,
3970
- allowAfterThisConstructor?: boolean,
3971
- enforceInMethodNames?: boolean,
3972
- allowFunctionParams?: boolean,
3973
- enforceInClassFields?: boolean,
3974
- allowInArrayDestructuring?: boolean,
3975
- allowInObjectDestructuring?: boolean,
3976
- })?],
3977
- /**
3978
- * Disallow confusing multiline expressions
3979
- * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline
3980
- */
3981
- 'no-unexpected-multiline'?: [],
3982
- /**
3983
- * Disallow unmodified loop conditions
3984
- * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
3985
- */
3986
- 'no-unmodified-loop-condition'?: [],
3987
- /**
3988
- * Disallow ternary operators when simpler alternatives exist
3989
- * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary
3990
- */
3991
- 'no-unneeded-ternary'?: [({
3992
- defaultAssignment?: boolean,
3993
- })?],
3994
- /**
3995
- * Disallow loops with a body that allows only one iteration
3996
- * @see https://eslint.org/docs/latest/rules/no-unreachable-loop
3997
- */
3998
- 'no-unreachable-loop'?: [({
3999
- ignore?: ("WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement")[],
4000
- })?],
4001
- /**
4002
- * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements
4003
- * @see https://eslint.org/docs/latest/rules/no-unreachable
4004
- */
4005
- 'no-unreachable'?: [],
4006
- /**
4007
- * Disallow control flow statements in `finally` blocks
4008
- * @see https://eslint.org/docs/latest/rules/no-unsafe-finally
4009
- */
4010
- 'no-unsafe-finally'?: [],
4011
- /**
4012
- * Disallow negating the left operand of relational operators
4013
- * @see https://eslint.org/docs/latest/rules/no-unsafe-negation
4014
- */
4015
- 'no-unsafe-negation'?: [({
4016
- enforceForOrderingRelations?: boolean,
4017
- })?],
4018
- /**
4019
- * Disallow use of optional chaining in contexts where the `undefined` value is not allowed
4020
- * @see https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining
4021
- */
4022
- 'no-unsafe-optional-chaining'?: [({
4023
- disallowArithmeticOperators?: boolean,
4024
- })?],
4025
- /**
4026
- * Disallow unused expressions
4027
- * @see https://eslint.org/docs/latest/rules/no-unused-expressions
4028
- */
4029
- 'no-unused-expressions'?: [({
4030
- allowShortCircuit?: boolean,
4031
- allowTernary?: boolean,
4032
- allowTaggedTemplates?: boolean,
4033
- enforceForJSX?: boolean,
4034
- ignoreDirectives?: boolean,
4035
- })?],
4036
- /**
4037
- * Disallow unused labels
4038
- * @see https://eslint.org/docs/latest/rules/no-unused-labels
4039
- */
4040
- 'no-unused-labels'?: [],
4041
- /**
4042
- * Disallow unused private class members
4043
- * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members
4044
- */
4045
- 'no-unused-private-class-members'?: [],
4046
- /**
4047
- * Disallow unused variables
4048
- * @see https://eslint.org/docs/latest/rules/no-unused-vars
4049
- */
4050
- 'no-unused-vars'?: [("all" | "local" | {
4051
- vars?: "all" | "local",
4052
- varsIgnorePattern?: string,
4053
- args?: "all" | "after-used" | "none",
4054
- ignoreRestSiblings?: boolean,
4055
- argsIgnorePattern?: string,
4056
- caughtErrors?: "all" | "none",
4057
- caughtErrorsIgnorePattern?: string,
4058
- destructuredArrayIgnorePattern?: string,
4059
- ignoreClassWithStaticInitBlock?: boolean,
4060
- reportUsedIgnorePattern?: boolean,
4061
- })?],
4062
- /**
4063
- * Disallow the use of variables before they are defined
4064
- * @see https://eslint.org/docs/latest/rules/no-use-before-define
4065
- */
4066
- 'no-use-before-define'?: [("nofunc" | {
4067
- functions?: boolean,
4068
- classes?: boolean,
4069
- variables?: boolean,
4070
- allowNamedExports?: boolean,
4071
- })?],
4072
- /**
4073
- * Disallow variable assignments when the value is not used
4074
- * @see https://eslint.org/docs/latest/rules/no-useless-assignment
4075
- */
4076
- 'no-useless-assignment'?: [],
4077
- /**
4078
- * Disallow useless backreferences in regular expressions
4079
- * @see https://eslint.org/docs/latest/rules/no-useless-backreference
4080
- */
4081
- 'no-useless-backreference'?: [],
4082
- /**
4083
- * Disallow unnecessary calls to `.call()` and `.apply()`
4084
- * @see https://eslint.org/docs/latest/rules/no-useless-call
4085
- */
4086
- 'no-useless-call'?: [],
4087
- /**
4088
- * Disallow unnecessary `catch` clauses
4089
- * @see https://eslint.org/docs/latest/rules/no-useless-catch
4090
- */
4091
- 'no-useless-catch'?: [],
4092
- /**
4093
- * Disallow unnecessary computed property keys in objects and classes
4094
- * @see https://eslint.org/docs/latest/rules/no-useless-computed-key
4095
- */
4096
- 'no-useless-computed-key'?: [({
4097
- enforceForClassMembers?: boolean,
4098
- })?],
4099
- /**
4100
- * Disallow unnecessary concatenation of literals or template literals
4101
- * @see https://eslint.org/docs/latest/rules/no-useless-concat
4102
- */
4103
- 'no-useless-concat'?: [],
4104
- /**
4105
- * Disallow unnecessary constructors
4106
- * @see https://eslint.org/docs/latest/rules/no-useless-constructor
4107
- */
4108
- 'no-useless-constructor'?: [],
4109
- /**
4110
- * Disallow unnecessary escape characters
4111
- * @see https://eslint.org/docs/latest/rules/no-useless-escape
4112
- */
4113
- 'no-useless-escape'?: [({
4114
- allowRegexCharacters?: (string)[],
4115
- })?],
4116
- /**
4117
- * Disallow renaming import, export, and destructured assignments to the same name
4118
- * @see https://eslint.org/docs/latest/rules/no-useless-rename
4119
- */
4120
- 'no-useless-rename'?: [({
4121
- ignoreDestructuring?: boolean,
4122
- ignoreImport?: boolean,
4123
- ignoreExport?: boolean,
4124
- })?],
4125
- /**
4126
- * Disallow redundant return statements
4127
- * @see https://eslint.org/docs/latest/rules/no-useless-return
4128
- */
4129
- 'no-useless-return'?: [],
4130
- /**
4131
- * Require `let` or `const` instead of `var`
4132
- * @see https://eslint.org/docs/latest/rules/no-var
4133
- */
4134
- 'no-var'?: [],
4135
- /**
4136
- * Disallow `void` operators
4137
- * @see https://eslint.org/docs/latest/rules/no-void
4138
- */
4139
- 'no-void'?: [({
4140
- allowAsStatement?: boolean,
4141
- })?],
4142
- /**
4143
- * Disallow specified warning terms in comments
4144
- * @see https://eslint.org/docs/latest/rules/no-warning-comments
4145
- */
4146
- 'no-warning-comments'?: [({
4147
- terms?: (string)[],
4148
- location?: "start" | "anywhere",
4149
- decoration?: (string)[],
4150
- })?],
4151
- /**
4152
- * Disallow whitespace before properties
4153
- * @see https://eslint.org/docs/latest/rules/no-whitespace-before-property
4154
- */
4155
- 'no-whitespace-before-property'?: [],
4156
- /**
4157
- * Disallow `with` statements
4158
- * @see https://eslint.org/docs/latest/rules/no-with
4159
- */
4160
- 'no-with'?: [],
4161
- /**
4162
- * Enforce the location of single-line statements
4163
- * @see https://eslint.org/docs/latest/rules/nonblock-statement-body-position
4164
- */
4165
- 'nonblock-statement-body-position'?: [("beside" | "below" | "any")?, ({
4166
- overrides?: {
4167
- if?: "beside" | "below" | "any",
4168
- else?: "beside" | "below" | "any",
4169
- while?: "beside" | "below" | "any",
4170
- do?: "beside" | "below" | "any",
4171
- for?: "beside" | "below" | "any",
4172
- },
4173
- })?],
4174
- /**
4175
- * Enforce consistent line breaks after opening and before closing braces
4176
- * @see https://eslint.org/docs/latest/rules/object-curly-newline
4177
- */
4178
- 'object-curly-newline'?: [("always" | "never" | {
4179
- multiline?: boolean,
4180
- minProperties?: number,
4181
- consistent?: boolean,
4182
- } | {
4183
- ObjectExpression?: "always" | "never" | {
4184
- multiline?: boolean,
4185
- minProperties?: number,
4186
- consistent?: boolean,
4187
- },
4188
- ObjectPattern?: "always" | "never" | {
4189
- multiline?: boolean,
4190
- minProperties?: number,
4191
- consistent?: boolean,
4192
- },
4193
- ImportDeclaration?: "always" | "never" | {
4194
- multiline?: boolean,
4195
- minProperties?: number,
4196
- consistent?: boolean,
4197
- },
4198
- ExportDeclaration?: "always" | "never" | {
4199
- multiline?: boolean,
4200
- minProperties?: number,
4201
- consistent?: boolean,
4202
- },
4203
- })?],
4204
- /**
4205
- * Enforce consistent spacing inside braces
4206
- * @see https://eslint.org/docs/latest/rules/object-curly-spacing
4207
- */
4208
- 'object-curly-spacing'?: [("always" | "never")?, ({
4209
- arraysInObjects?: boolean,
4210
- objectsInObjects?: boolean,
4211
- })?],
4212
- /**
4213
- * Enforce placing object properties on separate lines
4214
- * @see https://eslint.org/docs/latest/rules/object-property-newline
4215
- */
4216
- 'object-property-newline'?: [({
4217
- allowAllPropertiesOnSameLine?: boolean,
4218
- allowMultiplePropertiesPerLine?: boolean,
4219
- })?],
4220
- /**
4221
- * Require or disallow method and property shorthand syntax for object literals
4222
- * @see https://eslint.org/docs/latest/rules/object-shorthand
4223
- */
4224
- 'object-shorthand'?: ["always" | "methods" | "properties" | "never" | "consistent" | "consistent-as-needed"] | ["always" | "methods" | "properties", {
4225
- avoidQuotes?: boolean,
4226
- }] | ["always" | "methods", {
4227
- ignoreConstructors?: boolean,
4228
- methodsIgnorePattern?: string,
4229
- avoidQuotes?: boolean,
4230
- avoidExplicitReturnArrows?: boolean,
4231
- }],
4232
- /**
4233
- * Require or disallow newlines around variable declarations
4234
- * @see https://eslint.org/docs/latest/rules/one-var-declaration-per-line
4235
- */
4236
- 'one-var-declaration-per-line'?: [("always" | "initializations")?],
4237
- /**
4238
- * Enforce variables to be declared either together or separately in functions
4239
- * @see https://eslint.org/docs/latest/rules/one-var
4240
- */
4241
- 'one-var'?: [("always" | "never" | "consecutive" | {
4242
- separateRequires?: boolean,
4243
- var?: "always" | "never" | "consecutive",
4244
- let?: "always" | "never" | "consecutive",
4245
- const?: "always" | "never" | "consecutive",
4246
- } | {
4247
- initialized?: "always" | "never" | "consecutive",
4248
- uninitialized?: "always" | "never" | "consecutive",
4249
- })?],
4250
- /**
4251
- * Require or disallow assignment operator shorthand where possible
4252
- * @see https://eslint.org/docs/latest/rules/operator-assignment
4253
- */
4254
- 'operator-assignment'?: [("always" | "never")?],
4255
- /**
4256
- * Enforce consistent linebreak style for operators
4257
- * @see https://eslint.org/docs/latest/rules/operator-linebreak
4258
- */
4259
- 'operator-linebreak'?: [("after" | "before" | "none" | null)?, ({
4260
- overrides?: { [key: string]: unknown },
4261
- })?],
4262
- /**
4263
- * Require or disallow padding within blocks
4264
- * @see https://eslint.org/docs/latest/rules/padded-blocks
4265
- */
4266
- 'padded-blocks'?: [("always" | "never" | {
4267
- blocks?: "always" | "never",
4268
- switches?: "always" | "never",
4269
- classes?: "always" | "never",
4270
- })?, ({
4271
- allowSingleLineBlocks?: boolean,
4272
- })?],
4273
- /**
4274
- * Require or disallow padding lines between statements
4275
- * @see https://eslint.org/docs/latest/rules/padding-line-between-statements
4276
- */
4277
- 'padding-line-between-statements'?: ({
4278
- blankLine: Def21_paddingType,
4279
- prev: Def22_statementType,
4280
- next: Def22_statementType,
4281
- })[],
4282
- /**
4283
- * Require using arrow functions for callbacks
4284
- * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
4285
- */
4286
- 'prefer-arrow-callback'?: [({
4287
- allowNamedFunctions?: boolean,
4288
- allowUnboundThis?: boolean,
4289
- })?],
4290
- /**
4291
- * Require `const` declarations for variables that are never reassigned after declared
4292
- * @see https://eslint.org/docs/latest/rules/prefer-const
4293
- */
4294
- 'prefer-const'?: [({
4295
- destructuring?: "any" | "all",
4296
- ignoreReadBeforeAssign?: boolean,
4297
- })?],
4298
- /**
4299
- * Require destructuring from arrays and/or objects
4300
- * @see https://eslint.org/docs/latest/rules/prefer-destructuring
4301
- */
4302
- 'prefer-destructuring'?: [({
4303
- VariableDeclarator?: {
4304
- array?: boolean,
4305
- object?: boolean,
4306
- },
4307
- AssignmentExpression?: {
4308
- array?: boolean,
4309
- object?: boolean,
4310
- },
4311
- } | {
4312
- array?: boolean,
4313
- object?: boolean,
4314
- })?, ({
4315
- enforceForRenamedProperties?: boolean,
4316
- })?],
4317
- /**
4318
- * Disallow the use of `Math.pow` in favor of the `**` operator
4319
- * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator
4320
- */
4321
- 'prefer-exponentiation-operator'?: [],
4322
- /**
4323
- * Enforce using named capture group in regular expression
4324
- * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group
4325
- */
4326
- 'prefer-named-capture-group'?: [],
4327
- /**
4328
- * Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
4329
- * @see https://eslint.org/docs/latest/rules/prefer-numeric-literals
4330
- */
4331
- 'prefer-numeric-literals'?: [],
4332
- /**
4333
- * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`
4334
- * @see https://eslint.org/docs/latest/rules/prefer-object-has-own
4335
- */
4336
- 'prefer-object-has-own'?: [],
4337
- /**
4338
- * Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead
4339
- * @see https://eslint.org/docs/latest/rules/prefer-object-spread
4340
- */
4341
- 'prefer-object-spread'?: [],
4342
- /**
4343
- * Require using Error objects as Promise rejection reasons
4344
- * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors
4345
- */
4346
- 'prefer-promise-reject-errors'?: [({
4347
- allowEmptyReject?: boolean,
4348
- })?],
4349
- /**
4350
- * Require `Reflect` methods where applicable
4351
- * @see https://eslint.org/docs/latest/rules/prefer-reflect
4352
- */
4353
- 'prefer-reflect'?: [({
4354
- exceptions?: ("apply" | "call" | "delete" | "defineProperty" | "getOwnPropertyDescriptor" | "getPrototypeOf" | "setPrototypeOf" | "isExtensible" | "getOwnPropertyNames" | "preventExtensions")[],
4355
- })?],
4356
- /**
4357
- * Disallow use of the `RegExp` constructor in favor of regular expression literals
4358
- * @see https://eslint.org/docs/latest/rules/prefer-regex-literals
4359
- */
4360
- 'prefer-regex-literals'?: [({
4361
- disallowRedundantWrapping?: boolean,
4362
- })?],
4363
- /**
4364
- * Require rest parameters instead of `arguments`
4365
- * @see https://eslint.org/docs/latest/rules/prefer-rest-params
4366
- */
4367
- 'prefer-rest-params'?: [],
4368
- /**
4369
- * Require spread operators instead of `.apply()`
4370
- * @see https://eslint.org/docs/latest/rules/prefer-spread
4371
- */
4372
- 'prefer-spread'?: [],
4373
- /**
4374
- * Require template literals instead of string concatenation
4375
- * @see https://eslint.org/docs/latest/rules/prefer-template
4376
- */
4377
- 'prefer-template'?: [],
4378
- /**
4379
- * Require quotes around object literal property names
4380
- * @see https://eslint.org/docs/latest/rules/quote-props
4381
- */
4382
- 'quote-props'?: ["always" | "as-needed" | "consistent" | "consistent-as-needed"] | ["always" | "as-needed" | "consistent" | "consistent-as-needed", {
4383
- keywords?: boolean,
4384
- unnecessary?: boolean,
4385
- numbers?: boolean,
4386
- }],
4387
- /**
4388
- * Enforce the consistent use of either backticks, double, or single quotes
4389
- * @see https://eslint.org/docs/latest/rules/quotes
4390
- */
4391
- 'quotes'?: [("single" | "double" | "backtick")?, ("avoid-escape" | {
4392
- avoidEscape?: boolean,
4393
- allowTemplateLiterals?: boolean,
4394
- })?],
4395
- /**
4396
- * Enforce the consistent use of the radix argument when using `parseInt()`
4397
- * @see https://eslint.org/docs/latest/rules/radix
4398
- */
4399
- 'radix'?: [("always" | "as-needed")?],
4400
- /**
4401
- * Disallow assignments that can lead to race conditions due to usage of `await` or `yield`
4402
- * @see https://eslint.org/docs/latest/rules/require-atomic-updates
4403
- */
4404
- 'require-atomic-updates'?: [({
4405
- allowProperties?: boolean,
4406
- })?],
4407
- /**
4408
- * Disallow async functions which have no `await` expression
4409
- * @see https://eslint.org/docs/latest/rules/require-await
4410
- */
4411
- 'require-await'?: [],
4412
- /**
4413
- * Enforce the use of `u` or `v` flag on regular expressions
4414
- * @see https://eslint.org/docs/latest/rules/require-unicode-regexp
4415
- */
4416
- 'require-unicode-regexp'?: [({
4417
- requireFlag?: "u" | "v",
4418
- })?],
4419
- /**
4420
- * Require generator functions to contain `yield`
4421
- * @see https://eslint.org/docs/latest/rules/require-yield
4422
- */
4423
- 'require-yield'?: [],
4424
- /**
4425
- * Enforce spacing between rest and spread operators and their expressions
4426
- * @see https://eslint.org/docs/latest/rules/rest-spread-spacing
4427
- */
4428
- 'rest-spread-spacing'?: [("always" | "never")?],
4429
- /**
4430
- * Enforce consistent spacing before and after semicolons
4431
- * @see https://eslint.org/docs/latest/rules/semi-spacing
4432
- */
4433
- 'semi-spacing'?: [({
4434
- before?: boolean,
4435
- after?: boolean,
4436
- })?],
4437
- /**
4438
- * Enforce location of semicolons
4439
- * @see https://eslint.org/docs/latest/rules/semi-style
4440
- */
4441
- 'semi-style'?: [("last" | "first")?],
4442
- /**
4443
- * Require or disallow semicolons instead of ASI
4444
- * @see https://eslint.org/docs/latest/rules/semi
4445
- */
4446
- 'semi'?: ["never", {
4447
- beforeStatementContinuationChars?: "always" | "any" | "never",
4448
- }] | ["always", {
4449
- omitLastInOneLineBlock?: boolean,
4450
- omitLastInOneLineClassBody?: boolean,
4451
- }],
4452
- /**
4453
- * Enforce sorted `import` declarations within modules
4454
- * @see https://eslint.org/docs/latest/rules/sort-imports
4455
- */
4456
- 'sort-imports'?: [({
4457
- ignoreCase?: boolean,
4458
- memberSyntaxSortOrder?: ("none" | "all" | "multiple" | "single")[],
4459
- ignoreDeclarationSort?: boolean,
4460
- ignoreMemberSort?: boolean,
4461
- allowSeparatedGroups?: boolean,
4462
- })?],
4463
- /**
4464
- * Require object keys to be sorted
4465
- * @see https://eslint.org/docs/latest/rules/sort-keys
4466
- */
4467
- 'sort-keys'?: [("asc" | "desc")?, ({
4468
- caseSensitive?: boolean,
4469
- natural?: boolean,
4470
- minKeys?: number,
4471
- allowLineSeparatedGroups?: boolean,
4472
- ignoreComputedKeys?: boolean,
4473
- })?],
4474
- /**
4475
- * Require variables within the same declaration block to be sorted
4476
- * @see https://eslint.org/docs/latest/rules/sort-vars
4477
- */
4478
- 'sort-vars'?: [({
4479
- ignoreCase?: boolean,
4480
- })?],
4481
- /**
4482
- * Enforce consistent spacing before blocks
4483
- * @see https://eslint.org/docs/latest/rules/space-before-blocks
4484
- */
4485
- 'space-before-blocks'?: [("always" | "never" | {
4486
- keywords?: "always" | "never" | "off",
4487
- functions?: "always" | "never" | "off",
4488
- classes?: "always" | "never" | "off",
4489
- })?],
4490
- /**
4491
- * Enforce consistent spacing before `function` definition opening parenthesis
4492
- * @see https://eslint.org/docs/latest/rules/space-before-function-paren
4493
- */
4494
- 'space-before-function-paren'?: [("always" | "never" | {
4495
- anonymous?: "always" | "never" | "ignore",
4496
- named?: "always" | "never" | "ignore",
4497
- asyncArrow?: "always" | "never" | "ignore",
4498
- })?],
4499
- /**
4500
- * Enforce consistent spacing inside parentheses
4501
- * @see https://eslint.org/docs/latest/rules/space-in-parens
4502
- */
4503
- 'space-in-parens'?: [("always" | "never")?, ({
4504
- exceptions?: ("{}" | "[]" | "()" | "empty")[],
4505
- })?],
4506
- /**
4507
- * Require spacing around infix operators
4508
- * @see https://eslint.org/docs/latest/rules/space-infix-ops
4509
- */
4510
- 'space-infix-ops'?: [({
4511
- int32Hint?: boolean,
4512
- })?],
4513
- /**
4514
- * Enforce consistent spacing before or after unary operators
4515
- * @see https://eslint.org/docs/latest/rules/space-unary-ops
4516
- */
4517
- 'space-unary-ops'?: [({
4518
- words?: boolean,
4519
- nonwords?: boolean,
4520
- overrides?: { [key: string]: unknown },
4521
- })?],
4522
- /**
4523
- * Enforce consistent spacing after the `//` or `/*` in a comment
4524
- * @see https://eslint.org/docs/latest/rules/spaced-comment
4525
- */
4526
- 'spaced-comment'?: [("always" | "never")?, ({
4527
- exceptions?: (string)[],
4528
- markers?: (string)[],
4529
- line?: {
4530
- exceptions?: (string)[],
4531
- markers?: (string)[],
4532
- },
4533
- block?: {
4534
- exceptions?: (string)[],
4535
- markers?: (string)[],
4536
- balanced?: boolean,
4537
- },
4538
- })?],
4539
- /**
4540
- * Require or disallow strict mode directives
4541
- * @see https://eslint.org/docs/latest/rules/strict
4542
- */
4543
- 'strict'?: [("never" | "global" | "function" | "safe")?],
4544
- /**
4545
- * Enforce spacing around colons of switch statements
4546
- * @see https://eslint.org/docs/latest/rules/switch-colon-spacing
4547
- */
4548
- 'switch-colon-spacing'?: [({
4549
- before?: boolean,
4550
- after?: boolean,
4551
- })?],
4552
- /**
4553
- * Require symbol descriptions
4554
- * @see https://eslint.org/docs/latest/rules/symbol-description
4555
- */
4556
- 'symbol-description'?: [],
4557
- /**
4558
- * Require or disallow spacing around embedded expressions of template strings
4559
- * @see https://eslint.org/docs/latest/rules/template-curly-spacing
4560
- */
4561
- 'template-curly-spacing'?: [("always" | "never")?],
4562
- /**
4563
- * Require or disallow spacing between template tags and their literals
4564
- * @see https://eslint.org/docs/latest/rules/template-tag-spacing
4565
- */
4566
- 'template-tag-spacing'?: [("always" | "never")?],
4567
- /**
4568
- * Require or disallow Unicode byte order mark (BOM)
4569
- * @see https://eslint.org/docs/latest/rules/unicode-bom
4570
- */
4571
- 'unicode-bom'?: [("always" | "never")?],
4572
- /**
4573
- * Require calls to `isNaN()` when checking for `NaN`
4574
- * @see https://eslint.org/docs/latest/rules/use-isnan
4575
- */
4576
- 'use-isnan'?: [({
4577
- enforceForSwitchCase?: boolean,
4578
- enforceForIndexOf?: boolean,
4579
- })?],
4580
- /**
4581
- * Enforce comparing `typeof` expressions against valid strings
4582
- * @see https://eslint.org/docs/latest/rules/valid-typeof
4583
- */
4584
- 'valid-typeof'?: [({
4585
- requireStringLiterals?: boolean,
4586
- })?],
4587
- /**
4588
- * Require `var` declarations be placed at the top of their containing scope
4589
- * @see https://eslint.org/docs/latest/rules/vars-on-top
4590
- */
4591
- 'vars-on-top'?: [],
4592
- /**
4593
- * Require parentheses around immediate `function` invocations
4594
- * @see https://eslint.org/docs/latest/rules/wrap-iife
4595
- */
4596
- 'wrap-iife'?: [("outside" | "inside" | "any")?, ({
4597
- functionPrototypeMethods?: boolean,
4598
- })?],
4599
- /**
4600
- * Require parenthesis around regex literals
4601
- * @see https://eslint.org/docs/latest/rules/wrap-regex
4602
- */
4603
- 'wrap-regex'?: [],
4604
- /**
4605
- * Require or disallow spacing around the `*` in `yield*` expressions
4606
- * @see https://eslint.org/docs/latest/rules/yield-star-spacing
4607
- */
4608
- 'yield-star-spacing'?: [("before" | "after" | "both" | "neither" | {
4609
- before?: boolean,
4610
- after?: boolean,
4611
- })?],
4612
- /**
4613
- * Require or disallow "Yoda" conditions
4614
- * @see https://eslint.org/docs/latest/rules/yoda
4615
- */
4616
- 'yoda'?: [("always" | "never")?, ({
4617
- exceptRange?: boolean,
4618
- onlyEquality?: boolean,
4619
- })?],
4620
- /**
4621
- * Expects type error, type snapshot, or type.
4622
- * @see https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/blob/main/docs/rules/expect.md
4623
- */
4624
- 'expect-type/expect'?: [({
4625
- disableExpectTypeSnapshotFix?: boolean,
4626
- })?],
1
+ export interface ESLintRulesConfig extends Record<string, any[]> {
2
+ [key: string]: any[];
4627
3
  }
4628
-
4629
- type Def0_arrayOption = "array" | "generic" | "array-simple";
4630
- type Def1_directiveConfigSchema = boolean | "allow-with-description" | {
4631
- descriptionFormat?: string,
4632
- };
4633
- type Def2_accessibilityLevel = "explicit" | "no-public" | "off";
4634
- type Def4_allItems = "readonly-signature" | "signature" | "readonly-field" | "public-readonly-field" | "public-decorated-readonly-field" | "decorated-readonly-field" | "static-readonly-field" | "public-static-readonly-field" | "instance-readonly-field" | "public-instance-readonly-field" | "abstract-readonly-field" | "public-abstract-readonly-field" | "protected-readonly-field" | "protected-decorated-readonly-field" | "protected-static-readonly-field" | "protected-instance-readonly-field" | "protected-abstract-readonly-field" | "private-readonly-field" | "private-decorated-readonly-field" | "private-static-readonly-field" | "private-instance-readonly-field" | "#private-readonly-field" | "#private-static-readonly-field" | "#private-instance-readonly-field" | "field" | "public-field" | "public-decorated-field" | "decorated-field" | "static-field" | "public-static-field" | "instance-field" | "public-instance-field" | "abstract-field" | "public-abstract-field" | "protected-field" | "protected-decorated-field" | "protected-static-field" | "protected-instance-field" | "protected-abstract-field" | "private-field" | "private-decorated-field" | "private-static-field" | "private-instance-field" | "#private-field" | "#private-static-field" | "#private-instance-field" | "method" | "public-method" | "public-decorated-method" | "decorated-method" | "static-method" | "public-static-method" | "instance-method" | "public-instance-method" | "abstract-method" | "public-abstract-method" | "protected-method" | "protected-decorated-method" | "protected-static-method" | "protected-instance-method" | "protected-abstract-method" | "private-method" | "private-decorated-method" | "private-static-method" | "private-instance-method" | "#private-method" | "#private-static-method" | "#private-instance-method" | "call-signature" | "constructor" | "public-constructor" | "protected-constructor" | "private-constructor" | "accessor" | "public-accessor" | "public-decorated-accessor" | "decorated-accessor" | "static-accessor" | "public-static-accessor" | "instance-accessor" | "public-instance-accessor" | "abstract-accessor" | "public-abstract-accessor" | "protected-accessor" | "protected-decorated-accessor" | "protected-static-accessor" | "protected-instance-accessor" | "protected-abstract-accessor" | "private-accessor" | "private-decorated-accessor" | "private-static-accessor" | "private-instance-accessor" | "#private-accessor" | "#private-static-accessor" | "#private-instance-accessor" | "get" | "public-get" | "public-decorated-get" | "decorated-get" | "static-get" | "public-static-get" | "instance-get" | "public-instance-get" | "abstract-get" | "public-abstract-get" | "protected-get" | "protected-decorated-get" | "protected-static-get" | "protected-instance-get" | "protected-abstract-get" | "private-get" | "private-decorated-get" | "private-static-get" | "private-instance-get" | "#private-get" | "#private-static-get" | "#private-instance-get" | "set" | "public-set" | "public-decorated-set" | "decorated-set" | "static-set" | "public-static-set" | "instance-set" | "public-instance-set" | "abstract-set" | "public-abstract-set" | "protected-set" | "protected-decorated-set" | "protected-static-set" | "protected-instance-set" | "protected-abstract-set" | "private-set" | "private-decorated-set" | "private-static-set" | "private-instance-set" | "#private-set" | "#private-static-set" | "#private-instance-set" | "static-initialization" | "static-static-initialization" | "public-static-static-initialization" | "instance-static-initialization" | "public-instance-static-initialization" | "abstract-static-initialization" | "public-abstract-static-initialization" | "protected-static-static-initialization" | "protected-instance-static-initialization" | "protected-abstract-static-initialization" | "private-static-static-initialization" | "private-instance-static-initialization" | "#private-static-static-initialization" | "#private-instance-static-initialization";
4635
- type Def5_optionalityOrderOptions = "optional-first" | "required-first";
4636
- type Def6_orderOptions = "alphabetically" | "alphabetically-case-insensitive" | "as-written" | "natural" | "natural-case-insensitive";
4637
- type Def3_baseConfig = "never" | (Def4_allItems | (Def4_allItems)[])[] | {
4638
- memberTypes?: (Def4_allItems | (Def4_allItems)[])[] | "never",
4639
- optionalityOrder?: Def5_optionalityOrderOptions,
4640
- order?: Def6_orderOptions,
4641
- };
4642
- type Def8_typeItems = "readonly-signature" | "signature" | "readonly-field" | "field" | "method" | "constructor";
4643
- type Def7_typesConfig = "never" | (Def8_typeItems | (Def8_typeItems)[])[] | {
4644
- memberTypes?: (Def8_typeItems | (Def8_typeItems)[])[] | "never",
4645
- optionalityOrder?: Def5_optionalityOrderOptions,
4646
- order?: Def6_orderOptions,
4647
- };
4648
- type Def9_matchRegexConfig = {
4649
- match: boolean,
4650
- regex: string,
4651
- };
4652
- type Def11_predefinedFormats = "camelCase" | "strictCamelCase" | "PascalCase" | "StrictPascalCase" | "snake_case" | "UPPER_CASE";
4653
- type Def10_formatOptionsConfig = (Def11_predefinedFormats)[] | null;
4654
- type Def12_underscoreOptions = "forbid" | "allow" | "require" | "requireDouble" | "allowDouble" | "allowSingleOrDouble";
4655
- type Def13_prefixSuffixConfig = (string)[];
4656
- type Def14_typeModifiers = "boolean" | "string" | "number" | "function" | "array";
4657
- type Def15_expandedOptions = "always" | "never" | "in-unions" | "in-intersections" | "in-unions-and-intersections";
4658
- type Def16_simpleOptions = "always" | "never";
4659
- type Def17_modifier = "readonly" | "private" | "protected" | "public" | "private readonly" | "protected readonly" | "public readonly";
4660
- type Def18_basicConfig = "always" | "never" | "consistent" | {
4661
- multiline?: boolean,
4662
- minItems?: number | null,
4663
- };
4664
- type Def19_value = "always-multiline" | "always" | "never" | "only-multiline";
4665
- type Def20_valueWithIgnore = "always-multiline" | "always" | "ignore" | "never" | "only-multiline";
4666
- type Def21_paddingType = "any" | "never" | "always";
4667
- type Def22_statementType = "*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | ("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with")[];