@antfu/eslint-config 9.3.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +10 -10
- package/dist/index.d.mts +455 -350
- package/dist/index.mjs +166 -39
- package/package.json +44 -44
package/dist/index.d.mts
CHANGED
|
@@ -380,7 +380,7 @@ interface RuleOptions {
|
|
|
380
380
|
* Ensures components do not opt out of the default `ChangeDetectionStrategy.OnPush` change detection strategy
|
|
381
381
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md
|
|
382
382
|
*/
|
|
383
|
-
'angular/prefer-on-push-component-change-detection'?: Linter.RuleEntry<
|
|
383
|
+
'angular/prefer-on-push-component-change-detection'?: Linter.RuleEntry<AngularPreferOnPushComponentChangeDetection>;
|
|
384
384
|
/**
|
|
385
385
|
* Use `OutputEmitterRef` instead of `@Output()`
|
|
386
386
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-emitter-ref.md
|
|
@@ -1097,6 +1097,11 @@ interface RuleOptions {
|
|
|
1097
1097
|
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/enums.md
|
|
1098
1098
|
*/
|
|
1099
1099
|
'erasable-syntax-only/enums'?: Linter.RuleEntry<[]>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Avoid using TypeScript's export aliases.
|
|
1102
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/export-aliases.md
|
|
1103
|
+
*/
|
|
1104
|
+
'erasable-syntax-only/export-aliases'?: Linter.RuleEntry<[]>;
|
|
1100
1105
|
/**
|
|
1101
1106
|
* Avoid using TypeScript's import aliases.
|
|
1102
1107
|
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/import-aliases.md
|
|
@@ -1485,6 +1490,10 @@ interface RuleOptions {
|
|
|
1485
1490
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
1486
1491
|
*/
|
|
1487
1492
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
1493
|
+
/**
|
|
1494
|
+
* Reports redundant @type tags that match or broaden the naturally inferred TypeScript type.
|
|
1495
|
+
*/
|
|
1496
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
1488
1497
|
/**
|
|
1489
1498
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
1490
1499
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
@@ -3157,7 +3166,7 @@ interface RuleOptions {
|
|
|
3157
3166
|
* Disallow unmodified loop conditions
|
|
3158
3167
|
* @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
|
|
3159
3168
|
*/
|
|
3160
|
-
'no-unmodified-loop-condition'?: Linter.RuleEntry<
|
|
3169
|
+
'no-unmodified-loop-condition'?: Linter.RuleEntry<NoUnmodifiedLoopCondition>;
|
|
3161
3170
|
/**
|
|
3162
3171
|
* Disallow ternary operators when simpler alternatives exist
|
|
3163
3172
|
* @see https://eslint.org/docs/latest/rules/no-unneeded-ternary
|
|
@@ -3371,7 +3380,7 @@ interface RuleOptions {
|
|
|
3371
3380
|
*/
|
|
3372
3381
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
3373
3382
|
/**
|
|
3374
|
-
* disallow string concatenation with `__dirname` and `
|
|
3383
|
+
* disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
|
|
3375
3384
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
3376
3385
|
*/
|
|
3377
3386
|
'node/no-path-concat'?: Linter.RuleEntry<[]>;
|
|
@@ -3480,11 +3489,21 @@ interface RuleOptions {
|
|
|
3480
3489
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
3481
3490
|
*/
|
|
3482
3491
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
3492
|
+
/**
|
|
3493
|
+
* enforce using `node:assert/strict` instead of `node:assert`.
|
|
3494
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
3495
|
+
*/
|
|
3496
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
3483
3497
|
/**
|
|
3484
3498
|
* enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
3485
3499
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
3486
3500
|
*/
|
|
3487
3501
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
3502
|
+
/**
|
|
3503
|
+
* enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
3504
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
3505
|
+
*/
|
|
3506
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
3488
3507
|
/**
|
|
3489
3508
|
* enforce `require("dns").promises`
|
|
3490
3509
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
|
|
@@ -5007,11 +5026,21 @@ interface RuleOptions {
|
|
|
5007
5026
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-uses-vars.md
|
|
5008
5027
|
*/
|
|
5009
5028
|
'solid/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
5029
|
+
/**
|
|
5030
|
+
* Disallow passing uncalled signal accessors or other functions as value-typed DOM element attributes.
|
|
5031
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-accessor-as-prop.md
|
|
5032
|
+
*/
|
|
5033
|
+
'solid/no-accessor-as-prop'?: Linter.RuleEntry<[]>;
|
|
5010
5034
|
/**
|
|
5011
5035
|
* Disallow usage of type-unsafe event handlers.
|
|
5012
5036
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-array-handlers.md
|
|
5013
5037
|
*/
|
|
5014
5038
|
'solid/no-array-handlers'?: Linter.RuleEntry<[]>;
|
|
5039
|
+
/**
|
|
5040
|
+
* Disallow browser-only globals inside server functions, which run exclusively on the server.
|
|
5041
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-browser-globals-in-server-function.md
|
|
5042
|
+
*/
|
|
5043
|
+
'solid/no-browser-globals-in-server-function'?: Linter.RuleEntry<[]>;
|
|
5015
5044
|
/**
|
|
5016
5045
|
* Disallow destructuring props. In Solid, props must be used with property accesses (`props.foo`) to preserve reactivity. This rule only tracks destructuring in the parameter list.
|
|
5017
5046
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-destructure.md
|
|
@@ -5022,6 +5051,16 @@ interface RuleOptions {
|
|
|
5022
5051
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-innerhtml.md
|
|
5023
5052
|
*/
|
|
5024
5053
|
'solid/no-innerhtml'?: Linter.RuleEntry<SolidNoInnerhtml>;
|
|
5054
|
+
/**
|
|
5055
|
+
* Disallow server functions from capturing variables in enclosing non-module scopes, mirroring the compiler's build-time validation.
|
|
5056
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-invalid-server-capture.md
|
|
5057
|
+
*/
|
|
5058
|
+
'solid/no-invalid-server-capture'?: Linter.RuleEntry<[]>;
|
|
5059
|
+
/**
|
|
5060
|
+
* Disallow reactive primitives at module scope, where state is shared across SSR requests.
|
|
5061
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-module-scope-reactive-primitive.md
|
|
5062
|
+
*/
|
|
5063
|
+
'solid/no-module-scope-reactive-primitive'?: Linter.RuleEntry<[]>;
|
|
5025
5064
|
/**
|
|
5026
5065
|
* Disallow usage of APIs that use ES6 Proxies, only to target environments that don't support them.
|
|
5027
5066
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-proxy-apis.md
|
|
@@ -5037,6 +5076,16 @@ interface RuleOptions {
|
|
|
5037
5076
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-specific-props.md
|
|
5038
5077
|
*/
|
|
5039
5078
|
'solid/no-react-specific-props'?: Linter.RuleEntry<[]>;
|
|
5079
|
+
/**
|
|
5080
|
+
* Disallow restating a prop or option value that is already the default.
|
|
5081
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-restated-default-options.md
|
|
5082
|
+
*/
|
|
5083
|
+
'solid/no-restated-default-options'?: Linter.RuleEntry<[]>;
|
|
5084
|
+
/**
|
|
5085
|
+
* Require the two-argument `createEffect(compute, effect)` form used by Solid 2.0.
|
|
5086
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-single-arg-create-effect.md
|
|
5087
|
+
*/
|
|
5088
|
+
'solid/no-single-arg-create-effect'?: Linter.RuleEntry<[]>;
|
|
5040
5089
|
/**
|
|
5041
5090
|
* Enforce using only Solid-specific namespaced attribute names (i.e. `'on:'` in `<div on:click={...} />`).
|
|
5042
5091
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md
|
|
@@ -5053,16 +5102,36 @@ interface RuleOptions {
|
|
|
5053
5102
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-for.md
|
|
5054
5103
|
*/
|
|
5055
5104
|
'solid/prefer-for'?: Linter.RuleEntry<[]>;
|
|
5105
|
+
/**
|
|
5106
|
+
* Enforce running side-effectful setup (timers, global listeners, observers) inside `onSettled` instead of the component body.
|
|
5107
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-onSettled-for-side-effects.md
|
|
5108
|
+
*/
|
|
5109
|
+
'solid/prefer-onSettled-for-side-effects'?: Linter.RuleEntry<[]>;
|
|
5056
5110
|
/**
|
|
5057
5111
|
* Enforce using Solid's `<Show />` component for conditionally showing content. Solid's compiler covers this case, so it's a stylistic rule only.
|
|
5058
5112
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-show.md
|
|
5059
5113
|
*/
|
|
5060
5114
|
'solid/prefer-show'?: Linter.RuleEntry<[]>;
|
|
5115
|
+
/**
|
|
5116
|
+
* Enforce using the structured array/object forms of the `class` prop over manually-built class strings.
|
|
5117
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-structured-class.md
|
|
5118
|
+
*/
|
|
5119
|
+
'solid/prefer-structured-class'?: Linter.RuleEntry<[]>;
|
|
5061
5120
|
/**
|
|
5062
5121
|
* Enforce that reactivity (props, signals, memos, etc.) is properly used, so changes in those values will be tracked and update the view as expected.
|
|
5063
5122
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/reactivity.md
|
|
5064
5123
|
*/
|
|
5065
5124
|
'solid/reactivity'?: Linter.RuleEntry<SolidReactivity>;
|
|
5125
|
+
/**
|
|
5126
|
+
* Disallow Solid 1.x APIs that were removed or renamed in Solid 2.0, with migration guidance.
|
|
5127
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/removed-api.md
|
|
5128
|
+
*/
|
|
5129
|
+
'solid/removed-api'?: Linter.RuleEntry<[]>;
|
|
5130
|
+
/**
|
|
5131
|
+
* Require server functions to be async, matching their client-side contract.
|
|
5132
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/require-async-server-function.md
|
|
5133
|
+
*/
|
|
5134
|
+
'solid/require-async-server-function'?: Linter.RuleEntry<[]>;
|
|
5066
5135
|
/**
|
|
5067
5136
|
* Disallow extra closing tags for components without children.
|
|
5068
5137
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/self-closing-comp.md
|
|
@@ -5073,6 +5142,11 @@ interface RuleOptions {
|
|
|
5073
5142
|
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/style-prop.md
|
|
5074
5143
|
*/
|
|
5075
5144
|
'solid/style-prop'?: Linter.RuleEntry<SolidStyleProp>;
|
|
5145
|
+
/**
|
|
5146
|
+
* Enforce that "use server" directives are placed where the compiler honors them, and that module-level directive files export working server functions.
|
|
5147
|
+
* @see https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/valid-use-server.md
|
|
5148
|
+
*/
|
|
5149
|
+
'solid/valid-use-server'?: Linter.RuleEntry<SolidValidUseServer>;
|
|
5076
5150
|
/**
|
|
5077
5151
|
* Enforce sorted `import` declarations within modules
|
|
5078
5152
|
* @see https://eslint.org/docs/latest/rules/sort-imports
|
|
@@ -5931,6 +6005,11 @@ interface RuleOptions {
|
|
|
5931
6005
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
5932
6006
|
*/
|
|
5933
6007
|
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
6008
|
+
/**
|
|
6009
|
+
* require attribute interpolation instead of template literals
|
|
6010
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/
|
|
6011
|
+
*/
|
|
6012
|
+
'svelte/prefer-attribute-interpolation'?: Linter.RuleEntry<[]>;
|
|
5934
6013
|
/**
|
|
5935
6014
|
* require class directives instead of ternary expressions
|
|
5936
6015
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
@@ -7292,1740 +7371,1740 @@ interface RuleOptions {
|
|
|
7292
7371
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7293
7372
|
/**
|
|
7294
7373
|
* Prefer better DOM traversal APIs.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/better-dom-traversing.md
|
|
7296
7375
|
*/
|
|
7297
7376
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7298
7377
|
/**
|
|
7299
7378
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7301
7380
|
* @deprecated
|
|
7302
7381
|
*/
|
|
7303
7382
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7304
7383
|
/**
|
|
7305
7384
|
* Enforce a specific parameter name in catch clauses.
|
|
7306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/catch-error-name.md
|
|
7307
7386
|
*/
|
|
7308
7387
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7309
7388
|
/**
|
|
7310
7389
|
* Enforce consistent class references in static methods.
|
|
7311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7312
7391
|
*/
|
|
7313
7392
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7314
7393
|
/**
|
|
7315
7394
|
* Enforce better comment content.
|
|
7316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/comment-content.md
|
|
7317
7396
|
*/
|
|
7318
7397
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7319
7398
|
/**
|
|
7320
7399
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7322
7401
|
*/
|
|
7323
7402
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7324
7403
|
/**
|
|
7325
7404
|
* Enforce consistent assertion style with `node:assert`.
|
|
7326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-assert.md
|
|
7327
7406
|
*/
|
|
7328
7407
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7329
7408
|
/**
|
|
7330
7409
|
* Enforce consistent naming for boolean names.
|
|
7331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-boolean-name.md
|
|
7332
7411
|
*/
|
|
7333
7412
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7334
7413
|
/**
|
|
7335
7414
|
* Enforce consistent class member order.
|
|
7336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-class-member-order.md
|
|
7337
7416
|
*/
|
|
7338
7417
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7339
7418
|
/**
|
|
7340
7419
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-compound-words.md
|
|
7342
7421
|
*/
|
|
7343
7422
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7344
7423
|
/**
|
|
7345
7424
|
* Enforce consistent conditional object spread style.
|
|
7346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7347
7426
|
*/
|
|
7348
7427
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7349
7428
|
/**
|
|
7350
7429
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-date-clone.md
|
|
7352
7431
|
*/
|
|
7353
7432
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7354
7433
|
/**
|
|
7355
7434
|
* Use destructured variables over properties.
|
|
7356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-destructuring.md
|
|
7357
7436
|
*/
|
|
7358
7437
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7359
7438
|
/**
|
|
7360
7439
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7362
7441
|
*/
|
|
7363
7442
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7364
7443
|
/**
|
|
7365
7444
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-existence-index-check.md
|
|
7367
7446
|
*/
|
|
7368
7447
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7369
7448
|
/**
|
|
7370
7449
|
* Enforce consistent decorator position on exported classes.
|
|
7371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7372
7451
|
*/
|
|
7373
7452
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7374
7453
|
/**
|
|
7375
7454
|
* Move function definitions to the highest possible scope.
|
|
7376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-scoping.md
|
|
7377
7456
|
*/
|
|
7378
7457
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7379
7458
|
/**
|
|
7380
7459
|
* Enforce function syntax by role.
|
|
7381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-style.md
|
|
7382
7461
|
*/
|
|
7383
7462
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7384
7463
|
/**
|
|
7385
7464
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-json-file-read.md
|
|
7387
7466
|
*/
|
|
7388
7467
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7389
7468
|
/**
|
|
7390
7469
|
* Enforce consistent optional chaining for same-base member access.
|
|
7391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-optional-chaining.md
|
|
7392
7471
|
*/
|
|
7393
7472
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7394
7473
|
/**
|
|
7395
7474
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7397
7476
|
*/
|
|
7398
7477
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7399
7478
|
/**
|
|
7400
7479
|
* Enforce consistent labels on tuple type elements.
|
|
7401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-tuple-labels.md
|
|
7402
7481
|
*/
|
|
7403
7482
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7404
7483
|
/**
|
|
7405
7484
|
* Enforce correct `Error` subclassing.
|
|
7406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/custom-error-definition.md
|
|
7407
7486
|
*/
|
|
7408
7487
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7409
7488
|
/**
|
|
7410
7489
|
* Enforce consistent default export declarations.
|
|
7411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/default-export-style.md
|
|
7412
7491
|
*/
|
|
7413
7492
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7414
7493
|
/**
|
|
7415
7494
|
* Enforce consistent style for DOM element dataset access.
|
|
7416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/dom-node-dataset.md
|
|
7417
7496
|
*/
|
|
7418
7497
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7419
7498
|
/**
|
|
7420
7499
|
* Enforce no spaces between braces.
|
|
7421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/empty-brace-spaces.md
|
|
7422
7501
|
*/
|
|
7423
7502
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7424
7503
|
/**
|
|
7425
7504
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/error-message.md
|
|
7427
7506
|
*/
|
|
7428
7507
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7429
7508
|
/**
|
|
7430
7509
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/escape-case.md
|
|
7432
7511
|
*/
|
|
7433
7512
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7434
7513
|
/**
|
|
7435
7514
|
* Add expiration conditions to TODO comments.
|
|
7436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/expiring-todo-comments.md
|
|
7437
7516
|
*/
|
|
7438
7517
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7439
7518
|
/**
|
|
7440
7519
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-length-check.md
|
|
7442
7521
|
*/
|
|
7443
7522
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7444
7523
|
/**
|
|
7445
7524
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-timer-delay.md
|
|
7447
7526
|
*/
|
|
7448
7527
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7449
7528
|
/**
|
|
7450
7529
|
* Enforce a case style for filenames and directory names.
|
|
7451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/filename-case.md
|
|
7452
7531
|
*/
|
|
7453
7532
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7454
7533
|
/**
|
|
7455
7534
|
* Require identifiers to match a specified regular expression.
|
|
7456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/id-match.md
|
|
7457
7536
|
*/
|
|
7458
7537
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7459
7538
|
/**
|
|
7460
7539
|
* Enforce specific import styles per module.
|
|
7461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/import-style.md
|
|
7462
7541
|
*/
|
|
7463
7542
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7464
7543
|
/**
|
|
7465
7544
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/isolated-functions.md
|
|
7467
7546
|
*/
|
|
7468
7547
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7469
7548
|
/**
|
|
7470
7549
|
* Enforce a consistent style for optional loop sources.
|
|
7471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/iteration-fallback-style.md
|
|
7472
7551
|
*/
|
|
7473
7552
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7474
7553
|
/**
|
|
7475
7554
|
* Require or disallow logical assignment operator shorthand
|
|
7476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/logical-assignment-operators.md
|
|
7477
7556
|
*/
|
|
7478
7557
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7479
7558
|
/**
|
|
7480
7559
|
* Limit the depth of nested calls.
|
|
7481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/max-nested-calls.md
|
|
7482
7561
|
*/
|
|
7483
7562
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7484
7563
|
/**
|
|
7485
7564
|
* Enforce replacements for variable, property, and filenames.
|
|
7486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/name-replacements.md
|
|
7487
7566
|
*/
|
|
7488
7567
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7489
7568
|
/**
|
|
7490
7569
|
* Enforce correct use of `new` for builtin constructors.
|
|
7491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/new-for-builtins.md
|
|
7492
7571
|
*/
|
|
7493
7572
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7494
7573
|
/**
|
|
7495
7574
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7497
7576
|
*/
|
|
7498
7577
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7499
7578
|
/**
|
|
7500
7579
|
* Disallow recursive access to `this` within getters and setters.
|
|
7501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accessor-recursion.md
|
|
7502
7581
|
*/
|
|
7503
7582
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7504
7583
|
/**
|
|
7505
7584
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7507
7586
|
*/
|
|
7508
7587
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7509
7588
|
/**
|
|
7510
7589
|
* Disallow anonymous functions and classes as the default export.
|
|
7511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-anonymous-default-export.md
|
|
7512
7591
|
*/
|
|
7513
7592
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7514
7593
|
/**
|
|
7515
7594
|
* Prevent passing a function reference directly to iterator methods.
|
|
7516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-callback-reference.md
|
|
7517
7596
|
*/
|
|
7518
7597
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7519
7598
|
/**
|
|
7520
7599
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7522
7601
|
*/
|
|
7523
7602
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7524
7603
|
/**
|
|
7525
7604
|
* Disallow using reference values as `Array#fill()` values.
|
|
7526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7527
7606
|
*/
|
|
7528
7607
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7529
7608
|
/**
|
|
7530
7609
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-from-fill.md
|
|
7532
7611
|
*/
|
|
7533
7612
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7534
7613
|
/**
|
|
7535
7614
|
* Disallow front-of-array mutation.
|
|
7536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-front-mutation.md
|
|
7537
7616
|
*/
|
|
7538
7617
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7539
7618
|
/**
|
|
7540
7619
|
* Disallow using the `this` argument in array methods.
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-method-this-argument.md
|
|
7542
7621
|
*/
|
|
7543
7622
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7544
7623
|
/**
|
|
7545
7624
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7547
7626
|
* @deprecated
|
|
7548
7627
|
*/
|
|
7549
7628
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7550
7629
|
/**
|
|
7551
7630
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reduce.md
|
|
7553
7632
|
*/
|
|
7554
7633
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7555
7634
|
/**
|
|
7556
7635
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reverse.md
|
|
7558
7637
|
*/
|
|
7559
7638
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7560
7639
|
/**
|
|
7561
7640
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort.md
|
|
7563
7642
|
*/
|
|
7564
7643
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7565
7644
|
/**
|
|
7566
7645
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7568
7647
|
*/
|
|
7569
7648
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7570
7649
|
/**
|
|
7571
7650
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-splice.md
|
|
7573
7652
|
*/
|
|
7574
7653
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7575
7654
|
/**
|
|
7576
7655
|
* Disallow asterisk prefixes in documentation comments.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7578
7657
|
*/
|
|
7579
7658
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7580
7659
|
/**
|
|
7581
7660
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-async-promise-finally.md
|
|
7583
7662
|
*/
|
|
7584
7663
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7585
7664
|
/**
|
|
7586
7665
|
* Disallow member access from await expression.
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-expression-member.md
|
|
7588
7667
|
*/
|
|
7589
7668
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7590
7669
|
/**
|
|
7591
7670
|
* Disallow using `await` in `Promise` method parameters.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7593
7672
|
*/
|
|
7594
7673
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7595
7674
|
/**
|
|
7596
7675
|
* Disallow barrel files.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-barrel-files.md
|
|
7598
7677
|
*/
|
|
7599
7678
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7600
7679
|
/**
|
|
7601
7680
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-blob-to-file.md
|
|
7603
7682
|
*/
|
|
7604
7683
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7605
7684
|
/**
|
|
7606
7685
|
* Disallow boolean-returning sort comparators.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7608
7687
|
*/
|
|
7609
7688
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7610
7689
|
/**
|
|
7611
7690
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7613
7692
|
*/
|
|
7614
7693
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7615
7694
|
/**
|
|
7616
7695
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-canvas-to-image.md
|
|
7618
7697
|
*/
|
|
7619
7698
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7620
7699
|
/**
|
|
7621
7700
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-chained-comparison.md
|
|
7623
7702
|
*/
|
|
7624
7703
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7625
7704
|
/**
|
|
7626
7705
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-collection-bracket-access.md
|
|
7628
7707
|
*/
|
|
7629
7708
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7630
7709
|
/**
|
|
7631
7710
|
* Disallow dynamic object property existence checks.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7633
7712
|
*/
|
|
7634
7713
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7635
7714
|
/**
|
|
7636
7715
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-splice.md
|
|
7638
7717
|
*/
|
|
7639
7718
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7640
7719
|
/**
|
|
7641
7720
|
* Disallow confusing uses of `Array#with()`.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-with.md
|
|
7643
7722
|
*/
|
|
7644
7723
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7645
7724
|
/**
|
|
7646
7725
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-console-spaces.md
|
|
7648
7727
|
*/
|
|
7649
7728
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7650
7729
|
/**
|
|
7651
7730
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-constant-zero-expression.md
|
|
7653
7732
|
*/
|
|
7654
7733
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7655
7734
|
/**
|
|
7656
7735
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7658
7737
|
*/
|
|
7659
7738
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7660
7739
|
/**
|
|
7661
7740
|
* Do not use `document.cookie` directly.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-document-cookie.md
|
|
7663
7742
|
*/
|
|
7664
7743
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7665
7744
|
/**
|
|
7666
7745
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-double-comparison.md
|
|
7668
7747
|
*/
|
|
7669
7748
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7670
7749
|
/**
|
|
7671
7750
|
* Disallow duplicate adjacent branches in if chains.
|
|
7672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7673
7752
|
*/
|
|
7674
7753
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7675
7754
|
/**
|
|
7676
7755
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7678
7757
|
*/
|
|
7679
7758
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7680
7759
|
/**
|
|
7681
7760
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-loops.md
|
|
7683
7762
|
*/
|
|
7684
7763
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7685
7764
|
/**
|
|
7686
7765
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-set-values.md
|
|
7688
7767
|
*/
|
|
7689
7768
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7690
7769
|
/**
|
|
7691
7770
|
* Disallow empty files.
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-empty-file.md
|
|
7693
7772
|
*/
|
|
7694
7773
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7695
7774
|
/**
|
|
7696
7775
|
* Disallow assigning to built-in error properties.
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-error-property-assignment.md
|
|
7698
7777
|
*/
|
|
7699
7778
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7700
7779
|
/**
|
|
7701
7780
|
* Disallow exports in scripts.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-exports-in-scripts.md
|
|
7703
7782
|
*/
|
|
7704
7783
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7705
7784
|
/**
|
|
7706
7785
|
* Prefer `for…of` over the `forEach` method.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-each.md
|
|
7708
7787
|
*/
|
|
7709
7788
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7710
7789
|
/**
|
|
7711
7790
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-loop.md
|
|
7713
7792
|
*/
|
|
7714
7793
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7715
7794
|
/**
|
|
7716
7795
|
* Disallow assigning properties on the global object.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7718
7797
|
*/
|
|
7719
7798
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7720
7799
|
/**
|
|
7721
7800
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7723
7802
|
* @deprecated
|
|
7724
7803
|
*/
|
|
7725
7804
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7726
7805
|
/**
|
|
7727
7806
|
* Disallow immediate mutation after variable assignment.
|
|
7728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-immediate-mutation.md
|
|
7729
7808
|
*/
|
|
7730
7809
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7731
7810
|
/**
|
|
7732
7811
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7734
7813
|
*/
|
|
7735
7814
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7736
7815
|
/**
|
|
7737
7816
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7739
7818
|
*/
|
|
7740
7819
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7741
7820
|
/**
|
|
7742
7821
|
* Disallow incorrect template literal interpolation syntax.
|
|
7743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7744
7823
|
*/
|
|
7745
7824
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7746
7825
|
/**
|
|
7747
7826
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7749
7828
|
* @deprecated
|
|
7750
7829
|
*/
|
|
7751
7830
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7752
7831
|
/**
|
|
7753
7832
|
* Disallow `instanceof` with built-in objects
|
|
7754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-instanceof-builtins.md
|
|
7755
7834
|
*/
|
|
7756
7835
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7757
7836
|
/**
|
|
7758
7837
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-argument-count.md
|
|
7760
7839
|
*/
|
|
7761
7840
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7762
7841
|
/**
|
|
7763
7842
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7765
7844
|
*/
|
|
7766
7845
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7767
7846
|
/**
|
|
7768
7847
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7770
7849
|
*/
|
|
7771
7850
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7772
7851
|
/**
|
|
7773
7852
|
* Disallow invalid `accept` values on file inputs.
|
|
7774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7775
7854
|
*/
|
|
7776
7855
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7777
7856
|
/**
|
|
7778
7857
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7780
7859
|
*/
|
|
7781
7860
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7782
7861
|
/**
|
|
7783
7862
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7785
7864
|
*/
|
|
7786
7865
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7787
7866
|
/**
|
|
7788
7867
|
* Disallow identifiers starting with `new` or `class`.
|
|
7789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-keyword-prefix.md
|
|
7790
7869
|
*/
|
|
7791
7870
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7792
7871
|
/**
|
|
7793
7872
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-current-target-access.md
|
|
7795
7874
|
*/
|
|
7796
7875
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7797
7876
|
/**
|
|
7798
7877
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-event-control.md
|
|
7800
7879
|
*/
|
|
7801
7880
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7802
7881
|
/**
|
|
7803
7882
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7805
7884
|
* @deprecated
|
|
7806
7885
|
*/
|
|
7807
7886
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7808
7887
|
/**
|
|
7809
7888
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-lonely-if.md
|
|
7811
7890
|
*/
|
|
7812
7891
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7813
7892
|
/**
|
|
7814
7893
|
* Disallow mutating a loop iterable during iteration.
|
|
7815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7816
7895
|
*/
|
|
7817
7896
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7818
7897
|
/**
|
|
7819
7898
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7821
7900
|
*/
|
|
7822
7901
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7823
7902
|
/**
|
|
7824
7903
|
* Disallow manually wrapped comments.
|
|
7825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7826
7905
|
*/
|
|
7827
7906
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7828
7907
|
/**
|
|
7829
7908
|
* Disallow checking a Map key before accessing a different key.
|
|
7830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-mismatched-map-key.md
|
|
7831
7910
|
*/
|
|
7832
7911
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7833
7912
|
/**
|
|
7834
7913
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7836
7915
|
*/
|
|
7837
7916
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7838
7917
|
/**
|
|
7839
7918
|
* Disallow references to missing local resources.
|
|
7840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-missing-local-resource.md
|
|
7841
7920
|
*/
|
|
7842
7921
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7843
7922
|
/**
|
|
7844
7923
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7846
7925
|
*/
|
|
7847
7926
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7848
7927
|
/**
|
|
7849
7928
|
* Disallow named usage of default import and export.
|
|
7850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-named-default.md
|
|
7851
7930
|
*/
|
|
7852
7931
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7853
7932
|
/**
|
|
7854
7933
|
* Disallow negated array predicate calls.
|
|
7855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-array-predicate.md
|
|
7856
7935
|
*/
|
|
7857
7936
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7858
7937
|
/**
|
|
7859
7938
|
* Disallow negated comparisons.
|
|
7860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-comparison.md
|
|
7861
7940
|
*/
|
|
7862
7941
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7863
7942
|
/**
|
|
7864
7943
|
* Disallow negated conditions.
|
|
7865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-condition.md
|
|
7866
7945
|
*/
|
|
7867
7946
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7868
7947
|
/**
|
|
7869
7948
|
* Disallow negated expression in equality check.
|
|
7870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7871
7950
|
*/
|
|
7872
7951
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7873
7952
|
/**
|
|
7874
7953
|
* Disallow nested ternary expressions.
|
|
7875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nested-ternary.md
|
|
7876
7955
|
*/
|
|
7877
7956
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7878
7957
|
/**
|
|
7879
7958
|
* Disallow `new Array()`.
|
|
7880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-array.md
|
|
7881
7960
|
*/
|
|
7882
7961
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7883
7962
|
/**
|
|
7884
7963
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-buffer.md
|
|
7886
7965
|
*/
|
|
7887
7966
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7888
7967
|
/**
|
|
7889
7968
|
* Disallow non-function values with function-style verb prefixes.
|
|
7890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7891
7970
|
*/
|
|
7892
7971
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7893
7972
|
/**
|
|
7894
7973
|
* Disallow non-standard properties on built-in objects.
|
|
7895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7896
7975
|
*/
|
|
7897
7976
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7898
7977
|
/**
|
|
7899
7978
|
* Disallow the use of the `null` literal.
|
|
7900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-null.md
|
|
7901
7980
|
*/
|
|
7902
7981
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7903
7982
|
/**
|
|
7904
7983
|
* Disallow the use of objects as default parameters.
|
|
7905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7906
7985
|
*/
|
|
7907
7986
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7908
7987
|
/**
|
|
7909
7988
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7911
7990
|
*/
|
|
7912
7991
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7913
7992
|
/**
|
|
7914
7993
|
* Disallow optional chaining on undeclared variables.
|
|
7915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7916
7995
|
*/
|
|
7917
7996
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7918
7997
|
/**
|
|
7919
7998
|
* Disallow `process.exit()`.
|
|
7920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-process-exit.md
|
|
7921
8000
|
*/
|
|
7922
8001
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7923
8002
|
/**
|
|
7924
8003
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-redundant-comparison.md
|
|
7926
8005
|
*/
|
|
7927
8006
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7928
8007
|
/**
|
|
7929
8008
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-return-array-push.md
|
|
7931
8010
|
*/
|
|
7932
8011
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7933
8012
|
/**
|
|
7934
8013
|
* Disallow selector syntax in DOM names.
|
|
7935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7936
8015
|
*/
|
|
7937
8016
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7938
8017
|
/**
|
|
7939
8018
|
* Disallow shorthand properties that override related longhand properties.
|
|
7940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7941
8020
|
*/
|
|
7942
8021
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7943
8022
|
/**
|
|
7944
8023
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7946
8025
|
*/
|
|
7947
8026
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7948
8027
|
/**
|
|
7949
8028
|
* Disallow classes that only have static members.
|
|
7950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-static-only-class.md
|
|
7951
8030
|
*/
|
|
7952
8031
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7953
8032
|
/**
|
|
7954
8033
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-subtraction-comparison.md
|
|
7956
8035
|
*/
|
|
7957
8036
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7958
8037
|
/**
|
|
7959
8038
|
* Disallow `then` property.
|
|
7960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-thenable.md
|
|
7961
8040
|
*/
|
|
7962
8041
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7963
8042
|
/**
|
|
7964
8043
|
* Disallow assigning `this` to a variable.
|
|
7965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-assignment.md
|
|
7966
8045
|
*/
|
|
7967
8046
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7968
8047
|
/**
|
|
7969
8048
|
* Disallow `this` outside of classes.
|
|
7970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-outside-of-class.md
|
|
7971
8050
|
*/
|
|
7972
8051
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7973
8052
|
/**
|
|
7974
8053
|
* Disallow assigning to top-level variables from inside functions.
|
|
7975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7976
8055
|
*/
|
|
7977
8056
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7978
8057
|
/**
|
|
7979
8058
|
* Disallow top-level side effects in exported modules.
|
|
7980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-side-effects.md
|
|
7981
8060
|
*/
|
|
7982
8061
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7983
8062
|
/**
|
|
7984
8063
|
* Disallow `all` as a transition property.
|
|
7985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-transition-all.md
|
|
7986
8065
|
*/
|
|
7987
8066
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7988
8067
|
/**
|
|
7989
8068
|
* Disallow comparing `undefined` using `typeof`.
|
|
7990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-typeof-undefined.md
|
|
7991
8070
|
*/
|
|
7992
8071
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7993
8072
|
/**
|
|
7994
8073
|
* Disallow referencing methods without calling them.
|
|
7995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-uncalled-method.md
|
|
7996
8075
|
*/
|
|
7997
8076
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7998
8077
|
/**
|
|
7999
8078
|
* Require class members to be declared.
|
|
8000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-undeclared-class-members.md
|
|
8001
8080
|
*/
|
|
8002
8081
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8003
8082
|
/**
|
|
8004
8083
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8006
8085
|
*/
|
|
8007
8086
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8008
8087
|
/**
|
|
8009
8088
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
8010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8011
8090
|
*/
|
|
8012
8091
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8013
8092
|
/**
|
|
8014
8093
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8016
8095
|
*/
|
|
8017
8096
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8018
8097
|
/**
|
|
8019
8098
|
* Disallow awaiting non-promise values.
|
|
8020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-await.md
|
|
8021
8100
|
*/
|
|
8022
8101
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8023
8102
|
/**
|
|
8024
8103
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8026
8105
|
*/
|
|
8027
8106
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8028
8107
|
/**
|
|
8029
8108
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8031
8110
|
*/
|
|
8032
8111
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8033
8112
|
/**
|
|
8034
8113
|
* Disallow unnecessary `globalThis` references.
|
|
8035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8036
8115
|
*/
|
|
8037
8116
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8038
8117
|
/**
|
|
8039
8118
|
* Disallow unnecessary nested ternary expressions.
|
|
8040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8041
8120
|
*/
|
|
8042
8121
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8043
8122
|
/**
|
|
8044
8123
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8046
8125
|
*/
|
|
8047
8126
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8048
8127
|
/**
|
|
8049
8128
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8051
8130
|
*/
|
|
8052
8131
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8053
8132
|
/**
|
|
8054
8133
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-splice.md
|
|
8056
8135
|
*/
|
|
8057
8136
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8058
8137
|
/**
|
|
8059
8138
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8061
8140
|
*/
|
|
8062
8141
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8063
8142
|
/**
|
|
8064
8143
|
* Disallow unreadable array destructuring.
|
|
8065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8066
8145
|
*/
|
|
8067
8146
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8068
8147
|
/**
|
|
8069
8148
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8071
8150
|
*/
|
|
8072
8151
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8073
8152
|
/**
|
|
8074
8153
|
* Disallow unreadable IIFEs.
|
|
8075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-iife.md
|
|
8076
8155
|
*/
|
|
8077
8156
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8078
8157
|
/**
|
|
8079
8158
|
* Disallow unreadable `new` expressions.
|
|
8080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8081
8160
|
*/
|
|
8082
8161
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8083
8162
|
/**
|
|
8084
8163
|
* Disallow unreadable object destructuring.
|
|
8085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8086
8165
|
*/
|
|
8087
8166
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8088
8167
|
/**
|
|
8089
8168
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8091
8170
|
*/
|
|
8092
8171
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8093
8172
|
/**
|
|
8094
8173
|
* Disallow unsafe DOM HTML APIs.
|
|
8095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8096
8175
|
*/
|
|
8097
8176
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8098
8177
|
/**
|
|
8099
8178
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8101
8180
|
*/
|
|
8102
8181
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8103
8182
|
/**
|
|
8104
8183
|
* Disallow unsafe values as property keys.
|
|
8105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-property-key.md
|
|
8106
8185
|
*/
|
|
8107
8186
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8108
8187
|
/**
|
|
8109
8188
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8111
8190
|
*/
|
|
8112
8191
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8113
8192
|
/**
|
|
8114
8193
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8116
8195
|
*/
|
|
8117
8196
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8118
8197
|
/**
|
|
8119
8198
|
* Disallow ignoring the return value of selected array methods.
|
|
8120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-array-method-return.md
|
|
8121
8200
|
*/
|
|
8122
8201
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8123
8202
|
/**
|
|
8124
8203
|
* Disallow unused object properties.
|
|
8125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-properties.md
|
|
8126
8205
|
*/
|
|
8127
8206
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8128
8207
|
/**
|
|
8129
8208
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8131
8210
|
*/
|
|
8132
8211
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8133
8212
|
/**
|
|
8134
8213
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-coercion.md
|
|
8136
8215
|
*/
|
|
8137
8216
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8138
8217
|
/**
|
|
8139
8218
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-collection-argument.md
|
|
8141
8220
|
*/
|
|
8142
8221
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8143
8222
|
/**
|
|
8144
8223
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8146
8225
|
*/
|
|
8147
8226
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8148
8227
|
/**
|
|
8149
8228
|
* Disallow useless concatenation of literals.
|
|
8150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-concat.md
|
|
8151
8230
|
*/
|
|
8152
8231
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8153
8232
|
/**
|
|
8154
8233
|
* Disallow useless `continue` statements.
|
|
8155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-continue.md
|
|
8156
8235
|
*/
|
|
8157
8236
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8158
8237
|
/**
|
|
8159
8238
|
* Disallow unnecessary existence checks before deletion.
|
|
8160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-delete-check.md
|
|
8161
8240
|
*/
|
|
8162
8241
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8163
8242
|
/**
|
|
8164
8243
|
* Disallow `else` after a statement that exits.
|
|
8165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-else.md
|
|
8166
8245
|
*/
|
|
8167
8246
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8168
8247
|
/**
|
|
8169
8248
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8171
8250
|
*/
|
|
8172
8251
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8173
8252
|
/**
|
|
8174
8253
|
* Disallow useless fallback when spreading in object literals.
|
|
8175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8176
8255
|
*/
|
|
8177
8256
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8178
8257
|
/**
|
|
8179
8258
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8181
8260
|
*/
|
|
8182
8261
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8183
8262
|
/**
|
|
8184
8263
|
* Disallow useless array length check.
|
|
8185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-length-check.md
|
|
8186
8265
|
*/
|
|
8187
8266
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8188
8267
|
/**
|
|
8189
8268
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-logical-operand.md
|
|
8191
8270
|
*/
|
|
8192
8271
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8193
8272
|
/**
|
|
8194
8273
|
* Disallow useless overrides of class methods.
|
|
8195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-override.md
|
|
8196
8275
|
*/
|
|
8197
8276
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8198
8277
|
/**
|
|
8199
8278
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8201
8280
|
*/
|
|
8202
8281
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8203
8282
|
/**
|
|
8204
8283
|
* Disallow redundant re-exports.
|
|
8205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-re-export.md
|
|
8206
8285
|
*/
|
|
8207
8286
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8208
8287
|
/**
|
|
8209
8288
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-recursion.md
|
|
8211
8290
|
*/
|
|
8212
8291
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8213
8292
|
/**
|
|
8214
8293
|
* Disallow unnecessary spread.
|
|
8215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-spread.md
|
|
8216
8295
|
*/
|
|
8217
8296
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8218
8297
|
/**
|
|
8219
8298
|
* Disallow useless case in switch statements.
|
|
8220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-switch-case.md
|
|
8221
8300
|
*/
|
|
8222
8301
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8223
8302
|
/**
|
|
8224
8303
|
* Disallow useless template literal expressions.
|
|
8225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-template-literals.md
|
|
8226
8305
|
*/
|
|
8227
8306
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8228
8307
|
/**
|
|
8229
8308
|
* Disallow useless `undefined`.
|
|
8230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-undefined.md
|
|
8231
8310
|
*/
|
|
8232
8311
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8233
8312
|
/**
|
|
8234
8313
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8236
8315
|
*/
|
|
8237
8316
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8238
8317
|
/**
|
|
8239
8318
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-zero-fractions.md
|
|
8241
8320
|
*/
|
|
8242
8321
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8243
8322
|
/**
|
|
8244
8323
|
* Enforce proper case for numeric literals.
|
|
8245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/number-literal-case.md
|
|
8246
8325
|
*/
|
|
8247
8326
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8248
8327
|
/**
|
|
8249
8328
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/numeric-separators-style.md
|
|
8251
8330
|
*/
|
|
8252
8331
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8253
8332
|
/**
|
|
8254
8333
|
* Require assignment operator shorthand where possible.
|
|
8255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/operator-assignment.md
|
|
8256
8335
|
*/
|
|
8257
8336
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8258
8337
|
/**
|
|
8259
8338
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8261
8340
|
*/
|
|
8262
8341
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8263
8342
|
/**
|
|
8264
8343
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8266
8345
|
*/
|
|
8267
8346
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8268
8347
|
/**
|
|
8269
8348
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener.md
|
|
8271
8350
|
*/
|
|
8272
8351
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8273
8352
|
/**
|
|
8274
8353
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8276
8355
|
*/
|
|
8277
8356
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8278
8357
|
/**
|
|
8279
8358
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-aggregate-error.md
|
|
8281
8360
|
*/
|
|
8282
8361
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8283
8362
|
/**
|
|
8284
8363
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-find.md
|
|
8286
8365
|
*/
|
|
8287
8366
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8288
8367
|
/**
|
|
8289
8368
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat.md
|
|
8291
8370
|
*/
|
|
8292
8371
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8293
8372
|
/**
|
|
8294
8373
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat-map.md
|
|
8296
8375
|
*/
|
|
8297
8376
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8298
8377
|
/**
|
|
8299
8378
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-async.md
|
|
8301
8380
|
*/
|
|
8302
8381
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8303
8382
|
/**
|
|
8304
8383
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-map.md
|
|
8306
8385
|
*/
|
|
8307
8386
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8308
8387
|
/**
|
|
8309
8388
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-range.md
|
|
8311
8390
|
*/
|
|
8312
8391
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8313
8392
|
/**
|
|
8314
8393
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-index-of.md
|
|
8316
8395
|
*/
|
|
8317
8396
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8318
8397
|
/**
|
|
8319
8398
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8321
8400
|
*/
|
|
8322
8401
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8323
8402
|
/**
|
|
8324
8403
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-last-methods.md
|
|
8326
8405
|
*/
|
|
8327
8406
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8328
8407
|
/**
|
|
8329
8408
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-slice.md
|
|
8331
8410
|
*/
|
|
8332
8411
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8333
8412
|
/**
|
|
8334
8413
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-some.md
|
|
8336
8415
|
*/
|
|
8337
8416
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8338
8417
|
/**
|
|
8339
8418
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-at.md
|
|
8341
8420
|
*/
|
|
8342
8421
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8343
8422
|
/**
|
|
8344
8423
|
* Prefer `await` over promise chaining.
|
|
8345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-await.md
|
|
8346
8425
|
*/
|
|
8347
8426
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8348
8427
|
/**
|
|
8349
8428
|
* Prefer `BigInt` literals over the constructor.
|
|
8350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-bigint-literals.md
|
|
8351
8430
|
*/
|
|
8352
8431
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8353
8432
|
/**
|
|
8354
8433
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8356
8435
|
*/
|
|
8357
8436
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8358
8437
|
/**
|
|
8359
8438
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8361
8440
|
*/
|
|
8362
8441
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8363
8442
|
/**
|
|
8364
8443
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-boolean-return.md
|
|
8366
8445
|
*/
|
|
8367
8446
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8368
8447
|
/**
|
|
8369
8448
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-class-fields.md
|
|
8371
8450
|
*/
|
|
8372
8451
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8373
8452
|
/**
|
|
8374
8453
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8376
8455
|
*/
|
|
8377
8456
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8378
8457
|
/**
|
|
8379
8458
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-code-point.md
|
|
8381
8460
|
*/
|
|
8382
8461
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8383
8462
|
/**
|
|
8384
8463
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-continue.md
|
|
8386
8465
|
*/
|
|
8387
8466
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8388
8467
|
/**
|
|
8389
8468
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-date-now.md
|
|
8391
8470
|
*/
|
|
8392
8471
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8393
8472
|
/**
|
|
8394
8473
|
* Prefer default parameters over reassignment.
|
|
8395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-default-parameters.md
|
|
8396
8475
|
*/
|
|
8397
8476
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8398
8477
|
/**
|
|
8399
8478
|
* Prefer direct iteration over default iterator method calls.
|
|
8400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-direct-iteration.md
|
|
8401
8480
|
*/
|
|
8402
8481
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8403
8482
|
/**
|
|
8404
8483
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dispose.md
|
|
8406
8485
|
*/
|
|
8407
8486
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8408
8487
|
/**
|
|
8409
8488
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-append.md
|
|
8411
8490
|
*/
|
|
8412
8491
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8413
8492
|
/**
|
|
8414
8493
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8416
8495
|
* @deprecated
|
|
8417
8496
|
*/
|
|
8418
8497
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8419
8498
|
/**
|
|
8420
8499
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8422
8501
|
*/
|
|
8423
8502
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8424
8503
|
/**
|
|
8425
8504
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8427
8506
|
*/
|
|
8428
8507
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8429
8508
|
/**
|
|
8430
8509
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8432
8511
|
*/
|
|
8433
8512
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8434
8513
|
/**
|
|
8435
8514
|
* Prefer `.textContent` over `.innerText`.
|
|
8436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8437
8516
|
*/
|
|
8438
8517
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8439
8518
|
/**
|
|
8440
8519
|
* Prefer early returns over full-function conditional wrapping.
|
|
8441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-early-return.md
|
|
8442
8521
|
*/
|
|
8443
8522
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8444
8523
|
/**
|
|
8445
8524
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-else-if.md
|
|
8447
8526
|
*/
|
|
8448
8527
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8449
8528
|
/**
|
|
8450
8529
|
* Prefer `Error.isError()` when checking for errors.
|
|
8451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-error-is-error.md
|
|
8452
8531
|
*/
|
|
8453
8532
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8454
8533
|
/**
|
|
8455
8534
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-event-target.md
|
|
8457
8536
|
*/
|
|
8458
8537
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8459
8538
|
/**
|
|
8460
8539
|
* Prefer explicit viewport units.
|
|
8461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
8462
8541
|
*/
|
|
8463
8542
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
8464
8543
|
/**
|
|
8465
8544
|
* Prefer `export…from` when re-exporting.
|
|
8466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-export-from.md
|
|
8467
8546
|
*/
|
|
8468
8547
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8469
8548
|
/**
|
|
8470
8549
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8472
8551
|
*/
|
|
8473
8552
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8474
8553
|
/**
|
|
8475
8554
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8477
8556
|
*/
|
|
8478
8557
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8479
8558
|
/**
|
|
8480
8559
|
* Prefer global numeric constants over `Number` static properties.
|
|
8481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-number-constants.md
|
|
8482
8561
|
*/
|
|
8483
8562
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8484
8563
|
/**
|
|
8485
8564
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-this.md
|
|
8487
8566
|
*/
|
|
8488
8567
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8489
8568
|
/**
|
|
8490
8569
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-group-by.md
|
|
8492
8571
|
*/
|
|
8493
8572
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8494
8573
|
/**
|
|
8495
8574
|
* Prefer `.has()` when checking existence.
|
|
8496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-has-check.md
|
|
8497
8576
|
*/
|
|
8498
8577
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8499
8578
|
/**
|
|
8500
8579
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8502
8581
|
*/
|
|
8503
8582
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8504
8583
|
/**
|
|
8505
8584
|
* Prefer HTTPS over HTTP.
|
|
8506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-https.md
|
|
8507
8586
|
*/
|
|
8508
8587
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8509
8588
|
/**
|
|
8510
8589
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8512
8591
|
*/
|
|
8513
8592
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8514
8593
|
/**
|
|
8515
8594
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8517
8596
|
*/
|
|
8518
8597
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8519
8598
|
/**
|
|
8520
8599
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes.md
|
|
8522
8601
|
*/
|
|
8523
8602
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8524
8603
|
/**
|
|
8525
8604
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8527
8606
|
*/
|
|
8528
8607
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8529
8608
|
/**
|
|
8530
8609
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8532
8611
|
*/
|
|
8533
8612
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8534
8613
|
/**
|
|
8535
8614
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-concat.md
|
|
8537
8616
|
*/
|
|
8538
8617
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8539
8618
|
/**
|
|
8540
8619
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8542
8621
|
*/
|
|
8543
8622
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8544
8623
|
/**
|
|
8545
8624
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8547
8626
|
*/
|
|
8548
8627
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8549
8628
|
/**
|
|
8550
8629
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8552
8631
|
*/
|
|
8553
8632
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8554
8633
|
/**
|
|
8555
8634
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8557
8636
|
* @deprecated
|
|
8558
8637
|
*/
|
|
8559
8638
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8560
8639
|
/**
|
|
8561
8640
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8563
8642
|
*/
|
|
8564
8643
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8565
8644
|
/**
|
|
8566
8645
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-location-assign.md
|
|
8568
8647
|
*/
|
|
8569
8648
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8570
8649
|
/**
|
|
8571
8650
|
* Prefer using a logical operator over a ternary.
|
|
8572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8573
8652
|
*/
|
|
8574
8653
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8575
8654
|
/**
|
|
8576
8655
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-map-from-entries.md
|
|
8578
8657
|
*/
|
|
8579
8658
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8580
8659
|
/**
|
|
8581
8660
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-abs.md
|
|
8583
8662
|
*/
|
|
8584
8663
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8585
8664
|
/**
|
|
8586
8665
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-constants.md
|
|
8588
8667
|
*/
|
|
8589
8668
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8590
8669
|
/**
|
|
8591
8670
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-min-max.md
|
|
8593
8672
|
*/
|
|
8594
8673
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8595
8674
|
/**
|
|
8596
8675
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-trunc.md
|
|
8598
8677
|
*/
|
|
8599
8678
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8600
8679
|
/**
|
|
8601
8680
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8603
8682
|
*/
|
|
8604
8683
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8605
8684
|
/**
|
|
8606
8685
|
* Prefer modern DOM APIs.
|
|
8607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8608
8687
|
*/
|
|
8609
8688
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8610
8689
|
/**
|
|
8611
8690
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8613
8692
|
*/
|
|
8614
8693
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8615
8694
|
/**
|
|
8616
8695
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-module.md
|
|
8618
8697
|
*/
|
|
8619
8698
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8620
8699
|
/**
|
|
8621
8700
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8623
8702
|
*/
|
|
8624
8703
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8625
8704
|
/**
|
|
8626
8705
|
* Prefer negative index over `.length - index` when possible.
|
|
8627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-negative-index.md
|
|
8628
8707
|
*/
|
|
8629
8708
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8630
8709
|
/**
|
|
8631
8710
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-node-protocol.md
|
|
8633
8712
|
*/
|
|
8634
8713
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8635
8714
|
/**
|
|
8636
8715
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-coercion.md
|
|
8638
8717
|
*/
|
|
8639
8718
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8640
8719
|
/**
|
|
8641
8720
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8643
8722
|
*/
|
|
8644
8723
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8645
8724
|
/**
|
|
8646
8725
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-properties.md
|
|
8648
8727
|
*/
|
|
8649
8728
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8650
8729
|
/**
|
|
8651
8730
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-define-properties.md
|
|
8653
8732
|
*/
|
|
8654
8733
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8655
8734
|
/**
|
|
8656
8735
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8658
8737
|
*/
|
|
8659
8738
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8660
8739
|
/**
|
|
8661
8740
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-from-entries.md
|
|
8663
8742
|
*/
|
|
8664
8743
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8665
8744
|
/**
|
|
8666
8745
|
* Prefer the most specific `Object` iterable method.
|
|
8667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8668
8747
|
*/
|
|
8669
8748
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8670
8749
|
/**
|
|
8671
8750
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-observer-apis.md
|
|
8673
8752
|
*/
|
|
8674
8753
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8675
8754
|
/**
|
|
8676
8755
|
* Prefer omitting the `catch` binding parameter.
|
|
8677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8678
8757
|
*/
|
|
8679
8758
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8680
8759
|
/**
|
|
8681
8760
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-path2d.md
|
|
8683
8762
|
*/
|
|
8684
8763
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8685
8764
|
/**
|
|
8686
8765
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-private-class-fields.md
|
|
8688
8767
|
*/
|
|
8689
8768
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8690
8769
|
/**
|
|
8691
8770
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-try.md
|
|
8693
8772
|
*/
|
|
8694
8773
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8695
8774
|
/**
|
|
8696
8775
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8698
8777
|
*/
|
|
8699
8778
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8700
8779
|
/**
|
|
8701
8780
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-prototype-methods.md
|
|
8703
8782
|
*/
|
|
8704
8783
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8705
8784
|
/**
|
|
8706
8785
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-query-selector.md
|
|
8708
8787
|
*/
|
|
8709
8788
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8710
8789
|
/**
|
|
8711
8790
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-queue-microtask.md
|
|
8713
8792
|
*/
|
|
8714
8793
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8715
8794
|
/**
|
|
8716
8795
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-reflect-apply.md
|
|
8718
8797
|
*/
|
|
8719
8798
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8720
8799
|
/**
|
|
8721
8800
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-escape.md
|
|
8723
8802
|
*/
|
|
8724
8803
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8725
8804
|
/**
|
|
8726
8805
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-test.md
|
|
8728
8807
|
*/
|
|
8729
8808
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8730
8809
|
/**
|
|
8731
8810
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-response-static-json.md
|
|
8733
8812
|
*/
|
|
8734
8813
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8735
8814
|
/**
|
|
8736
8815
|
* Prefer `:scope` when using element query selector methods.
|
|
8737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-scoped-selector.md
|
|
8738
8817
|
*/
|
|
8739
8818
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8740
8819
|
/**
|
|
8741
8820
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-has.md
|
|
8743
8822
|
*/
|
|
8744
8823
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8745
8824
|
/**
|
|
8746
8825
|
* Prefer `Set` methods for Set operations.
|
|
8747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-methods.md
|
|
8748
8827
|
*/
|
|
8749
8828
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8750
8829
|
/**
|
|
8751
8830
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-size.md
|
|
8753
8832
|
*/
|
|
8754
8833
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8755
8834
|
/**
|
|
8756
8835
|
* Prefer arrow function properties over methods with a single return.
|
|
8757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8758
8837
|
*/
|
|
8759
8838
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8760
8839
|
/**
|
|
8761
8840
|
* Prefer simple conditions first in logical expressions.
|
|
8762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8763
8842
|
*/
|
|
8764
8843
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8765
8844
|
/**
|
|
8766
8845
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8768
8847
|
*/
|
|
8769
8848
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8770
8849
|
/**
|
|
8771
8850
|
* Prefer simplified conditions.
|
|
8772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8773
8852
|
*/
|
|
8774
8853
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8775
8854
|
/**
|
|
8776
8855
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8778
8857
|
*/
|
|
8779
8858
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8780
8859
|
/**
|
|
8781
8860
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-call.md
|
|
8783
8862
|
*/
|
|
8784
8863
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8785
8864
|
/**
|
|
8786
8865
|
* Prefer a single object destructuring declaration per local const source.
|
|
8787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8788
8867
|
*/
|
|
8789
8868
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8790
8869
|
/**
|
|
8791
8870
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-replace.md
|
|
8793
8872
|
*/
|
|
8794
8873
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8795
8874
|
/**
|
|
8796
8875
|
* Prefer declaring variables in the smallest possible scope.
|
|
8797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-smaller-scope.md
|
|
8798
8877
|
*/
|
|
8799
8878
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8800
8879
|
/**
|
|
8801
8880
|
* Prefer `String#split()` with a limit.
|
|
8802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-split-limit.md
|
|
8803
8882
|
*/
|
|
8804
8883
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8805
8884
|
/**
|
|
8806
8885
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-spread.md
|
|
8808
8887
|
*/
|
|
8809
8888
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8810
8889
|
/**
|
|
8811
8890
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-match-all.md
|
|
8813
8892
|
*/
|
|
8814
8893
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8815
8894
|
/**
|
|
8816
8895
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8818
8897
|
*/
|
|
8819
8898
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8820
8899
|
/**
|
|
8821
8900
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-raw.md
|
|
8823
8902
|
*/
|
|
8824
8903
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8825
8904
|
/**
|
|
8826
8905
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-repeat.md
|
|
8828
8907
|
*/
|
|
8829
8908
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8830
8909
|
/**
|
|
8831
8910
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-replace-all.md
|
|
8833
8912
|
*/
|
|
8834
8913
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8835
8914
|
/**
|
|
8836
8915
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-slice.md
|
|
8838
8917
|
*/
|
|
8839
8918
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8840
8919
|
/**
|
|
8841
8920
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8843
8922
|
*/
|
|
8844
8923
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8845
8924
|
/**
|
|
8846
8925
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8848
8927
|
*/
|
|
8849
8928
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8850
8929
|
/**
|
|
8851
8930
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-structured-clone.md
|
|
8853
8932
|
*/
|
|
8854
8933
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8855
8934
|
/**
|
|
8856
8935
|
* Prefer `switch` over multiple `else-if`.
|
|
8857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-switch.md
|
|
8858
8937
|
*/
|
|
8859
8938
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8860
8939
|
/**
|
|
8861
8940
|
* Prefer `Temporal` over `Date`.
|
|
8862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-temporal.md
|
|
8863
8942
|
*/
|
|
8864
8943
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8865
8944
|
/**
|
|
8866
8945
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-ternary.md
|
|
8868
8947
|
*/
|
|
8869
8948
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8870
8949
|
/**
|
|
8871
8950
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-then-catch.md
|
|
8873
8952
|
*/
|
|
8874
8953
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8875
8954
|
/**
|
|
8876
8955
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8878
8957
|
*/
|
|
8879
8958
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8880
8959
|
/**
|
|
8881
8960
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-top-level-await.md
|
|
8883
8962
|
*/
|
|
8884
8963
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8885
8964
|
/**
|
|
8886
8965
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-error.md
|
|
8888
8967
|
*/
|
|
8889
8968
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8890
8969
|
/**
|
|
8891
8970
|
* Require type literals to be last in union types.
|
|
8892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-literal-last.md
|
|
8893
8972
|
*/
|
|
8894
8973
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8895
8974
|
/**
|
|
8896
8975
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8898
8977
|
*/
|
|
8899
8978
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8900
8979
|
/**
|
|
8901
8980
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unary-minus.md
|
|
8903
8982
|
*/
|
|
8904
8983
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8905
8984
|
/**
|
|
8906
8985
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8908
8987
|
*/
|
|
8909
8988
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8910
8989
|
/**
|
|
8911
8990
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-can-parse.md
|
|
8913
8992
|
*/
|
|
8914
8993
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8915
8994
|
/**
|
|
8916
8995
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-href.md
|
|
8918
8997
|
*/
|
|
8919
8998
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8920
8999
|
/**
|
|
8921
9000
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8923
9002
|
*/
|
|
8924
9003
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8925
9004
|
/**
|
|
8926
9005
|
* Prefer putting the condition in the while statement.
|
|
8927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8928
9007
|
*/
|
|
8929
9008
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8930
9009
|
/**
|
|
8931
9010
|
* Renamed to `unicorn/name-replacements`.
|
|
8932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8933
9012
|
* @deprecated
|
|
8934
9013
|
*/
|
|
8935
9014
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8936
9015
|
/**
|
|
8937
9016
|
* Enforce consistent relative URL style.
|
|
8938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/relative-url-style.md
|
|
8939
9018
|
*/
|
|
8940
9019
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8941
9020
|
/**
|
|
8942
9021
|
* Enforce using the separator argument with `Array#join()`.
|
|
8943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-join-separator.md
|
|
8944
9023
|
*/
|
|
8945
9024
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8946
9025
|
/**
|
|
8947
9026
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-sort-compare.md
|
|
8949
9028
|
*/
|
|
8950
9029
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8951
9030
|
/**
|
|
8952
9031
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-css-escape.md
|
|
8954
9033
|
*/
|
|
8955
9034
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8956
9035
|
/**
|
|
8957
9036
|
* Require configured YAML frontmatter fields.
|
|
8958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-frontmatter-fields.md
|
|
8959
9038
|
*/
|
|
8960
9039
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8961
9040
|
/**
|
|
8962
9041
|
* Require non-empty module attributes for imports and exports
|
|
8963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-attributes.md
|
|
8964
9043
|
*/
|
|
8965
9044
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8966
9045
|
/**
|
|
8967
9046
|
* Require non-empty specifier list in import and export statements.
|
|
8968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-specifiers.md
|
|
8969
9048
|
*/
|
|
8970
9049
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8971
9050
|
/**
|
|
8972
9051
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8974
9053
|
*/
|
|
8975
9054
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8976
9055
|
/**
|
|
8977
9056
|
* Require passive event listeners for high-frequency events.
|
|
8978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-passive-events.md
|
|
8979
9058
|
*/
|
|
8980
9059
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8981
9060
|
/**
|
|
8982
9061
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-post-message-target-origin.md
|
|
8984
9063
|
*/
|
|
8985
9064
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8986
9065
|
/**
|
|
8987
9066
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8989
9068
|
*/
|
|
8990
9069
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8991
9070
|
/**
|
|
8992
9071
|
* Enforce a consistent style for single-line block comments.
|
|
8993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/single-line-block-comment-style.md
|
|
8994
9073
|
*/
|
|
8995
9074
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8996
9075
|
/**
|
|
8997
9076
|
* Enforce better string content.
|
|
8998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/string-content.md
|
|
8999
9078
|
*/
|
|
9000
9079
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9001
9080
|
/**
|
|
9002
9081
|
* Enforce consistent brace style for `case` clauses.
|
|
9003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-braces.md
|
|
9004
9083
|
*/
|
|
9005
9084
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9006
9085
|
/**
|
|
9007
9086
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-break-position.md
|
|
9009
9088
|
*/
|
|
9010
9089
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9011
9090
|
/**
|
|
9012
9091
|
* Fix whitespace-insensitive template indentation.
|
|
9013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/template-indent.md
|
|
9014
9093
|
*/
|
|
9015
9094
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9016
9095
|
/**
|
|
9017
9096
|
* Enforce consistent case for text encoding identifiers.
|
|
9018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9019
9098
|
*/
|
|
9020
9099
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9021
9100
|
/**
|
|
9022
9101
|
* Require `new` when creating an error.
|
|
9023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/throw-new-error.md
|
|
9024
9103
|
*/
|
|
9025
9104
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9026
9105
|
/**
|
|
9027
9106
|
* Limit the complexity of `try` blocks.
|
|
9028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/try-complexity.md
|
|
9029
9108
|
*/
|
|
9030
9109
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9031
9110
|
/**
|
|
@@ -10777,6 +10856,10 @@ type AngularNoInputRename = [] | [{
|
|
|
10777
10856
|
type AngularPipePrefix = [] | [{
|
|
10778
10857
|
prefixes?: string[];
|
|
10779
10858
|
}];
|
|
10859
|
+
// ----- angular/prefer-on-push-component-change-detection -----
|
|
10860
|
+
type AngularPreferOnPushComponentChangeDetection = [] | [{
|
|
10861
|
+
allowExplicitOnPush?: boolean;
|
|
10862
|
+
}];
|
|
10780
10863
|
// ----- angular/prefer-signals -----
|
|
10781
10864
|
type AngularPreferSignals = [] | [{
|
|
10782
10865
|
preferReadonlySignalProperties?: boolean;
|
|
@@ -11423,12 +11506,16 @@ type JsdocCheckLineAlignment = [] | [("always" | "never" | "any")] | [("always"
|
|
|
11423
11506
|
// ----- jsdoc/check-param-names -----
|
|
11424
11507
|
type JsdocCheckParamNames = [] | [{
|
|
11425
11508
|
allowExtraTrailingParamDocs?: boolean;
|
|
11509
|
+
badParamNames?: boolean;
|
|
11510
|
+
badParamOrder?: boolean;
|
|
11426
11511
|
checkDestructured?: boolean;
|
|
11427
11512
|
checkRestProperty?: boolean;
|
|
11428
11513
|
checkTypesPattern?: string;
|
|
11429
11514
|
disableExtraPropertyReporting?: boolean;
|
|
11430
11515
|
disableMissingParamChecks?: boolean;
|
|
11516
|
+
duplicateParams?: boolean;
|
|
11431
11517
|
enableFixer?: boolean;
|
|
11518
|
+
extraParams?: boolean;
|
|
11432
11519
|
useDefaultObjectProperties?: boolean;
|
|
11433
11520
|
}];
|
|
11434
11521
|
// ----- jsdoc/check-property-names -----
|
|
@@ -11609,6 +11696,13 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
11609
11696
|
disableReporting?: boolean;
|
|
11610
11697
|
markVariablesAsUsed?: boolean;
|
|
11611
11698
|
}];
|
|
11699
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
11700
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
11701
|
+
checkLiteralConstAssertions?: boolean;
|
|
11702
|
+
enableFixer?: boolean;
|
|
11703
|
+
treatAnyAsRedundant?: boolean;
|
|
11704
|
+
typesToIgnore?: string[];
|
|
11705
|
+
}];
|
|
11612
11706
|
// ----- jsdoc/normalize-see-links -----
|
|
11613
11707
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
11614
11708
|
canonicalForm?: ("pipe" | "prefix");
|
|
@@ -13320,6 +13414,10 @@ type NoUnderscoreDangle = [] | [{
|
|
|
13320
13414
|
allowInArrayDestructuring?: boolean;
|
|
13321
13415
|
allowInObjectDestructuring?: boolean;
|
|
13322
13416
|
}];
|
|
13417
|
+
// ----- no-unmodified-loop-condition -----
|
|
13418
|
+
type NoUnmodifiedLoopCondition = [] | [{
|
|
13419
|
+
checkConditionalExpressions?: boolean;
|
|
13420
|
+
}];
|
|
13323
13421
|
// ----- no-unneeded-ternary -----
|
|
13324
13422
|
type NoUnneededTernary = [] | [{
|
|
13325
13423
|
defaultAssignment?: boolean;
|
|
@@ -13643,6 +13741,10 @@ type NodePreferGlobalUrlSearchParams = [] | [("always" | "never")];
|
|
|
13643
13741
|
type NodePreferNodeProtocol = [] | [{
|
|
13644
13742
|
version?: string;
|
|
13645
13743
|
}];
|
|
13744
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
13745
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
13746
|
+
version?: string;
|
|
13747
|
+
}];
|
|
13646
13748
|
// ----- node/shebang -----
|
|
13647
13749
|
type NodeShebang = [] | [{
|
|
13648
13750
|
convertPath?: ({
|
|
@@ -16815,7 +16917,6 @@ type SolidEventHandlers = [] | [{
|
|
|
16815
16917
|
// ----- solid/jsx-no-duplicate-props -----
|
|
16816
16918
|
type SolidJsxNoDuplicateProps = [] | [{
|
|
16817
16919
|
ignoreCase?: boolean;
|
|
16818
|
-
[k: string]: unknown | undefined;
|
|
16819
16920
|
}];
|
|
16820
16921
|
// ----- solid/jsx-no-undef -----
|
|
16821
16922
|
type SolidJsxNoUndef = [] | [{
|
|
@@ -16849,6 +16950,10 @@ type SolidStyleProp = [] | [{
|
|
|
16849
16950
|
styleProps?: [string, ...(string)[]];
|
|
16850
16951
|
allowString?: boolean;
|
|
16851
16952
|
}];
|
|
16953
|
+
// ----- solid/valid-use-server -----
|
|
16954
|
+
type SolidValidUseServer = [] | [{
|
|
16955
|
+
clientWrappers?: string[];
|
|
16956
|
+
}];
|
|
16852
16957
|
// ----- sort-imports -----
|
|
16853
16958
|
type SortImports = [] | [{
|
|
16854
16959
|
ignoreCase?: boolean;
|