@fabdeh/eslint-config 0.8.0 → 0.9.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.d.ts → index.d.mts} +390 -168
- package/dist/{index.js → index.mjs} +3 -5
- package/package.json +45 -47
|
@@ -12,13 +12,12 @@ interface RuleOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
'@angular-eslint/component-class-suffix'?: Linter.RuleEntry<AngularEslintComponentClassSuffix>;
|
|
14
14
|
/**
|
|
15
|
-
* Enforces a maximum number of lines in inline template, styles and animations.
|
|
15
|
+
* Enforces a maximum number of lines in inline template, styles and animations.
|
|
16
16
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md
|
|
17
17
|
*/
|
|
18
18
|
'@angular-eslint/component-max-inline-declarations'?: Linter.RuleEntry<AngularEslintComponentMaxInlineDeclarations>;
|
|
19
19
|
/**
|
|
20
|
-
* Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#
|
|
21
|
-
and https://angular.dev/style-guide#style-05-03.
|
|
20
|
+
* Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#choosing-component-selectors.
|
|
22
21
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md
|
|
23
22
|
*/
|
|
24
23
|
'@angular-eslint/component-selector'?: Linter.RuleEntry<AngularEslintComponentSelector>;
|
|
@@ -28,7 +27,7 @@ interface RuleOptions {
|
|
|
28
27
|
*/
|
|
29
28
|
'@angular-eslint/consistent-component-styles'?: Linter.RuleEntry<AngularEslintConsistentComponentStyles>;
|
|
30
29
|
/**
|
|
31
|
-
* Ensures that classes use contextual decorators in
|
|
30
|
+
* Ensures that classes use contextual decorators in their body
|
|
32
31
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md
|
|
33
32
|
*/
|
|
34
33
|
'@angular-eslint/contextual-decorator'?: Linter.RuleEntry<[]>;
|
|
@@ -43,7 +42,7 @@ interface RuleOptions {
|
|
|
43
42
|
*/
|
|
44
43
|
'@angular-eslint/directive-class-suffix'?: Linter.RuleEntry<AngularEslintDirectiveClassSuffix>;
|
|
45
44
|
/**
|
|
46
|
-
* Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#
|
|
45
|
+
* Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#choosing-directive-selectors.
|
|
47
46
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md
|
|
48
47
|
*/
|
|
49
48
|
'@angular-eslint/directive-selector'?: Linter.RuleEntry<AngularEslintDirectiveSelector>;
|
|
@@ -53,13 +52,14 @@ interface RuleOptions {
|
|
|
53
52
|
*/
|
|
54
53
|
'@angular-eslint/no-async-lifecycle-method'?: Linter.RuleEntry<[]>;
|
|
55
54
|
/**
|
|
56
|
-
* The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use
|
|
55
|
+
* The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use case than getting a stream of values (using @Input), so the @Attribute decorator is often mistakenly used when @Input is intended. This rule disallows the usage of @Attribute decorator entirely to prevent these mistakes.
|
|
57
56
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md
|
|
58
57
|
*/
|
|
59
58
|
'@angular-eslint/no-attribute-decorator'?: Linter.RuleEntry<[]>;
|
|
60
59
|
/**
|
|
61
|
-
* Ensures that directives not implement conflicting lifecycle interfaces.
|
|
60
|
+
* Ensures that directives do not implement conflicting lifecycle interfaces.
|
|
62
61
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md
|
|
62
|
+
* @deprecated
|
|
63
63
|
*/
|
|
64
64
|
'@angular-eslint/no-conflicting-lifecycle'?: Linter.RuleEntry<[]>;
|
|
65
65
|
/**
|
|
@@ -98,7 +98,7 @@ interface RuleOptions {
|
|
|
98
98
|
*/
|
|
99
99
|
'@angular-eslint/no-input-rename'?: Linter.RuleEntry<AngularEslintNoInputRename>;
|
|
100
100
|
/**
|
|
101
|
-
* Disallows usage of the `inputs` metadata property
|
|
101
|
+
* Disallows usage of the `inputs` metadata property
|
|
102
102
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md
|
|
103
103
|
*/
|
|
104
104
|
'@angular-eslint/no-inputs-metadata-property'?: Linter.RuleEntry<[]>;
|
|
@@ -123,7 +123,7 @@ interface RuleOptions {
|
|
|
123
123
|
*/
|
|
124
124
|
'@angular-eslint/no-output-rename'?: Linter.RuleEntry<[]>;
|
|
125
125
|
/**
|
|
126
|
-
* Disallows usage of the `outputs` metadata property
|
|
126
|
+
* Disallows usage of the `outputs` metadata property
|
|
127
127
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md
|
|
128
128
|
*/
|
|
129
129
|
'@angular-eslint/no-outputs-metadata-property'?: Linter.RuleEntry<[]>;
|
|
@@ -133,7 +133,7 @@ interface RuleOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
'@angular-eslint/no-pipe-impure'?: Linter.RuleEntry<[]>;
|
|
135
135
|
/**
|
|
136
|
-
* Disallows usage of the `queries` metadata property.
|
|
136
|
+
* Disallows usage of the `queries` metadata property.
|
|
137
137
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md
|
|
138
138
|
*/
|
|
139
139
|
'@angular-eslint/no-queries-metadata-property'?: Linter.RuleEntry<[]>;
|
|
@@ -147,6 +147,11 @@ interface RuleOptions {
|
|
|
147
147
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md
|
|
148
148
|
*/
|
|
149
149
|
'@angular-eslint/pipe-prefix'?: Linter.RuleEntry<AngularEslintPipePrefix>;
|
|
150
|
+
/**
|
|
151
|
+
* Use `host` metadata property instead of `@HostBinding` and `HostListener`
|
|
152
|
+
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-host-metadata-property.md
|
|
153
|
+
*/
|
|
154
|
+
'@angular-eslint/prefer-host-metadata-property'?: Linter.RuleEntry<[]>;
|
|
150
155
|
/**
|
|
151
156
|
* Prefer using the inject() function over constructor parameter injection
|
|
152
157
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md
|
|
@@ -178,7 +183,7 @@ interface RuleOptions {
|
|
|
178
183
|
*/
|
|
179
184
|
'@angular-eslint/prefer-standalone'?: Linter.RuleEntry<[]>;
|
|
180
185
|
/**
|
|
181
|
-
* The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.
|
|
186
|
+
* The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.
|
|
182
187
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md
|
|
183
188
|
*/
|
|
184
189
|
'@angular-eslint/relative-url-prefix'?: Linter.RuleEntry<[]>;
|
|
@@ -243,7 +248,7 @@ interface RuleOptions {
|
|
|
243
248
|
*/
|
|
244
249
|
'@angular-eslint/template/cyclomatic-complexity'?: Linter.RuleEntry<AngularEslintTemplateCyclomaticComplexity>;
|
|
245
250
|
/**
|
|
246
|
-
* [Accessibility] Ensures that the heading, anchor and button elements have content in
|
|
251
|
+
* [Accessibility] Ensures that the heading, anchor and button elements have content in them
|
|
247
252
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/elements-content.md
|
|
248
253
|
*/
|
|
249
254
|
'@angular-eslint/template/elements-content'?: Linter.RuleEntry<AngularEslintTemplateElementsContent>;
|
|
@@ -327,11 +332,21 @@ interface RuleOptions {
|
|
|
327
332
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-positive-tabindex.md
|
|
328
333
|
*/
|
|
329
334
|
'@angular-eslint/template/no-positive-tabindex'?: Linter.RuleEntry<[]>;
|
|
335
|
+
/**
|
|
336
|
+
* Prefer using `@else` instead of a second `@if` with the opposite condition to reduce code and make it easier to read.
|
|
337
|
+
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-at-else.md
|
|
338
|
+
*/
|
|
339
|
+
'@angular-eslint/template/prefer-at-else'?: Linter.RuleEntry<[]>;
|
|
330
340
|
/**
|
|
331
341
|
* Prefer using `@empty` with `@for` loops instead of a separate `@if` or `@else` block to reduce code and make it easier to read.
|
|
332
342
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-at-empty.md
|
|
333
343
|
*/
|
|
334
344
|
'@angular-eslint/template/prefer-at-empty'?: Linter.RuleEntry<[]>;
|
|
345
|
+
/**
|
|
346
|
+
* Encourages the use of Angular built-in pipes (e.g. lowercase, uppercase, titlecase) instead of certain JavaScript methods in Angular templates.
|
|
347
|
+
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-built-in-pipes.md
|
|
348
|
+
*/
|
|
349
|
+
'@angular-eslint/template/prefer-built-in-pipes'?: Linter.RuleEntry<AngularEslintTemplatePreferBuiltInPipes>;
|
|
335
350
|
/**
|
|
336
351
|
* Ensures that contextual variables are used in @for blocks where possible instead of aliasing them.
|
|
337
352
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-contextual-for-variables.md
|
|
@@ -398,7 +413,7 @@ interface RuleOptions {
|
|
|
398
413
|
*/
|
|
399
414
|
'@angular-eslint/use-injectable-provided-in'?: Linter.RuleEntry<AngularEslintUseInjectableProvidedIn>;
|
|
400
415
|
/**
|
|
401
|
-
* Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#
|
|
416
|
+
* Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#use-lifecycle-hook-interfaces
|
|
402
417
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md
|
|
403
418
|
*/
|
|
404
419
|
'@angular-eslint/use-lifecycle-interface'?: Linter.RuleEntry<[]>;
|
|
@@ -522,6 +537,11 @@ interface RuleOptions {
|
|
|
522
537
|
* @see https://eslint.style/rules/eol-last
|
|
523
538
|
*/
|
|
524
539
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
540
|
+
/**
|
|
541
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
542
|
+
* @see https://eslint.style/rules/list-style
|
|
543
|
+
*/
|
|
544
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
|
|
525
545
|
/**
|
|
526
546
|
* Enforce line breaks between arguments of a function call
|
|
527
547
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -1351,7 +1371,7 @@ interface RuleOptions {
|
|
|
1351
1371
|
* Disallow member access on a value with type `any`
|
|
1352
1372
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
1353
1373
|
*/
|
|
1354
|
-
'@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<
|
|
1374
|
+
'@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<TypescriptEslintNoUnsafeMemberAccess>;
|
|
1355
1375
|
/**
|
|
1356
1376
|
* Disallow returning a value with type `any` from a function
|
|
1357
1377
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -1372,6 +1392,11 @@ interface RuleOptions {
|
|
|
1372
1392
|
* @see https://typescript-eslint.io/rules/no-unused-expressions
|
|
1373
1393
|
*/
|
|
1374
1394
|
'@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions>;
|
|
1395
|
+
/**
|
|
1396
|
+
* Disallow unused private class members
|
|
1397
|
+
* @see https://typescript-eslint.io/rules/no-unused-private-class-members
|
|
1398
|
+
*/
|
|
1399
|
+
'@typescript-eslint/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
|
|
1375
1400
|
/**
|
|
1376
1401
|
* Disallow unused variables
|
|
1377
1402
|
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
@@ -2496,6 +2521,11 @@ interface RuleOptions {
|
|
|
2496
2521
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
|
|
2497
2522
|
*/
|
|
2498
2523
|
'jsdoc/require-property-type'?: Linter.RuleEntry<[]>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Requires that Promise rejections are documented with `@rejects` tags.
|
|
2526
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header
|
|
2527
|
+
*/
|
|
2528
|
+
'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects>;
|
|
2499
2529
|
/**
|
|
2500
2530
|
* Requires that returns are documented with `@returns`.
|
|
2501
2531
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
|
|
@@ -2581,6 +2611,26 @@ interface RuleOptions {
|
|
|
2581
2611
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
2582
2612
|
*/
|
|
2583
2613
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
2614
|
+
/**
|
|
2615
|
+
* Prefers either function properties or method signatures
|
|
2616
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
2617
|
+
*/
|
|
2618
|
+
'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
|
|
2619
|
+
/**
|
|
2620
|
+
* Warns against use of the empty object type
|
|
2621
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
|
|
2622
|
+
*/
|
|
2623
|
+
'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
2624
|
+
/**
|
|
2625
|
+
* Catches unnecessary template expressions such as string expressions within a template literal.
|
|
2626
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
|
|
2627
|
+
*/
|
|
2628
|
+
'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
|
|
2629
|
+
/**
|
|
2630
|
+
* Prefers function types over call signatures when there are no other properties.
|
|
2631
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
|
|
2632
|
+
*/
|
|
2633
|
+
'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
|
|
2584
2634
|
/**
|
|
2585
2635
|
* Formats JSDoc type values.
|
|
2586
2636
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
@@ -5117,710 +5167,725 @@ interface RuleOptions {
|
|
|
5117
5167
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5118
5168
|
/**
|
|
5119
5169
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
5121
5171
|
*/
|
|
5122
5172
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5123
5173
|
/**
|
|
5124
5174
|
* Enforce a specific parameter name in catch clauses.
|
|
5125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
5126
5176
|
*/
|
|
5127
5177
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5128
5178
|
/**
|
|
5129
5179
|
* Enforce consistent assertion style with `node:assert`.
|
|
5130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
5131
5181
|
*/
|
|
5132
5182
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5133
5183
|
/**
|
|
5134
5184
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
5136
5186
|
*/
|
|
5137
5187
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5138
5188
|
/**
|
|
5139
5189
|
* Use destructured variables over properties.
|
|
5140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
5141
5191
|
*/
|
|
5142
5192
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5143
5193
|
/**
|
|
5144
5194
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5146
5196
|
*/
|
|
5147
5197
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5148
5198
|
/**
|
|
5149
5199
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5151
5201
|
*/
|
|
5152
5202
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5153
5203
|
/**
|
|
5154
5204
|
* Move function definitions to the highest possible scope.
|
|
5155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5156
5206
|
*/
|
|
5157
5207
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5158
5208
|
/**
|
|
5159
5209
|
* Enforce correct `Error` subclassing.
|
|
5160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5161
5211
|
*/
|
|
5162
5212
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5163
5213
|
/**
|
|
5164
5214
|
* Enforce no spaces between braces.
|
|
5165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5166
5216
|
*/
|
|
5167
5217
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5168
5218
|
/**
|
|
5169
5219
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5171
5221
|
*/
|
|
5172
5222
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5173
5223
|
/**
|
|
5174
5224
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5176
5226
|
*/
|
|
5177
5227
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5178
5228
|
/**
|
|
5179
5229
|
* Add expiration conditions to TODO comments.
|
|
5180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5181
5231
|
*/
|
|
5182
5232
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5183
5233
|
/**
|
|
5184
5234
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5186
5236
|
*/
|
|
5187
5237
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5188
5238
|
/**
|
|
5189
5239
|
* Enforce a case style for filenames.
|
|
5190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5191
5241
|
*/
|
|
5192
5242
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5193
5243
|
/**
|
|
5194
5244
|
* Enforce specific import styles per module.
|
|
5195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5196
5246
|
*/
|
|
5197
5247
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5198
5248
|
/**
|
|
5199
5249
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5201
5251
|
*/
|
|
5202
5252
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5203
5253
|
/**
|
|
5204
5254
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5206
5256
|
*/
|
|
5207
5257
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5208
5258
|
/**
|
|
5209
5259
|
* Disallow recursive access to `this` within getters and setters.
|
|
5210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5211
5261
|
*/
|
|
5212
5262
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5213
5263
|
/**
|
|
5214
5264
|
* Disallow anonymous functions and classes as the default export.
|
|
5215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5216
5266
|
*/
|
|
5217
5267
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5218
5268
|
/**
|
|
5219
5269
|
* Prevent passing a function reference directly to iterator methods.
|
|
5220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5221
5271
|
*/
|
|
5222
5272
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5223
5273
|
/**
|
|
5224
5274
|
* Prefer `for…of` over the `forEach` method.
|
|
5225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5226
5276
|
*/
|
|
5227
5277
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5228
5278
|
/**
|
|
5229
5279
|
* Disallow using the `this` argument in array methods.
|
|
5230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5231
5281
|
*/
|
|
5232
5282
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5233
5283
|
/**
|
|
5234
5284
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5236
5286
|
* @deprecated
|
|
5237
5287
|
*/
|
|
5238
5288
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5239
5289
|
/**
|
|
5240
5290
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5242
5292
|
*/
|
|
5243
5293
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5244
5294
|
/**
|
|
5245
5295
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5247
5297
|
*/
|
|
5248
5298
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5249
5299
|
/**
|
|
5250
5300
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5252
5302
|
*/
|
|
5253
5303
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5254
5304
|
/**
|
|
5255
5305
|
* Disallow member access from await expression.
|
|
5256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5257
5307
|
*/
|
|
5258
5308
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5259
5309
|
/**
|
|
5260
5310
|
* Disallow using `await` in `Promise` method parameters.
|
|
5261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5262
5312
|
*/
|
|
5263
5313
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5264
5314
|
/**
|
|
5265
5315
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5267
5317
|
*/
|
|
5268
5318
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5269
5319
|
/**
|
|
5270
5320
|
* Do not use `document.cookie` directly.
|
|
5271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5272
5322
|
*/
|
|
5273
5323
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5274
5324
|
/**
|
|
5275
5325
|
* Disallow empty files.
|
|
5276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5277
5327
|
*/
|
|
5278
5328
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5279
5329
|
/**
|
|
5280
5330
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5282
5332
|
*/
|
|
5283
5333
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5284
5334
|
/**
|
|
5285
5335
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5287
5337
|
*/
|
|
5288
5338
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5339
|
+
/**
|
|
5340
|
+
* Disallow immediate mutation after variable assignment.
|
|
5341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5342
|
+
*/
|
|
5343
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5289
5344
|
/**
|
|
5290
5345
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5292
5347
|
* @deprecated
|
|
5293
5348
|
*/
|
|
5294
5349
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5295
5350
|
/**
|
|
5296
5351
|
* Disallow `instanceof` with built-in objects
|
|
5297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5298
5353
|
*/
|
|
5299
5354
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5300
5355
|
/**
|
|
5301
5356
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5303
5358
|
*/
|
|
5304
5359
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5305
5360
|
/**
|
|
5306
5361
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5308
5363
|
*/
|
|
5309
5364
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5310
5365
|
/**
|
|
5311
5366
|
* Disallow identifiers starting with `new` or `class`.
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5313
5368
|
*/
|
|
5314
5369
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5315
5370
|
/**
|
|
5316
5371
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5318
5373
|
* @deprecated
|
|
5319
5374
|
*/
|
|
5320
5375
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5321
5376
|
/**
|
|
5322
5377
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5324
5379
|
*/
|
|
5325
5380
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5326
5381
|
/**
|
|
5327
5382
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5329
5384
|
*/
|
|
5330
5385
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5331
5386
|
/**
|
|
5332
5387
|
* Disallow named usage of default import and export.
|
|
5333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5334
5389
|
*/
|
|
5335
5390
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5336
5391
|
/**
|
|
5337
5392
|
* Disallow negated conditions.
|
|
5338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5339
5394
|
*/
|
|
5340
5395
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5341
5396
|
/**
|
|
5342
5397
|
* Disallow negated expression in equality check.
|
|
5343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5344
5399
|
*/
|
|
5345
5400
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5346
5401
|
/**
|
|
5347
5402
|
* Disallow nested ternary expressions.
|
|
5348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5349
5404
|
*/
|
|
5350
5405
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5351
5406
|
/**
|
|
5352
5407
|
* Disallow `new Array()`.
|
|
5353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5354
5409
|
*/
|
|
5355
5410
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5356
5411
|
/**
|
|
5357
5412
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5359
5414
|
*/
|
|
5360
5415
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5361
5416
|
/**
|
|
5362
5417
|
* Disallow the use of the `null` literal.
|
|
5363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5364
5419
|
*/
|
|
5365
5420
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5366
5421
|
/**
|
|
5367
5422
|
* Disallow the use of objects as default parameters.
|
|
5368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5369
5424
|
*/
|
|
5370
5425
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5371
5426
|
/**
|
|
5372
5427
|
* Disallow `process.exit()`.
|
|
5373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5374
5429
|
*/
|
|
5375
5430
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5376
5431
|
/**
|
|
5377
5432
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5379
5434
|
*/
|
|
5380
5435
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5381
5436
|
/**
|
|
5382
5437
|
* Disallow classes that only have static members.
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5384
5439
|
*/
|
|
5385
5440
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5386
5441
|
/**
|
|
5387
5442
|
* Disallow `then` property.
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5389
5444
|
*/
|
|
5390
5445
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5391
5446
|
/**
|
|
5392
5447
|
* Disallow assigning `this` to a variable.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5394
5449
|
*/
|
|
5395
5450
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5396
5451
|
/**
|
|
5397
5452
|
* Disallow comparing `undefined` using `typeof`.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5399
5454
|
*/
|
|
5400
5455
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5401
5456
|
/**
|
|
5402
5457
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5404
5459
|
*/
|
|
5405
5460
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5406
5461
|
/**
|
|
5407
5462
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5409
5464
|
*/
|
|
5410
5465
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5411
5466
|
/**
|
|
5412
5467
|
* Disallow awaiting non-promise values.
|
|
5413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5414
5469
|
*/
|
|
5415
5470
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5416
5471
|
/**
|
|
5417
5472
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5419
5474
|
*/
|
|
5420
5475
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5421
5476
|
/**
|
|
5422
5477
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5424
5479
|
*/
|
|
5425
5480
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5426
5481
|
/**
|
|
5427
5482
|
* Disallow unreadable array destructuring.
|
|
5428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5429
5484
|
*/
|
|
5430
5485
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5431
5486
|
/**
|
|
5432
5487
|
* Disallow unreadable IIFEs.
|
|
5433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5434
5489
|
*/
|
|
5435
5490
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5436
5491
|
/**
|
|
5437
5492
|
* Disallow unused object properties.
|
|
5438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5439
5494
|
*/
|
|
5440
5495
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5496
|
+
/**
|
|
5497
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5499
|
+
*/
|
|
5500
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5441
5501
|
/**
|
|
5442
5502
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5444
5504
|
*/
|
|
5445
5505
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5446
5506
|
/**
|
|
5447
5507
|
* Disallow useless fallback when spreading in object literals.
|
|
5448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5449
5509
|
*/
|
|
5450
5510
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5451
5511
|
/**
|
|
5452
5512
|
* Disallow useless array length check.
|
|
5453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5454
5514
|
*/
|
|
5455
5515
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5456
5516
|
/**
|
|
5457
5517
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5459
5519
|
*/
|
|
5460
5520
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5461
5521
|
/**
|
|
5462
5522
|
* Disallow unnecessary spread.
|
|
5463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5464
5524
|
*/
|
|
5465
5525
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5466
5526
|
/**
|
|
5467
5527
|
* Disallow useless case in switch statements.
|
|
5468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5469
5529
|
*/
|
|
5470
5530
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5471
5531
|
/**
|
|
5472
5532
|
* Disallow useless `undefined`.
|
|
5473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5474
5534
|
*/
|
|
5475
5535
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5476
5536
|
/**
|
|
5477
5537
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5479
5539
|
*/
|
|
5480
5540
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5481
5541
|
/**
|
|
5482
5542
|
* Enforce proper case for numeric literals.
|
|
5483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5484
5544
|
*/
|
|
5485
5545
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5486
5546
|
/**
|
|
5487
5547
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5489
5549
|
*/
|
|
5490
5550
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5491
5551
|
/**
|
|
5492
5552
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5494
5554
|
*/
|
|
5495
5555
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5496
5556
|
/**
|
|
5497
5557
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5499
5559
|
*/
|
|
5500
5560
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5501
5561
|
/**
|
|
5502
5562
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5504
5564
|
*/
|
|
5505
5565
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5506
5566
|
/**
|
|
5507
5567
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5509
5569
|
*/
|
|
5510
5570
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5511
5571
|
/**
|
|
5512
5572
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5514
5574
|
*/
|
|
5515
5575
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5516
5576
|
/**
|
|
5517
5577
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5519
5579
|
*/
|
|
5520
5580
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5521
5581
|
/**
|
|
5522
5582
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
5524
5584
|
*/
|
|
5525
5585
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5526
5586
|
/**
|
|
5527
5587
|
* Prefer `BigInt` literals over the constructor.
|
|
5528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
5529
5589
|
*/
|
|
5530
5590
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5531
5591
|
/**
|
|
5532
5592
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5534
5594
|
*/
|
|
5535
5595
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5536
5596
|
/**
|
|
5537
5597
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
5539
5599
|
*/
|
|
5540
5600
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5541
5601
|
/**
|
|
5542
5602
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5544
5604
|
*/
|
|
5545
5605
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5546
5606
|
/**
|
|
5547
5607
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
5549
5609
|
*/
|
|
5550
5610
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5551
5611
|
/**
|
|
5552
5612
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
5554
5614
|
*/
|
|
5555
5615
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5556
5616
|
/**
|
|
5557
5617
|
* Prefer default parameters over reassignment.
|
|
5558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
5559
5619
|
*/
|
|
5560
5620
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5561
5621
|
/**
|
|
5562
5622
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
5564
5624
|
*/
|
|
5565
5625
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5566
5626
|
/**
|
|
5567
5627
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5569
5629
|
*/
|
|
5570
5630
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5571
5631
|
/**
|
|
5572
5632
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5574
5634
|
*/
|
|
5575
5635
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5576
5636
|
/**
|
|
5577
5637
|
* Prefer `.textContent` over `.innerText`.
|
|
5578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5579
5639
|
*/
|
|
5580
5640
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5581
5641
|
/**
|
|
5582
5642
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
5584
5644
|
*/
|
|
5585
5645
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5586
5646
|
/**
|
|
5587
5647
|
* Prefer `export…from` when re-exporting.
|
|
5588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
5589
5649
|
*/
|
|
5590
5650
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5591
5651
|
/**
|
|
5592
5652
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
5594
5654
|
*/
|
|
5595
5655
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5596
5656
|
/**
|
|
5597
5657
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5599
5659
|
*/
|
|
5600
5660
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5601
5661
|
/**
|
|
5602
5662
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
5604
5664
|
*/
|
|
5605
5665
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5606
5666
|
/**
|
|
5607
5667
|
* Prefer reading a JSON file as a buffer.
|
|
5608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5609
5669
|
*/
|
|
5610
5670
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5611
5671
|
/**
|
|
5612
5672
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5614
5674
|
*/
|
|
5615
5675
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5616
5676
|
/**
|
|
5617
5677
|
* Prefer using a logical operator over a ternary.
|
|
5618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5619
5679
|
*/
|
|
5620
5680
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5621
5681
|
/**
|
|
5622
5682
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
5624
5684
|
*/
|
|
5625
5685
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5626
5686
|
/**
|
|
5627
5687
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
5629
5689
|
*/
|
|
5630
5690
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5631
5691
|
/**
|
|
5632
5692
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5634
5694
|
*/
|
|
5635
5695
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5636
5696
|
/**
|
|
5637
5697
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5639
5699
|
*/
|
|
5640
5700
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5641
5701
|
/**
|
|
5642
5702
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
5644
5704
|
*/
|
|
5645
5705
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5646
5706
|
/**
|
|
5647
5707
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5649
5709
|
*/
|
|
5650
5710
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5651
5711
|
/**
|
|
5652
5712
|
* Prefer negative index over `.length - index` when possible.
|
|
5653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
5654
5714
|
*/
|
|
5655
5715
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5656
5716
|
/**
|
|
5657
5717
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
5659
5719
|
*/
|
|
5660
5720
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5661
5721
|
/**
|
|
5662
5722
|
* Prefer `Number` static properties over global ones.
|
|
5663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
5664
5724
|
*/
|
|
5665
5725
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5666
5726
|
/**
|
|
5667
5727
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
5669
5729
|
*/
|
|
5670
5730
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5671
5731
|
/**
|
|
5672
5732
|
* Prefer omitting the `catch` binding parameter.
|
|
5673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5674
5734
|
*/
|
|
5675
5735
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5676
5736
|
/**
|
|
5677
5737
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
5679
5739
|
*/
|
|
5680
5740
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5681
5741
|
/**
|
|
5682
5742
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
5684
5744
|
*/
|
|
5685
5745
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5686
5746
|
/**
|
|
5687
5747
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
5689
5749
|
*/
|
|
5690
5750
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5691
5751
|
/**
|
|
5692
5752
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
5694
5754
|
*/
|
|
5695
5755
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5756
|
+
/**
|
|
5757
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
5759
|
+
*/
|
|
5760
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5696
5761
|
/**
|
|
5697
5762
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
5699
5764
|
*/
|
|
5700
5765
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5701
5766
|
/**
|
|
5702
5767
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
5704
5769
|
*/
|
|
5705
5770
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5706
5771
|
/**
|
|
5707
5772
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
5709
5774
|
*/
|
|
5710
5775
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5711
5776
|
/**
|
|
5712
5777
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
5714
5779
|
*/
|
|
5715
5780
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5716
5781
|
/**
|
|
5717
5782
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
5719
5784
|
*/
|
|
5720
5785
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5721
5786
|
/**
|
|
5722
5787
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
5724
5789
|
*/
|
|
5725
5790
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5726
5791
|
/**
|
|
5727
5792
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
5729
5794
|
*/
|
|
5730
5795
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5731
5796
|
/**
|
|
5732
5797
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5734
5799
|
*/
|
|
5735
5800
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5736
5801
|
/**
|
|
5737
5802
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5739
5804
|
*/
|
|
5740
5805
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5741
5806
|
/**
|
|
5742
5807
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
5744
5809
|
*/
|
|
5745
5810
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5746
5811
|
/**
|
|
5747
5812
|
* Prefer `switch` over multiple `else-if`.
|
|
5748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
5749
5814
|
*/
|
|
5750
5815
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5751
5816
|
/**
|
|
5752
5817
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
5754
5819
|
*/
|
|
5755
5820
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5756
5821
|
/**
|
|
5757
5822
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
5759
5824
|
*/
|
|
5760
5825
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5761
5826
|
/**
|
|
5762
5827
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
5764
5829
|
*/
|
|
5765
5830
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5766
5831
|
/**
|
|
5767
5832
|
* Prevent abbreviations.
|
|
5768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
5769
5834
|
*/
|
|
5770
5835
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5771
5836
|
/**
|
|
5772
5837
|
* Enforce consistent relative URL style.
|
|
5773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
5774
5839
|
*/
|
|
5775
5840
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5776
5841
|
/**
|
|
5777
5842
|
* Enforce using the separator argument with `Array#join()`.
|
|
5778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
5779
5844
|
*/
|
|
5780
5845
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5781
5846
|
/**
|
|
5782
5847
|
* Require non-empty module attributes for imports and exports
|
|
5783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
5784
5849
|
*/
|
|
5785
5850
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5786
5851
|
/**
|
|
5787
5852
|
* Require non-empty specifier list in import and export statements.
|
|
5788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
5789
5854
|
*/
|
|
5790
5855
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5791
5856
|
/**
|
|
5792
5857
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5794
5859
|
*/
|
|
5795
5860
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5796
5861
|
/**
|
|
5797
5862
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
5799
5864
|
*/
|
|
5800
5865
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5801
5866
|
/**
|
|
5802
5867
|
* Enforce better string content.
|
|
5803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
5804
5869
|
*/
|
|
5805
5870
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5806
5871
|
/**
|
|
5807
5872
|
* Enforce consistent brace style for `case` clauses.
|
|
5808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
5809
5874
|
*/
|
|
5810
5875
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5811
5876
|
/**
|
|
5812
5877
|
* Fix whitespace-insensitive template indentation.
|
|
5813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
5814
5879
|
*/
|
|
5815
5880
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5816
5881
|
/**
|
|
5817
5882
|
* Enforce consistent case for text encoding identifiers.
|
|
5818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5819
5884
|
*/
|
|
5820
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
5885
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5821
5886
|
/**
|
|
5822
5887
|
* Require `new` when creating an error.
|
|
5823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
5824
5889
|
*/
|
|
5825
5890
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5826
5891
|
/**
|
|
@@ -5849,7 +5914,12 @@ interface RuleOptions {
|
|
|
5849
5914
|
*/
|
|
5850
5915
|
'vars-on-top'?: Linter.RuleEntry<[]>;
|
|
5851
5916
|
/**
|
|
5852
|
-
*
|
|
5917
|
+
* enforce using `.each` or `.for` consistently
|
|
5918
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-each-for.md
|
|
5919
|
+
*/
|
|
5920
|
+
'vitest/consistent-each-for'?: Linter.RuleEntry<VitestConsistentEachFor>;
|
|
5921
|
+
/**
|
|
5922
|
+
* require test file pattern
|
|
5853
5923
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
5854
5924
|
*/
|
|
5855
5925
|
'vitest/consistent-test-filename'?: Linter.RuleEntry<VitestConsistentTestFilename>;
|
|
@@ -6065,7 +6135,7 @@ interface RuleOptions {
|
|
|
6065
6135
|
*/
|
|
6066
6136
|
'vitest/prefer-each'?: Linter.RuleEntry<[]>;
|
|
6067
6137
|
/**
|
|
6068
|
-
* enforce using the built-in
|
|
6138
|
+
* enforce using the built-in equality matchers
|
|
6069
6139
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
|
|
6070
6140
|
*/
|
|
6071
6141
|
'vitest/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
|
|
@@ -6174,11 +6244,21 @@ interface RuleOptions {
|
|
|
6174
6244
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
6175
6245
|
*/
|
|
6176
6246
|
'vitest/prefer-vi-mocked'?: Linter.RuleEntry<[]>;
|
|
6247
|
+
/**
|
|
6248
|
+
* ensure that every `expect.poll` call is awaited
|
|
6249
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
|
|
6250
|
+
*/
|
|
6251
|
+
'vitest/require-awaited-expect-poll'?: Linter.RuleEntry<[]>;
|
|
6177
6252
|
/**
|
|
6178
6253
|
* require setup and teardown to be within a hook
|
|
6179
6254
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
6180
6255
|
*/
|
|
6181
6256
|
'vitest/require-hook'?: Linter.RuleEntry<VitestRequireHook>;
|
|
6257
|
+
/**
|
|
6258
|
+
* require usage of import in vi.mock()
|
|
6259
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
|
|
6260
|
+
*/
|
|
6261
|
+
'vitest/require-import-vi-mock'?: Linter.RuleEntry<[]>;
|
|
6182
6262
|
/**
|
|
6183
6263
|
* require local Test Context for concurrent snapshot tests
|
|
6184
6264
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
|
|
@@ -6400,11 +6480,23 @@ type AngularEslintComponentMaxInlineDeclarations = [] | [{
|
|
|
6400
6480
|
animations?: number;
|
|
6401
6481
|
}];
|
|
6402
6482
|
// ----- @angular-eslint/component-selector -----
|
|
6403
|
-
type AngularEslintComponentSelector = [] | [{
|
|
6404
|
-
type
|
|
6483
|
+
type AngularEslintComponentSelector = [] | [({
|
|
6484
|
+
type: (string | ("element" | "attribute")[]);
|
|
6405
6485
|
prefix?: (string | unknown[]);
|
|
6406
|
-
style
|
|
6407
|
-
}
|
|
6486
|
+
style: ("camelCase" | "kebab-case");
|
|
6487
|
+
} | [{
|
|
6488
|
+
type: ("element" | "attribute");
|
|
6489
|
+
prefix?: (string | unknown[]);
|
|
6490
|
+
style: ("camelCase" | "kebab-case");
|
|
6491
|
+
}] | [{
|
|
6492
|
+
type: ("element" | "attribute");
|
|
6493
|
+
prefix?: (string | unknown[]);
|
|
6494
|
+
style: ("camelCase" | "kebab-case");
|
|
6495
|
+
}, {
|
|
6496
|
+
type: ("element" | "attribute");
|
|
6497
|
+
prefix?: (string | unknown[]);
|
|
6498
|
+
style: ("camelCase" | "kebab-case");
|
|
6499
|
+
}])];
|
|
6408
6500
|
// ----- @angular-eslint/consistent-component-styles -----
|
|
6409
6501
|
type AngularEslintConsistentComponentStyles = [] | [("array" | "string")];
|
|
6410
6502
|
// ----- @angular-eslint/directive-class-suffix -----
|
|
@@ -6412,11 +6504,23 @@ type AngularEslintDirectiveClassSuffix = [] | [{
|
|
|
6412
6504
|
suffixes?: string[];
|
|
6413
6505
|
}];
|
|
6414
6506
|
// ----- @angular-eslint/directive-selector -----
|
|
6415
|
-
type AngularEslintDirectiveSelector = [] | [{
|
|
6416
|
-
type
|
|
6507
|
+
type AngularEslintDirectiveSelector = [] | [({
|
|
6508
|
+
type: (string | ("element" | "attribute")[]);
|
|
6417
6509
|
prefix?: (string | unknown[]);
|
|
6418
|
-
style
|
|
6419
|
-
}
|
|
6510
|
+
style: ("camelCase" | "kebab-case");
|
|
6511
|
+
} | [{
|
|
6512
|
+
type: ("element" | "attribute");
|
|
6513
|
+
prefix?: (string | unknown[]);
|
|
6514
|
+
style: ("camelCase" | "kebab-case");
|
|
6515
|
+
}] | [{
|
|
6516
|
+
type: ("element" | "attribute");
|
|
6517
|
+
prefix?: (string | unknown[]);
|
|
6518
|
+
style: ("camelCase" | "kebab-case");
|
|
6519
|
+
}, {
|
|
6520
|
+
type: ("element" | "attribute");
|
|
6521
|
+
prefix?: (string | unknown[]);
|
|
6522
|
+
style: ("camelCase" | "kebab-case");
|
|
6523
|
+
}])];
|
|
6420
6524
|
// ----- @angular-eslint/no-input-prefix -----
|
|
6421
6525
|
type AngularEslintNoInputPrefix = [] | [{
|
|
6422
6526
|
prefixes?: string[];
|
|
@@ -6526,6 +6630,11 @@ type AngularEslintTemplateNoInlineStyles = [] | [{
|
|
|
6526
6630
|
type AngularEslintTemplateNoInterpolationInAttributes = [] | [{
|
|
6527
6631
|
allowSubstringInterpolation?: boolean;
|
|
6528
6632
|
}];
|
|
6633
|
+
// ----- @angular-eslint/template/prefer-built-in-pipes -----
|
|
6634
|
+
type AngularEslintTemplatePreferBuiltInPipes = [] | [{
|
|
6635
|
+
disallowList?: string[];
|
|
6636
|
+
allowInOutputHandlers?: boolean;
|
|
6637
|
+
}];
|
|
6529
6638
|
// ----- @angular-eslint/template/prefer-contextual-for-variables -----
|
|
6530
6639
|
type AngularEslintTemplatePreferContextualForVariables = [] | [{
|
|
6531
6640
|
allowedAliases?: {
|
|
@@ -6740,6 +6849,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
6740
6849
|
type StylisticDotLocation = [] | [("object" | "property")];
|
|
6741
6850
|
// ----- @stylistic/eol-last -----
|
|
6742
6851
|
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
6852
|
+
// ----- @stylistic/exp-list-style -----
|
|
6853
|
+
type StylisticExpListStyle = [] | [{
|
|
6854
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
6855
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
6856
|
+
overrides?: {
|
|
6857
|
+
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
6858
|
+
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
6859
|
+
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
6860
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
6861
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6862
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
6863
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6864
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6865
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
6866
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
6867
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6868
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
6869
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
6870
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6871
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6872
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
6873
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
6874
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
6875
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
6876
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
6877
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
6878
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
6879
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
6880
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
6881
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6882
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
6883
|
+
};
|
|
6884
|
+
}];
|
|
6885
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
6886
|
+
spacing?: ("always" | "never");
|
|
6887
|
+
maxItems?: number;
|
|
6888
|
+
}
|
|
6889
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
6890
|
+
minItems?: number;
|
|
6891
|
+
}
|
|
6892
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
6893
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
6894
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig;
|
|
6895
|
+
}
|
|
6743
6896
|
// ----- @stylistic/function-call-argument-newline -----
|
|
6744
6897
|
type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
6745
6898
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -6809,7 +6962,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
6809
6962
|
ObjectExpression?: (number | ("first" | "off"));
|
|
6810
6963
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
6811
6964
|
flatTernaryExpressions?: boolean;
|
|
6812
|
-
offsetTernaryExpressions?: boolean
|
|
6965
|
+
offsetTernaryExpressions?: (boolean | {
|
|
6966
|
+
CallExpression?: boolean;
|
|
6967
|
+
AwaitExpression?: boolean;
|
|
6968
|
+
NewExpression?: boolean;
|
|
6969
|
+
});
|
|
6813
6970
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
6814
6971
|
ignoredNodes?: string[];
|
|
6815
6972
|
ignoreComments?: boolean;
|
|
@@ -7610,6 +7767,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
|
|
|
7610
7767
|
TSInterfaceBody?: ("always" | "never");
|
|
7611
7768
|
TSEnumBody?: ("always" | "never");
|
|
7612
7769
|
};
|
|
7770
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
7613
7771
|
}];
|
|
7614
7772
|
// ----- @stylistic/object-property-newline -----
|
|
7615
7773
|
type StylisticObjectPropertyNewline = [] | [{
|
|
@@ -8449,6 +8607,10 @@ type TypescriptEslintNoUnnecessaryTypeAssertion = [] | [{
|
|
|
8449
8607
|
checkLiteralConstAssertions?: boolean;
|
|
8450
8608
|
typesToIgnore?: string[];
|
|
8451
8609
|
}];
|
|
8610
|
+
// ----- @typescript-eslint/no-unsafe-member-access -----
|
|
8611
|
+
type TypescriptEslintNoUnsafeMemberAccess = [] | [{
|
|
8612
|
+
allowOptionalChaining?: boolean;
|
|
8613
|
+
}];
|
|
8452
8614
|
// ----- @typescript-eslint/no-unused-expressions -----
|
|
8453
8615
|
type TypescriptEslintNoUnusedExpressions = [] | [{
|
|
8454
8616
|
allowShortCircuit?: boolean;
|
|
@@ -8466,6 +8628,7 @@ type TypescriptEslintNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
8466
8628
|
destructuredArrayIgnorePattern?: string;
|
|
8467
8629
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
8468
8630
|
ignoreRestSiblings?: boolean;
|
|
8631
|
+
ignoreUsingDeclarations?: boolean;
|
|
8469
8632
|
reportUsedIgnorePattern?: boolean;
|
|
8470
8633
|
vars?: ("all" | "local");
|
|
8471
8634
|
varsIgnorePattern?: string;
|
|
@@ -9825,6 +9988,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
9825
9988
|
}];
|
|
9826
9989
|
// ----- jsdoc/check-indentation -----
|
|
9827
9990
|
type JsdocCheckIndentation = [] | [{
|
|
9991
|
+
allowIndentedSections?: boolean;
|
|
9828
9992
|
excludeTags?: string[];
|
|
9829
9993
|
}];
|
|
9830
9994
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -10171,6 +10335,14 @@ type JsdocRequireParamType = [] | [{
|
|
|
10171
10335
|
defaultDestructuredRootType?: string;
|
|
10172
10336
|
setDefaultDestructuredRootType?: boolean;
|
|
10173
10337
|
}];
|
|
10338
|
+
// ----- jsdoc/require-rejects -----
|
|
10339
|
+
type JsdocRequireRejects = [] | [{
|
|
10340
|
+
contexts?: (string | {
|
|
10341
|
+
comment?: string;
|
|
10342
|
+
context?: string;
|
|
10343
|
+
})[];
|
|
10344
|
+
exemptedBy?: string[];
|
|
10345
|
+
}];
|
|
10174
10346
|
// ----- jsdoc/require-returns -----
|
|
10175
10347
|
type JsdocRequireReturns = [] | [{
|
|
10176
10348
|
checkConstructors?: boolean;
|
|
@@ -10261,6 +10433,9 @@ type JsdocSortTags = [] | [{
|
|
|
10261
10433
|
linesBetween?: number;
|
|
10262
10434
|
reportIntraTagGroupSpacing?: boolean;
|
|
10263
10435
|
reportTagGroupSpacing?: boolean;
|
|
10436
|
+
tagExceptions?: {
|
|
10437
|
+
[k: string]: number;
|
|
10438
|
+
};
|
|
10264
10439
|
tagSequence?: {
|
|
10265
10440
|
tags?: string[];
|
|
10266
10441
|
}[];
|
|
@@ -10284,16 +10459,44 @@ type JsdocTextEscaping = [] | [{
|
|
|
10284
10459
|
escapeHTML?: boolean;
|
|
10285
10460
|
escapeMarkdown?: boolean;
|
|
10286
10461
|
}];
|
|
10462
|
+
// ----- jsdoc/ts-method-signature-style -----
|
|
10463
|
+
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
10464
|
+
enableFixer?: boolean;
|
|
10465
|
+
}];
|
|
10466
|
+
// ----- jsdoc/ts-no-unnecessary-template-expression -----
|
|
10467
|
+
type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
|
|
10468
|
+
enableFixer?: boolean;
|
|
10469
|
+
}];
|
|
10470
|
+
// ----- jsdoc/ts-prefer-function-type -----
|
|
10471
|
+
type JsdocTsPreferFunctionType = [] | [{
|
|
10472
|
+
enableFixer?: boolean;
|
|
10473
|
+
}];
|
|
10287
10474
|
// ----- jsdoc/type-formatting -----
|
|
10288
10475
|
type JsdocTypeFormatting = [] | [{
|
|
10289
10476
|
arrayBrackets?: ("angle" | "square");
|
|
10477
|
+
arrowFunctionPostReturnMarkerSpacing?: string;
|
|
10478
|
+
arrowFunctionPreReturnMarkerSpacing?: string;
|
|
10290
10479
|
enableFixer?: boolean;
|
|
10480
|
+
functionOrClassParameterSpacing?: string;
|
|
10481
|
+
functionOrClassPostGenericSpacing?: string;
|
|
10482
|
+
functionOrClassPostReturnMarkerSpacing?: string;
|
|
10483
|
+
functionOrClassPreReturnMarkerSpacing?: string;
|
|
10484
|
+
functionOrClassTypeParameterSpacing?: string;
|
|
10485
|
+
genericAndTupleElementSpacing?: string;
|
|
10291
10486
|
genericDot?: boolean;
|
|
10487
|
+
keyValuePostColonSpacing?: string;
|
|
10488
|
+
keyValuePostKeySpacing?: string;
|
|
10489
|
+
keyValuePostOptionalSpacing?: string;
|
|
10490
|
+
keyValuePostVariadicSpacing?: string;
|
|
10491
|
+
methodQuotes?: ("double" | "single");
|
|
10292
10492
|
objectFieldIndent?: string;
|
|
10293
10493
|
objectFieldQuote?: ("double" | "single" | null);
|
|
10294
10494
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
10295
10495
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
10296
10496
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
10497
|
+
parameterDefaultValueSpacing?: string;
|
|
10498
|
+
postMethodNameSpacing?: string;
|
|
10499
|
+
postNewSpacing?: string;
|
|
10297
10500
|
separatorForSingleObjectField?: boolean;
|
|
10298
10501
|
stringQuotes?: ("double" | "single");
|
|
10299
10502
|
typeBracketSpacing?: string;
|
|
@@ -14313,6 +14516,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14313
14516
|
selectors?: string[];
|
|
14314
14517
|
comments?: string[];
|
|
14315
14518
|
}];
|
|
14519
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14520
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14521
|
+
withDash?: boolean;
|
|
14522
|
+
}];
|
|
14316
14523
|
// ----- unused-imports/no-unused-imports -----
|
|
14317
14524
|
type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
14318
14525
|
args?: ("all" | "after-used" | "none");
|
|
@@ -14322,6 +14529,7 @@ type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
|
14322
14529
|
destructuredArrayIgnorePattern?: string;
|
|
14323
14530
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14324
14531
|
ignoreRestSiblings?: boolean;
|
|
14532
|
+
ignoreUsingDeclarations?: boolean;
|
|
14325
14533
|
reportUsedIgnorePattern?: boolean;
|
|
14326
14534
|
vars?: ("all" | "local");
|
|
14327
14535
|
varsIgnorePattern?: string;
|
|
@@ -14335,6 +14543,7 @@ type UnusedImportsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
14335
14543
|
destructuredArrayIgnorePattern?: string;
|
|
14336
14544
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14337
14545
|
ignoreRestSiblings?: boolean;
|
|
14546
|
+
ignoreUsingDeclarations?: boolean;
|
|
14338
14547
|
reportUsedIgnorePattern?: boolean;
|
|
14339
14548
|
vars?: ("all" | "local");
|
|
14340
14549
|
varsIgnorePattern?: string;
|
|
@@ -14348,6 +14557,13 @@ type UseIsnan = [] | [{
|
|
|
14348
14557
|
type ValidTypeof = [] | [{
|
|
14349
14558
|
requireStringLiterals?: boolean;
|
|
14350
14559
|
}];
|
|
14560
|
+
// ----- vitest/consistent-each-for -----
|
|
14561
|
+
type VitestConsistentEachFor = [] | [{
|
|
14562
|
+
test?: ("each" | "for");
|
|
14563
|
+
it?: ("each" | "for");
|
|
14564
|
+
describe?: ("each" | "for");
|
|
14565
|
+
suite?: ("each" | "for");
|
|
14566
|
+
}];
|
|
14351
14567
|
// ----- vitest/consistent-test-filename -----
|
|
14352
14568
|
type VitestConsistentTestFilename = [] | [{
|
|
14353
14569
|
pattern?: string;
|
|
@@ -14381,7 +14597,7 @@ type VitestNoFocusedTests = [] | [{
|
|
|
14381
14597
|
}];
|
|
14382
14598
|
// ----- vitest/no-hooks -----
|
|
14383
14599
|
type VitestNoHooks = [] | [{
|
|
14384
|
-
allow?:
|
|
14600
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
14385
14601
|
}];
|
|
14386
14602
|
// ----- vitest/no-large-snapshots -----
|
|
14387
14603
|
type VitestNoLargeSnapshots = [] | [{
|
|
@@ -14995,6 +15211,12 @@ interface AngularOptions {
|
|
|
14995
15211
|
* @default true
|
|
14996
15212
|
*/
|
|
14997
15213
|
banDeveloperPreviewApi?: boolean;
|
|
15214
|
+
/**
|
|
15215
|
+
* Whether the Angular application uses inline templates and styles instead of external files.
|
|
15216
|
+
*
|
|
15217
|
+
* @default false
|
|
15218
|
+
*/
|
|
15219
|
+
inlineTemplateAndStyles?: boolean;
|
|
14998
15220
|
}
|
|
14999
15221
|
/**
|
|
15000
15222
|
* Interface representing configuration options for enforcing NgRx operators rules.
|