@2digits/eslint-config 5.9.3 → 5.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +414 -406
- package/dist/index.mjs +1 -1
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
|
2
2
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
3
3
|
import { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
|
|
4
4
|
import { Linter } from "eslint";
|
|
5
|
-
//#region src/constants.d.ts
|
|
6
5
|
declare const PluginNameMap: {
|
|
7
6
|
readonly '@next/next': "next";
|
|
8
7
|
readonly '@eslint-react': "react-extra";
|
|
@@ -37,8 +36,6 @@ declare const PluginNameMap: {
|
|
|
37
36
|
readonly zod: "zod";
|
|
38
37
|
readonly toml: "toml";
|
|
39
38
|
};
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/types.gen.d.ts
|
|
42
39
|
interface RuleOptions {
|
|
43
40
|
/**
|
|
44
41
|
* Require curly braces around if statement bodies
|
|
@@ -115,6 +112,11 @@ interface RuleOptions {
|
|
|
115
112
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
|
|
116
113
|
*/
|
|
117
114
|
'antfu/no-ts-export-equal'?: Linter.RuleEntry<[]>;
|
|
115
|
+
/**
|
|
116
|
+
* Enforce multiline objects, arrays and ternaries when they are complex
|
|
117
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/reasonable-newline.md
|
|
118
|
+
*/
|
|
119
|
+
'antfu/reasonable-newline'?: Linter.RuleEntry<AntfuReasonableNewline>;
|
|
118
120
|
/**
|
|
119
121
|
* Enforce top-level functions to be declared with function keyword
|
|
120
122
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
|
|
@@ -3291,7 +3293,7 @@ Backward pagination arguments
|
|
|
3291
3293
|
*/
|
|
3292
3294
|
'react-extra/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3293
3295
|
/**
|
|
3294
|
-
* Disallows 'target="_blank"' without 'rel="noreferrer
|
|
3296
|
+
* Disallows 'target="_blank"' without 'rel="noreferrer"'.
|
|
3295
3297
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
3296
3298
|
*/
|
|
3297
3299
|
'react-extra/dom-no-unsafe-target-blank'?: Linter.RuleEntry<ReactExtraDomNoUnsafeTargetBlank>;
|
|
@@ -7435,2002 +7437,2002 @@ Backward pagination arguments
|
|
|
7435
7437
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7436
7438
|
/**
|
|
7437
7439
|
* Prefer better DOM traversal APIs.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/better-dom-traversing.md
|
|
7439
7441
|
*/
|
|
7440
7442
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7441
7443
|
/**
|
|
7442
7444
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7444
7446
|
* @deprecated
|
|
7445
7447
|
*/
|
|
7446
7448
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7447
7449
|
/**
|
|
7448
7450
|
* Enforce a specific parameter name in catch clauses.
|
|
7449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/catch-error-name.md
|
|
7450
7452
|
*/
|
|
7451
7453
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7452
7454
|
/**
|
|
7453
7455
|
* Enforce consistent class references in static methods.
|
|
7454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7455
7457
|
*/
|
|
7456
7458
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7457
7459
|
/**
|
|
7458
7460
|
* Enforce consistent spacing before and after commas in JSON and SOML.
|
|
7459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comma-spacing.md
|
|
7460
7462
|
*/
|
|
7461
7463
|
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
7462
7464
|
/**
|
|
7463
7465
|
* Enforce better comment content.
|
|
7464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comment-content.md
|
|
7465
7467
|
*/
|
|
7466
7468
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7467
7469
|
/**
|
|
7468
7470
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7470
7472
|
*/
|
|
7471
7473
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7472
7474
|
/**
|
|
7473
7475
|
* Enforce consistent assertion style with `node:assert`.
|
|
7474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-assert.md
|
|
7475
7477
|
*/
|
|
7476
7478
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7477
7479
|
/**
|
|
7478
7480
|
* Enforce consistent naming for boolean names.
|
|
7479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-boolean-name.md
|
|
7480
7482
|
*/
|
|
7481
7483
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7482
7484
|
/**
|
|
7483
7485
|
* Enforce consistent class member order.
|
|
7484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-class-member-order.md
|
|
7485
7487
|
*/
|
|
7486
7488
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7487
7489
|
/**
|
|
7488
7490
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-compound-words.md
|
|
7490
7492
|
*/
|
|
7491
7493
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7492
7494
|
/**
|
|
7493
7495
|
* Enforce consistent conditional object spread style.
|
|
7494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7495
7497
|
*/
|
|
7496
7498
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7497
7499
|
/**
|
|
7498
7500
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-date-clone.md
|
|
7500
7502
|
*/
|
|
7501
7503
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7502
7504
|
/**
|
|
7503
7505
|
* Use destructured variables over properties.
|
|
7504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-destructuring.md
|
|
7505
7507
|
*/
|
|
7506
7508
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7507
7509
|
/**
|
|
7508
7510
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7510
7512
|
*/
|
|
7511
7513
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7512
7514
|
/**
|
|
7513
7515
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-existence-index-check.md
|
|
7515
7517
|
*/
|
|
7516
7518
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7517
7519
|
/**
|
|
7518
7520
|
* Enforce consistent decorator position on exported classes.
|
|
7519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7520
7522
|
*/
|
|
7521
7523
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7522
7524
|
/**
|
|
7523
7525
|
* Move function definitions to the highest possible scope.
|
|
7524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-scoping.md
|
|
7525
7527
|
*/
|
|
7526
7528
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7527
7529
|
/**
|
|
7528
7530
|
* Enforce function syntax by role.
|
|
7529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-style.md
|
|
7530
7532
|
*/
|
|
7531
7533
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7532
7534
|
/**
|
|
7533
7535
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-json-file-read.md
|
|
7535
7537
|
*/
|
|
7536
7538
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7537
7539
|
/**
|
|
7538
7540
|
* Enforce consistent optional chaining for same-base member access.
|
|
7539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-optional-chaining.md
|
|
7540
7542
|
*/
|
|
7541
7543
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7542
7544
|
/**
|
|
7543
7545
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7545
7547
|
*/
|
|
7546
7548
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7547
7549
|
/**
|
|
7548
7550
|
* Enforce consistent labels on tuple type elements.
|
|
7549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-tuple-labels.md
|
|
7550
7552
|
*/
|
|
7551
7553
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7552
7554
|
/**
|
|
7553
7555
|
* Enforce correct `Error` subclassing.
|
|
7554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/custom-error-definition.md
|
|
7555
7557
|
*/
|
|
7556
7558
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7557
7559
|
/**
|
|
7558
7560
|
* Enforce consistent default export declarations.
|
|
7559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/default-export-style.md
|
|
7560
7562
|
*/
|
|
7561
7563
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7562
7564
|
/**
|
|
7563
7565
|
* Enforce consistent style for DOM element dataset access.
|
|
7564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/dom-node-dataset.md
|
|
7565
7567
|
*/
|
|
7566
7568
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7567
7569
|
/**
|
|
7568
7570
|
* Enforce no spaces between braces.
|
|
7569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/empty-brace-spaces.md
|
|
7570
7572
|
*/
|
|
7571
7573
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7572
7574
|
/**
|
|
7573
7575
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/error-message.md
|
|
7575
7577
|
*/
|
|
7576
7578
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7577
7579
|
/**
|
|
7578
7580
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/escape-case.md
|
|
7580
7582
|
*/
|
|
7581
7583
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7582
7584
|
/**
|
|
7583
7585
|
* Add expiration conditions to TODO comments.
|
|
7584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/expiring-todo-comments.md
|
|
7585
7587
|
*/
|
|
7586
7588
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7587
7589
|
/**
|
|
7588
7590
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-length-check.md
|
|
7590
7592
|
*/
|
|
7591
7593
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7592
7594
|
/**
|
|
7593
7595
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-timer-delay.md
|
|
7595
7597
|
*/
|
|
7596
7598
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7597
7599
|
/**
|
|
7598
7600
|
* Enforce a case style for filenames and directory names.
|
|
7599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/filename-case.md
|
|
7600
7602
|
*/
|
|
7601
7603
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7602
7604
|
/**
|
|
7603
7605
|
* Require identifiers to match a specified regular expression.
|
|
7604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/id-match.md
|
|
7605
7607
|
*/
|
|
7606
7608
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7607
7609
|
/**
|
|
7608
7610
|
* Enforce specific import styles per module.
|
|
7609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/import-style.md
|
|
7610
7612
|
*/
|
|
7611
7613
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7612
7614
|
/**
|
|
7613
7615
|
* Enforce consistent indentation in JSON and CSS.
|
|
7614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/indent.md
|
|
7615
7617
|
*/
|
|
7616
7618
|
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
7617
7619
|
/**
|
|
7618
7620
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/isolated-functions.md
|
|
7620
7622
|
*/
|
|
7621
7623
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7622
7624
|
/**
|
|
7623
7625
|
* Enforce a consistent style for optional loop sources.
|
|
7624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/iteration-fallback-style.md
|
|
7625
7627
|
*/
|
|
7626
7628
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7627
7629
|
/**
|
|
7628
7630
|
* Enforce a case style for data keys.
|
|
7629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/key-name-casing.md
|
|
7630
7632
|
*/
|
|
7631
7633
|
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
7632
7634
|
/**
|
|
7633
7635
|
* Require or disallow logical assignment operator shorthand
|
|
7634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/logical-assignment-operators.md
|
|
7635
7637
|
*/
|
|
7636
7638
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7637
7639
|
/**
|
|
7638
7640
|
* Limit the depth of nested calls.
|
|
7639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/max-nested-calls.md
|
|
7640
7642
|
*/
|
|
7641
7643
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7642
7644
|
/**
|
|
7643
7645
|
* Enforce replacements for variable, property, and filenames.
|
|
7644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/name-replacements.md
|
|
7645
7647
|
*/
|
|
7646
7648
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7647
7649
|
/**
|
|
7648
7650
|
* Enforce correct use of `new` for builtin constructors.
|
|
7649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/new-for-builtins.md
|
|
7650
7652
|
*/
|
|
7651
7653
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7652
7654
|
/**
|
|
7653
7655
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7655
7657
|
*/
|
|
7656
7658
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7657
7659
|
/**
|
|
7658
7660
|
* Disallow recursive access to `this` within getters and setters.
|
|
7659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accessor-recursion.md
|
|
7660
7662
|
*/
|
|
7661
7663
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7662
7664
|
/**
|
|
7663
7665
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7665
7667
|
*/
|
|
7666
7668
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7667
7669
|
/**
|
|
7668
7670
|
* Disallow anonymous functions and classes as the default export.
|
|
7669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-anonymous-default-export.md
|
|
7670
7672
|
*/
|
|
7671
7673
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7672
7674
|
/**
|
|
7673
7675
|
* Prevent passing a function reference directly to iterator methods.
|
|
7674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-callback-reference.md
|
|
7675
7677
|
*/
|
|
7676
7678
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7677
7679
|
/**
|
|
7678
7680
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7680
7682
|
*/
|
|
7681
7683
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7682
7684
|
/**
|
|
7683
7685
|
* Disallow using reference values as `Array#fill()` values.
|
|
7684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7685
7687
|
*/
|
|
7686
7688
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7687
7689
|
/**
|
|
7688
7690
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-from-fill.md
|
|
7690
7692
|
*/
|
|
7691
7693
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7692
7694
|
/**
|
|
7693
7695
|
* Disallow front-of-array mutation.
|
|
7694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-front-mutation.md
|
|
7695
7697
|
*/
|
|
7696
7698
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7697
7699
|
/**
|
|
7698
7700
|
* Disallow using the `this` argument in array methods.
|
|
7699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-method-this-argument.md
|
|
7700
7702
|
*/
|
|
7701
7703
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7702
7704
|
/**
|
|
7703
7705
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7705
7707
|
* @deprecated
|
|
7706
7708
|
*/
|
|
7707
7709
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7708
7710
|
/**
|
|
7709
7711
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reduce.md
|
|
7711
7713
|
*/
|
|
7712
7714
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7713
7715
|
/**
|
|
7714
7716
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reverse.md
|
|
7716
7718
|
*/
|
|
7717
7719
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7718
7720
|
/**
|
|
7719
7721
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort.md
|
|
7721
7723
|
*/
|
|
7722
7724
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7723
7725
|
/**
|
|
7724
7726
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7726
7728
|
*/
|
|
7727
7729
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7728
7730
|
/**
|
|
7729
7731
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-splice.md
|
|
7731
7733
|
*/
|
|
7732
7734
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7733
7735
|
/**
|
|
7734
7736
|
* Disallow asterisk prefixes and shared indentation in multiline comments.
|
|
7735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7736
7738
|
*/
|
|
7737
7739
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7738
7740
|
/**
|
|
7739
7741
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
7740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-iterator-callback.md
|
|
7741
7743
|
*/
|
|
7742
7744
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
7743
7745
|
/**
|
|
7744
7746
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-promise-finally.md
|
|
7746
7748
|
*/
|
|
7747
7749
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7748
7750
|
/**
|
|
7749
7751
|
* Disallow member access from await expression.
|
|
7750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-expression-member.md
|
|
7751
7753
|
*/
|
|
7752
7754
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7753
7755
|
/**
|
|
7754
7756
|
* Disallow using `await` in `Promise` method parameters.
|
|
7755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7756
7758
|
*/
|
|
7757
7759
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7758
7760
|
/**
|
|
7759
7761
|
* Disallow barrel files.
|
|
7760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-barrel-files.md
|
|
7761
7763
|
*/
|
|
7762
7764
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7763
7765
|
/**
|
|
7764
7766
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-blob-to-file.md
|
|
7766
7768
|
*/
|
|
7767
7769
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7768
7770
|
/**
|
|
7769
7771
|
* Disallow boolean-returning sort comparators.
|
|
7770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7771
7773
|
*/
|
|
7772
7774
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7773
7775
|
/**
|
|
7774
7776
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
7775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7776
7778
|
*/
|
|
7777
7779
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
7778
7780
|
/**
|
|
7779
7781
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-canvas-to-image.md
|
|
7781
7783
|
*/
|
|
7782
7784
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7783
7785
|
/**
|
|
7784
7786
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-chained-comparison.md
|
|
7786
7788
|
*/
|
|
7787
7789
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7788
7790
|
/**
|
|
7789
7791
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-collection-bracket-access.md
|
|
7791
7793
|
*/
|
|
7792
7794
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7793
7795
|
/**
|
|
7794
7796
|
* Disallow dynamic object property existence checks.
|
|
7795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7796
7798
|
*/
|
|
7797
7799
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7798
7800
|
/**
|
|
7799
7801
|
* Disallow conflicting CSS query and HTML form constraints.
|
|
7800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-conflicting-constraints.md
|
|
7801
7803
|
*/
|
|
7802
7804
|
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
7803
7805
|
/**
|
|
7804
7806
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-splice.md
|
|
7806
7808
|
*/
|
|
7807
7809
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7808
7810
|
/**
|
|
7809
7811
|
* Disallow confusing uses of `Array#with()`.
|
|
7810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-with.md
|
|
7811
7813
|
*/
|
|
7812
7814
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7813
7815
|
/**
|
|
7814
7816
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-console-spaces.md
|
|
7816
7818
|
*/
|
|
7817
7819
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7818
7820
|
/**
|
|
7819
7821
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-constant-zero-expression.md
|
|
7821
7823
|
*/
|
|
7822
7824
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7823
7825
|
/**
|
|
7824
7826
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7826
7828
|
*/
|
|
7827
7829
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7828
7830
|
/**
|
|
7829
7831
|
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
7830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
7831
7833
|
* @deprecated
|
|
7832
7834
|
*/
|
|
7833
7835
|
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
7834
7836
|
/**
|
|
7835
7837
|
* Do not use `document.cookie` directly.
|
|
7836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-document-cookie.md
|
|
7837
7839
|
*/
|
|
7838
7840
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7839
7841
|
/**
|
|
7840
7842
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-double-comparison.md
|
|
7842
7844
|
*/
|
|
7843
7845
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7844
7846
|
/**
|
|
7845
7847
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
7846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
7847
7849
|
* @deprecated
|
|
7848
7850
|
*/
|
|
7849
7851
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
7850
7852
|
/**
|
|
7851
7853
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
7853
7855
|
* @deprecated
|
|
7854
7856
|
*/
|
|
7855
7857
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
7856
7858
|
/**
|
|
7857
7859
|
* Disallow duplicate adjacent branches in if chains.
|
|
7858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7859
7861
|
*/
|
|
7860
7862
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7861
7863
|
/**
|
|
7862
7864
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7864
7866
|
*/
|
|
7865
7867
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7866
7868
|
/**
|
|
7867
7869
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-loops.md
|
|
7869
7871
|
*/
|
|
7870
7872
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7871
7873
|
/**
|
|
7872
7874
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-set-values.md
|
|
7874
7876
|
*/
|
|
7875
7877
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7876
7878
|
/**
|
|
7877
7879
|
* Disallow empty files.
|
|
7878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-file.md
|
|
7879
7881
|
*/
|
|
7880
7882
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7881
7883
|
/**
|
|
7882
7884
|
* Disallow empty link text in Markdown.
|
|
7883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-link-text.md
|
|
7884
7886
|
*/
|
|
7885
7887
|
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
7886
7888
|
/**
|
|
7887
7889
|
* Disallow assigning to built-in error properties.
|
|
7888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-error-property-assignment.md
|
|
7889
7891
|
*/
|
|
7890
7892
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7891
7893
|
/**
|
|
7892
7894
|
* Disallow exports in scripts.
|
|
7893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-exports-in-scripts.md
|
|
7894
7896
|
*/
|
|
7895
7897
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7896
7898
|
/**
|
|
7897
7899
|
* Prefer `for…of` over the `forEach` method.
|
|
7898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-each.md
|
|
7899
7901
|
*/
|
|
7900
7902
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7901
7903
|
/**
|
|
7902
7904
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-loop.md
|
|
7904
7906
|
*/
|
|
7905
7907
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7906
7908
|
/**
|
|
7907
7909
|
* Disallow assigning properties on the global object.
|
|
7908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7909
7911
|
*/
|
|
7910
7912
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7911
7913
|
/**
|
|
7912
7914
|
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
7913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7914
7916
|
* @deprecated
|
|
7915
7917
|
*/
|
|
7916
7918
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7917
7919
|
/**
|
|
7918
7920
|
* Disallow immediate mutation after assignment and initialization immediately after declaration.
|
|
7919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-immediate-mutation.md
|
|
7920
7922
|
*/
|
|
7921
7923
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
7922
7924
|
/**
|
|
7923
7925
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7925
7927
|
*/
|
|
7926
7928
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7927
7929
|
/**
|
|
7928
7930
|
* Disallow class accessors that hide an inherited getter or setter.
|
|
7929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
7930
7932
|
*/
|
|
7931
7933
|
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
7932
7934
|
/**
|
|
7933
7935
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7935
7937
|
*/
|
|
7936
7938
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7937
7939
|
/**
|
|
7938
7940
|
* Disallow incorrect template literal interpolation syntax.
|
|
7939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7940
7942
|
*/
|
|
7941
7943
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7942
7944
|
/**
|
|
7943
7945
|
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
7944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
7945
7947
|
*/
|
|
7946
7948
|
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
7947
7949
|
/**
|
|
7948
7950
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7950
7952
|
* @deprecated
|
|
7951
7953
|
*/
|
|
7952
7954
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7953
7955
|
/**
|
|
7954
7956
|
* Disallow `instanceof` with built-in objects
|
|
7955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-instanceof-builtins.md
|
|
7956
7958
|
*/
|
|
7957
7959
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7958
7960
|
/**
|
|
7959
7961
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-argument-count.md
|
|
7961
7963
|
*/
|
|
7962
7964
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7963
7965
|
/**
|
|
7964
7966
|
* Disallow invalid values for HTML boolean attributes.
|
|
7965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
7966
7968
|
*/
|
|
7967
7969
|
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
7968
7970
|
/**
|
|
7969
7971
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7971
7973
|
*/
|
|
7972
7974
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7973
7975
|
/**
|
|
7974
7976
|
* Disallow invalid DOM tokens.
|
|
7975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-dom-token.md
|
|
7976
7978
|
*/
|
|
7977
7979
|
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
7978
7980
|
/**
|
|
7979
7981
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7981
7983
|
*/
|
|
7982
7984
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7983
7985
|
/**
|
|
7984
7986
|
* Disallow invalid `accept` values on file inputs.
|
|
7985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7986
7988
|
*/
|
|
7987
7989
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7988
7990
|
/**
|
|
7989
7991
|
* Disallow invalid subresource integrity metadata.
|
|
7990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-integrity.md
|
|
7991
7993
|
*/
|
|
7992
7994
|
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
7993
7995
|
/**
|
|
7994
7996
|
* Disallow invalid or ignored Intl options.
|
|
7995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-intl-options.md
|
|
7996
7998
|
*/
|
|
7997
7999
|
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
7998
8000
|
/**
|
|
7999
8001
|
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
8000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
8001
8003
|
* @deprecated
|
|
8002
8004
|
*/
|
|
8003
8005
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
8004
8006
|
/**
|
|
8005
8007
|
* Disallow invalid property descriptors.
|
|
8006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
8007
8009
|
*/
|
|
8008
8010
|
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
8009
8011
|
/**
|
|
8010
8012
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
8011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
8012
8014
|
*/
|
|
8013
8015
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
8014
8016
|
/**
|
|
8015
8017
|
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
8016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-response-options.md
|
|
8017
8019
|
*/
|
|
8018
8020
|
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
8019
8021
|
/**
|
|
8020
8022
|
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
8021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-style-set-property.md
|
|
8022
8024
|
*/
|
|
8023
8025
|
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
8024
8026
|
/**
|
|
8025
8027
|
* Disallow statically known invalid Temporal arithmetic.
|
|
8026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
8027
8029
|
*/
|
|
8028
8030
|
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
8029
8031
|
/**
|
|
8030
8032
|
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
8031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
8032
8034
|
*/
|
|
8033
8035
|
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
8034
8036
|
/**
|
|
8035
8037
|
* Disallow invalid implementations of well-known symbol methods.
|
|
8036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
8037
8039
|
*/
|
|
8038
8040
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
8039
8041
|
/**
|
|
8040
8042
|
* Disallow `javascript:` URLs in Markdown.
|
|
8041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-javascript-url.md
|
|
8042
8044
|
*/
|
|
8043
8045
|
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
8044
8046
|
/**
|
|
8045
8047
|
* Disallow identifiers starting with `new` or `class`.
|
|
8046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-keyword-prefix.md
|
|
8047
8049
|
*/
|
|
8048
8050
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
8049
8051
|
/**
|
|
8050
8052
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
8051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-current-target-access.md
|
|
8052
8054
|
*/
|
|
8053
8055
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
8054
8056
|
/**
|
|
8055
8057
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
8056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-event-control.md
|
|
8057
8059
|
*/
|
|
8058
8060
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
8059
8061
|
/**
|
|
8060
8062
|
* Disallow empty lines at the beginning of a file.
|
|
8061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-leading-empty-lines.md
|
|
8062
8064
|
*/
|
|
8063
8065
|
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
8064
8066
|
/**
|
|
8065
8067
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
8066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
8067
8069
|
* @deprecated
|
|
8068
8070
|
*/
|
|
8069
8071
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
8070
8072
|
/**
|
|
8071
8073
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
8072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-lonely-if.md
|
|
8073
8075
|
*/
|
|
8074
8076
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
8075
8077
|
/**
|
|
8076
8078
|
* Disallow mutating a loop iterable during iteration.
|
|
8077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
8078
8080
|
*/
|
|
8079
8081
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
8080
8082
|
/**
|
|
8081
8083
|
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
8082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loss-of-precision.md
|
|
8083
8085
|
*/
|
|
8084
8086
|
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
8085
8087
|
/**
|
|
8086
8088
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
8087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
8088
8090
|
*/
|
|
8089
8091
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8090
8092
|
/**
|
|
8091
8093
|
* Disallow manually wrapped comments.
|
|
8092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
8093
8095
|
*/
|
|
8094
8096
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
8095
8097
|
/**
|
|
8096
8098
|
* Disallow checking a Map key before accessing a different key.
|
|
8097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-mismatched-map-key.md
|
|
8098
8100
|
*/
|
|
8099
8101
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
8100
8102
|
/**
|
|
8101
8103
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
8102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-misrefactored-assignment.md
|
|
8103
8105
|
*/
|
|
8104
8106
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
8105
8107
|
/**
|
|
8106
8108
|
* Disallow references to missing local resources.
|
|
8107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-missing-local-resource.md
|
|
8108
8110
|
*/
|
|
8109
8111
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
8110
8112
|
/**
|
|
8111
8113
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
8112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
8113
8115
|
*/
|
|
8114
8116
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
8115
8117
|
/**
|
|
8116
8118
|
* Disallow named usage of default import and export.
|
|
8117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-named-default.md
|
|
8118
8120
|
*/
|
|
8119
8121
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
8120
8122
|
/**
|
|
8121
8123
|
* Disallow negated array predicate calls.
|
|
8122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-array-predicate.md
|
|
8123
8125
|
*/
|
|
8124
8126
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8125
8127
|
/**
|
|
8126
8128
|
* Disallow negated comparisons.
|
|
8127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-comparison.md
|
|
8128
8130
|
*/
|
|
8129
8131
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
8130
8132
|
/**
|
|
8131
8133
|
* Disallow negated conditions.
|
|
8132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-condition.md
|
|
8133
8135
|
*/
|
|
8134
8136
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
8135
8137
|
/**
|
|
8136
8138
|
* Disallow negated expression in equality check.
|
|
8137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negation-in-equality-check.md
|
|
8138
8140
|
*/
|
|
8139
8141
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
8140
8142
|
/**
|
|
8141
8143
|
* Disallow nested ternary expressions.
|
|
8142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nested-ternary.md
|
|
8143
8145
|
*/
|
|
8144
8146
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8145
8147
|
/**
|
|
8146
8148
|
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
8147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
8148
8150
|
* @deprecated
|
|
8149
8151
|
*/
|
|
8150
8152
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
8151
8153
|
/**
|
|
8152
8154
|
* Disallow `new Array()`.
|
|
8153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-array.md
|
|
8154
8156
|
*/
|
|
8155
8157
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
8156
8158
|
/**
|
|
8157
8159
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
8158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-buffer.md
|
|
8159
8161
|
*/
|
|
8160
8162
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
8161
8163
|
/**
|
|
8162
8164
|
* Disallow non-function values with function-style verb prefixes.
|
|
8163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
8164
8166
|
*/
|
|
8165
8167
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
8166
8168
|
/**
|
|
8167
8169
|
* Disallow non-standard properties on built-in objects.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
8169
8171
|
*/
|
|
8170
8172
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
8171
8173
|
/**
|
|
8172
8174
|
* Disallow the use of the `null` literal.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-null.md
|
|
8174
8176
|
*/
|
|
8175
8177
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
8176
8178
|
/**
|
|
8177
8179
|
* Disallow the use of objects as default parameters.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-as-default-parameter.md
|
|
8179
8181
|
*/
|
|
8180
8182
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
8181
8183
|
/**
|
|
8182
8184
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-methods-with-collections.md
|
|
8184
8186
|
*/
|
|
8185
8187
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
8186
8188
|
/**
|
|
8187
8189
|
* Disallow optional chaining on undeclared variables.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
8189
8191
|
*/
|
|
8190
8192
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
8191
8193
|
/**
|
|
8192
8194
|
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
8193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
8194
8196
|
*/
|
|
8195
8197
|
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
8196
8198
|
/**
|
|
8197
8199
|
* Disallow `process.exit()`.
|
|
8198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-process-exit.md
|
|
8199
8201
|
*/
|
|
8200
8202
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
8201
8203
|
/**
|
|
8202
8204
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
8203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-redundant-comparison.md
|
|
8204
8206
|
*/
|
|
8205
8207
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
8206
8208
|
/**
|
|
8207
8209
|
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
8208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
8209
8211
|
* @deprecated
|
|
8210
8212
|
*/
|
|
8211
8213
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
8212
8214
|
/**
|
|
8213
8215
|
* Disallow repeating the same wrapper at every call to a function.
|
|
8214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-repeated-call-wrappers.md
|
|
8215
8217
|
*/
|
|
8216
8218
|
'unicorn/no-repeated-call-wrappers'?: Linter.RuleEntry<[]>;
|
|
8217
8219
|
/**
|
|
8218
8220
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
8219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-return-array-push.md
|
|
8220
8222
|
*/
|
|
8221
8223
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
8222
8224
|
/**
|
|
8223
8225
|
* Disallow selector syntax in DOM names.
|
|
8224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-selector-as-dom-name.md
|
|
8225
8227
|
*/
|
|
8226
8228
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
8227
8229
|
/**
|
|
8228
8230
|
* Disallow shorthand properties that override related longhand properties.
|
|
8229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
8230
8232
|
*/
|
|
8231
8233
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
8232
8234
|
/**
|
|
8233
8235
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
8234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
8235
8237
|
*/
|
|
8236
8238
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8237
8239
|
/**
|
|
8238
8240
|
* Disallow classes that only have static members.
|
|
8239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-static-only-class.md
|
|
8240
8242
|
*/
|
|
8241
8243
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
8242
8244
|
/**
|
|
8243
8245
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
8244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-subtraction-comparison.md
|
|
8245
8247
|
*/
|
|
8246
8248
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
8247
8249
|
/**
|
|
8248
8250
|
* Disallow `then` property.
|
|
8249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-thenable.md
|
|
8250
8252
|
*/
|
|
8251
8253
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
8252
8254
|
/**
|
|
8253
8255
|
* Disallow assigning `this` to a variable.
|
|
8254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-assignment.md
|
|
8255
8257
|
*/
|
|
8256
8258
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
8257
8259
|
/**
|
|
8258
8260
|
* Disallow `this` outside of classes.
|
|
8259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-outside-of-class.md
|
|
8260
8262
|
*/
|
|
8261
8263
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8262
8264
|
/**
|
|
8263
8265
|
* Disallow assigning to top-level variables from inside functions.
|
|
8264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8265
8267
|
*/
|
|
8266
8268
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8267
8269
|
/**
|
|
8268
8270
|
* Disallow top-level side effects in exported modules.
|
|
8269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-side-effects.md
|
|
8270
8272
|
*/
|
|
8271
8273
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<UnicornNoTopLevelSideEffects>;
|
|
8272
8274
|
/**
|
|
8273
8275
|
* Disallow `all` as a transition property.
|
|
8274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-transition-all.md
|
|
8275
8277
|
*/
|
|
8276
8278
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
8277
8279
|
/**
|
|
8278
8280
|
* Disallow comparing `undefined` using `typeof`.
|
|
8279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-typeof-undefined.md
|
|
8280
8282
|
*/
|
|
8281
8283
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8282
8284
|
/**
|
|
8283
8285
|
* Disallow referencing methods without calling them.
|
|
8284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-uncalled-method.md
|
|
8285
8287
|
*/
|
|
8286
8288
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8287
8289
|
/**
|
|
8288
8290
|
* Require class members to be declared.
|
|
8289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-undeclared-class-members.md
|
|
8290
8292
|
*/
|
|
8291
8293
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8292
8294
|
/**
|
|
8293
8295
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
8294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
8295
8297
|
* @deprecated
|
|
8296
8298
|
*/
|
|
8297
8299
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
8298
8300
|
/**
|
|
8299
8301
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
8300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
8301
8303
|
* @deprecated
|
|
8302
8304
|
*/
|
|
8303
8305
|
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
8304
8306
|
/**
|
|
8305
8307
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8307
8309
|
*/
|
|
8308
8310
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8309
8311
|
/**
|
|
8310
8312
|
* Disallow unnecessary use of `Array#flatMap()`.
|
|
8311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8312
8314
|
*/
|
|
8313
8315
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8314
8316
|
/**
|
|
8315
8317
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8317
8319
|
*/
|
|
8318
8320
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8319
8321
|
/**
|
|
8320
8322
|
* Disallow awaiting non-promise values.
|
|
8321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-await.md
|
|
8322
8324
|
*/
|
|
8323
8325
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8324
8326
|
/**
|
|
8325
8327
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8327
8329
|
*/
|
|
8328
8330
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8329
8331
|
/**
|
|
8330
8332
|
* Disallow arguments that match their parameter defaults.
|
|
8331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-default-arguments.md
|
|
8332
8334
|
*/
|
|
8333
8335
|
'unicorn/no-unnecessary-default-arguments'?: Linter.RuleEntry<[]>;
|
|
8334
8336
|
/**
|
|
8335
8337
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8337
8339
|
*/
|
|
8338
8340
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8339
8341
|
/**
|
|
8340
8342
|
* Disallow unnecessary `globalThis` references.
|
|
8341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8342
8344
|
*/
|
|
8343
8345
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8344
8346
|
/**
|
|
8345
8347
|
* Disallow unnecessary nested ternary expressions.
|
|
8346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8347
8349
|
*/
|
|
8348
8350
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8349
8351
|
/**
|
|
8350
8352
|
* Disallow parameters that receive the same value at every call.
|
|
8351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-parameters.md
|
|
8352
8354
|
*/
|
|
8353
8355
|
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
8354
8356
|
/**
|
|
8355
8357
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8357
8359
|
*/
|
|
8358
8360
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8359
8361
|
/**
|
|
8360
8362
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8362
8364
|
*/
|
|
8363
8365
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8364
8366
|
/**
|
|
8365
8367
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-splice.md
|
|
8367
8369
|
*/
|
|
8368
8370
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8369
8371
|
/**
|
|
8370
8372
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8372
8374
|
*/
|
|
8373
8375
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8374
8376
|
/**
|
|
8375
8377
|
* Disallow unreadable array destructuring.
|
|
8376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8377
8379
|
*/
|
|
8378
8380
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8379
8381
|
/**
|
|
8380
8382
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8382
8384
|
*/
|
|
8383
8385
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8384
8386
|
/**
|
|
8385
8387
|
* Disallow unreadable IIFEs.
|
|
8386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-iife.md
|
|
8387
8389
|
*/
|
|
8388
8390
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8389
8391
|
/**
|
|
8390
8392
|
* Disallow unreadable `new` expressions.
|
|
8391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8392
8394
|
*/
|
|
8393
8395
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8394
8396
|
/**
|
|
8395
8397
|
* Disallow unreadable object destructuring.
|
|
8396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8397
8399
|
*/
|
|
8398
8400
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8399
8401
|
/**
|
|
8400
8402
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8402
8404
|
*/
|
|
8403
8405
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8404
8406
|
/**
|
|
8405
8407
|
* Disallow unsafe DOM HTML APIs.
|
|
8406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8407
8409
|
*/
|
|
8408
8410
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8409
8411
|
/**
|
|
8410
8412
|
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
8411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
8412
8414
|
*/
|
|
8413
8415
|
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
8414
8416
|
/**
|
|
8415
8417
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8417
8419
|
*/
|
|
8418
8420
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8419
8421
|
/**
|
|
8420
8422
|
* Disallow unsafe values as property keys.
|
|
8421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-property-key.md
|
|
8422
8424
|
*/
|
|
8423
8425
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8424
8426
|
/**
|
|
8425
8427
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8427
8429
|
*/
|
|
8428
8430
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8429
8431
|
/**
|
|
8430
8432
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8432
8434
|
*/
|
|
8433
8435
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8434
8436
|
/**
|
|
8435
8437
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
8436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
8437
8439
|
* @deprecated
|
|
8438
8440
|
*/
|
|
8439
8441
|
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
8440
8442
|
/**
|
|
8441
8443
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
8442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
8443
8445
|
* @deprecated
|
|
8444
8446
|
*/
|
|
8445
8447
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8446
8448
|
/**
|
|
8447
8449
|
* Disallow ignoring the return value of selected built-in methods.
|
|
8448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
8449
8451
|
*/
|
|
8450
8452
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
8451
8453
|
/**
|
|
8452
8454
|
* Disallow discarding lazy iterator helpers.
|
|
8453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-iterator-helper.md
|
|
8454
8456
|
*/
|
|
8455
8457
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
8456
8458
|
/**
|
|
8457
8459
|
* Disallow unused object properties.
|
|
8458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-properties.md
|
|
8459
8461
|
*/
|
|
8460
8462
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8461
8463
|
/**
|
|
8462
8464
|
* Disallow passing full URLs to `URLSearchParams`.
|
|
8463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-url-in-search-params.md
|
|
8464
8466
|
*/
|
|
8465
8467
|
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
8466
8468
|
/**
|
|
8467
8469
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8469
8471
|
*/
|
|
8470
8472
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8471
8473
|
/**
|
|
8472
8474
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-coercion.md
|
|
8474
8476
|
*/
|
|
8475
8477
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8476
8478
|
/**
|
|
8477
8479
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-collection-argument.md
|
|
8479
8481
|
*/
|
|
8480
8482
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8481
8483
|
/**
|
|
8482
8484
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8484
8486
|
*/
|
|
8485
8487
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8486
8488
|
/**
|
|
8487
8489
|
* Disallow useless concatenation of literals.
|
|
8488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-concat.md
|
|
8489
8491
|
*/
|
|
8490
8492
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8491
8493
|
/**
|
|
8492
8494
|
* Disallow useless `continue` statements.
|
|
8493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-continue.md
|
|
8494
8496
|
*/
|
|
8495
8497
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8496
8498
|
/**
|
|
8497
8499
|
* Disallow unnecessary existence checks before deletion.
|
|
8498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-delete-check.md
|
|
8499
8501
|
*/
|
|
8500
8502
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8501
8503
|
/**
|
|
8502
8504
|
* Disallow `else` after a statement that exits.
|
|
8503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-else.md
|
|
8504
8506
|
*/
|
|
8505
8507
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8506
8508
|
/**
|
|
8507
8509
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8509
8511
|
*/
|
|
8510
8512
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8511
8513
|
/**
|
|
8512
8514
|
* Disallow useless fallback when spreading in object literals.
|
|
8513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8514
8516
|
*/
|
|
8515
8517
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8516
8518
|
/**
|
|
8517
8519
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8519
8521
|
*/
|
|
8520
8522
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8521
8523
|
/**
|
|
8522
8524
|
* Disallow useless array length check.
|
|
8523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-length-check.md
|
|
8524
8526
|
*/
|
|
8525
8527
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8526
8528
|
/**
|
|
8527
8529
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-logical-operand.md
|
|
8529
8531
|
*/
|
|
8530
8532
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8531
8533
|
/**
|
|
8532
8534
|
* Disallow useless overrides of class methods.
|
|
8533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-override.md
|
|
8534
8536
|
*/
|
|
8535
8537
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8536
8538
|
/**
|
|
8537
8539
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8539
8541
|
*/
|
|
8540
8542
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8541
8543
|
/**
|
|
8542
8544
|
* Disallow redundant re-exports.
|
|
8543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-re-export.md
|
|
8544
8546
|
*/
|
|
8545
8547
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8546
8548
|
/**
|
|
8547
8549
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-recursion.md
|
|
8549
8551
|
*/
|
|
8550
8552
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8551
8553
|
/**
|
|
8552
8554
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
8553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-set-construction.md
|
|
8554
8556
|
*/
|
|
8555
8557
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
8556
8558
|
/**
|
|
8557
8559
|
* Disallow unnecessary spread.
|
|
8558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-spread.md
|
|
8559
8561
|
*/
|
|
8560
8562
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8561
8563
|
/**
|
|
8562
8564
|
* Disallow useless case in switch statements.
|
|
8563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-switch-case.md
|
|
8564
8566
|
*/
|
|
8565
8567
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8566
8568
|
/**
|
|
8567
8569
|
* Disallow useless template literal expressions.
|
|
8568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-template-literals.md
|
|
8569
8571
|
*/
|
|
8570
8572
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8571
8573
|
/**
|
|
8572
8574
|
* Disallow useless `undefined`.
|
|
8573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-undefined.md
|
|
8574
8576
|
*/
|
|
8575
8577
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8576
8578
|
/**
|
|
8577
8579
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
8578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-using-resource-escape.md
|
|
8579
8581
|
*/
|
|
8580
8582
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
8581
8583
|
/**
|
|
8582
8584
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8584
8586
|
*/
|
|
8585
8587
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8586
8588
|
/**
|
|
8587
8589
|
* Require consistent decimal numbers without redundant zeros.
|
|
8588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-zero-fractions.md
|
|
8589
8591
|
*/
|
|
8590
8592
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8591
8593
|
/**
|
|
8592
8594
|
* Enforce proper case for numeric literals.
|
|
8593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/number-literal-case.md
|
|
8594
8596
|
*/
|
|
8595
8597
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8596
8598
|
/**
|
|
8597
8599
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/numeric-separators-style.md
|
|
8599
8601
|
*/
|
|
8600
8602
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8601
8603
|
/**
|
|
8602
8604
|
* Require assignment operator shorthand where possible.
|
|
8603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/operator-assignment.md
|
|
8604
8606
|
*/
|
|
8605
8607
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8606
8608
|
/**
|
|
8607
8609
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8609
8611
|
*/
|
|
8610
8612
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8611
8613
|
/**
|
|
8612
8614
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8614
8616
|
*/
|
|
8615
8617
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8616
8618
|
/**
|
|
8617
8619
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener.md
|
|
8619
8621
|
*/
|
|
8620
8622
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8621
8623
|
/**
|
|
8622
8624
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8624
8626
|
*/
|
|
8625
8627
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8626
8628
|
/**
|
|
8627
8629
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-aggregate-error.md
|
|
8629
8631
|
*/
|
|
8630
8632
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8631
8633
|
/**
|
|
8632
8634
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-find.md
|
|
8634
8636
|
*/
|
|
8635
8637
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8636
8638
|
/**
|
|
8637
8639
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat.md
|
|
8639
8641
|
*/
|
|
8640
8642
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8641
8643
|
/**
|
|
8642
8644
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat-map.md
|
|
8644
8646
|
*/
|
|
8645
8647
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8646
8648
|
/**
|
|
8647
8649
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
8648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-async.md
|
|
8649
8651
|
*/
|
|
8650
8652
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8651
8653
|
/**
|
|
8652
8654
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-map.md
|
|
8654
8656
|
*/
|
|
8655
8657
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8656
8658
|
/**
|
|
8657
8659
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-range.md
|
|
8659
8661
|
*/
|
|
8660
8662
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8661
8663
|
/**
|
|
8662
8664
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-index-of.md
|
|
8664
8666
|
*/
|
|
8665
8667
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8666
8668
|
/**
|
|
8667
8669
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8669
8671
|
*/
|
|
8670
8672
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8671
8673
|
/**
|
|
8672
8674
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-last-methods.md
|
|
8674
8676
|
*/
|
|
8675
8677
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8676
8678
|
/**
|
|
8677
8679
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-slice.md
|
|
8679
8681
|
*/
|
|
8680
8682
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8681
8683
|
/**
|
|
8682
8684
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-some.md
|
|
8684
8686
|
*/
|
|
8685
8687
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8686
8688
|
/**
|
|
8687
8689
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-at.md
|
|
8689
8691
|
*/
|
|
8690
8692
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8691
8693
|
/**
|
|
8692
8694
|
* Prefer `await` over promise chaining.
|
|
8693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-await.md
|
|
8694
8696
|
*/
|
|
8695
8697
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8696
8698
|
/**
|
|
8697
8699
|
* Prefer `BigInt` literals over the constructor.
|
|
8698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-bigint-literals.md
|
|
8699
8701
|
*/
|
|
8700
8702
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8701
8703
|
/**
|
|
8702
8704
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8704
8706
|
*/
|
|
8705
8707
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8706
8708
|
/**
|
|
8707
8709
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8709
8711
|
*/
|
|
8710
8712
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8711
8713
|
/**
|
|
8712
8714
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-boolean-return.md
|
|
8714
8716
|
*/
|
|
8715
8717
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8716
8718
|
/**
|
|
8717
8719
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-class-fields.md
|
|
8719
8721
|
*/
|
|
8720
8722
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8721
8723
|
/**
|
|
8722
8724
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8724
8726
|
*/
|
|
8725
8727
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8726
8728
|
/**
|
|
8727
8729
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-code-point.md
|
|
8729
8731
|
*/
|
|
8730
8732
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8731
8733
|
/**
|
|
8732
8734
|
* Prefer combining consecutive guards with identical exit statements.
|
|
8733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-combined-guards.md
|
|
8734
8736
|
*/
|
|
8735
8737
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
8736
8738
|
/**
|
|
8737
8739
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
8738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-continue.md
|
|
8739
8741
|
*/
|
|
8740
8742
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8741
8743
|
/**
|
|
8742
8744
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-date-now.md
|
|
8744
8746
|
*/
|
|
8745
8747
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8746
8748
|
/**
|
|
8747
8749
|
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
8748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-default-parameters.md
|
|
8749
8751
|
*/
|
|
8750
8752
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<UnicornPreferDefaultParameters>;
|
|
8751
8753
|
/**
|
|
8752
8754
|
* Prefer direct iteration over default iterator method calls.
|
|
8753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-direct-iteration.md
|
|
8754
8756
|
*/
|
|
8755
8757
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8756
8758
|
/**
|
|
8757
8759
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dispose.md
|
|
8759
8761
|
*/
|
|
8760
8762
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8761
8763
|
/**
|
|
8762
8764
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-append.md
|
|
8764
8766
|
*/
|
|
8765
8767
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8766
8768
|
/**
|
|
8767
8769
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8769
8771
|
* @deprecated
|
|
8770
8772
|
*/
|
|
8771
8773
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8772
8774
|
/**
|
|
8773
8775
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8775
8777
|
*/
|
|
8776
8778
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8777
8779
|
/**
|
|
8778
8780
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8780
8782
|
*/
|
|
8781
8783
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8782
8784
|
/**
|
|
8783
8785
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
8784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8785
8787
|
*/
|
|
8786
8788
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8787
8789
|
/**
|
|
8788
8790
|
* Prefer `.textContent` over `.innerText`.
|
|
8789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8790
8792
|
*/
|
|
8791
8793
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8792
8794
|
/**
|
|
8793
8795
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
8794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-early-return.md
|
|
8795
8797
|
*/
|
|
8796
8798
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8797
8799
|
/**
|
|
8798
8800
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-else-if.md
|
|
8800
8802
|
*/
|
|
8801
8803
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8802
8804
|
/**
|
|
8803
8805
|
* Prefer `Error.isError()` when checking for errors.
|
|
8804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-error-is-error.md
|
|
8805
8807
|
*/
|
|
8806
8808
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8807
8809
|
/**
|
|
8808
8810
|
* Prefer escape sequences for irregular whitespace characters.
|
|
8809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
8810
8812
|
*/
|
|
8811
8813
|
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
8812
8814
|
/**
|
|
8813
8815
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-event-target.md
|
|
8815
8817
|
*/
|
|
8816
8818
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8817
8819
|
/**
|
|
8818
8820
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
8819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
8820
8822
|
* @deprecated
|
|
8821
8823
|
*/
|
|
8822
8824
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
8823
8825
|
/**
|
|
8824
8826
|
* Prefer `export…from` when re-exporting.
|
|
8825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-export-from.md
|
|
8826
8828
|
*/
|
|
8827
8829
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8828
8830
|
/**
|
|
8829
8831
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8831
8833
|
*/
|
|
8832
8834
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8833
8835
|
/**
|
|
8834
8836
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8836
8838
|
*/
|
|
8837
8839
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8838
8840
|
/**
|
|
8839
8841
|
* Prefer global numeric constants over `Number` static properties.
|
|
8840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-number-constants.md
|
|
8841
8843
|
*/
|
|
8842
8844
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8843
8845
|
/**
|
|
8844
8846
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-this.md
|
|
8846
8848
|
*/
|
|
8847
8849
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8848
8850
|
/**
|
|
8849
8851
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
8850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-group-by.md
|
|
8851
8853
|
*/
|
|
8852
8854
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8853
8855
|
/**
|
|
8854
8856
|
* Prefer `.has()` when checking existence.
|
|
8855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-has-check.md
|
|
8856
8858
|
*/
|
|
8857
8859
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8858
8860
|
/**
|
|
8859
8861
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8861
8863
|
*/
|
|
8862
8864
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8863
8865
|
/**
|
|
8864
8866
|
* Prefer HTTPS over HTTP.
|
|
8865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-https.md
|
|
8866
8868
|
*/
|
|
8867
8869
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8868
8870
|
/**
|
|
8869
8871
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8871
8873
|
*/
|
|
8872
8874
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8873
8875
|
/**
|
|
8874
8876
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8876
8878
|
*/
|
|
8877
8879
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8878
8880
|
/**
|
|
8879
8881
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes.md
|
|
8881
8883
|
*/
|
|
8882
8884
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8883
8885
|
/**
|
|
8884
8886
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8886
8888
|
*/
|
|
8887
8889
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8888
8890
|
/**
|
|
8889
8891
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8891
8893
|
*/
|
|
8892
8894
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8893
8895
|
/**
|
|
8894
8896
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-concat.md
|
|
8896
8898
|
*/
|
|
8897
8899
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8898
8900
|
/**
|
|
8899
8901
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8901
8903
|
*/
|
|
8902
8904
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8903
8905
|
/**
|
|
8904
8906
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8906
8908
|
*/
|
|
8907
8909
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8908
8910
|
/**
|
|
8909
8911
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8911
8913
|
*/
|
|
8912
8914
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8913
8915
|
/**
|
|
8914
8916
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
8915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-zip.md
|
|
8916
8918
|
*/
|
|
8917
8919
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
8918
8920
|
/**
|
|
8919
8921
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
8920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-json-import.md
|
|
8921
8923
|
*/
|
|
8922
8924
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
8923
8925
|
/**
|
|
8924
8926
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8926
8928
|
* @deprecated
|
|
8927
8929
|
*/
|
|
8928
8930
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8929
8931
|
/**
|
|
8930
8932
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8932
8934
|
*/
|
|
8933
8935
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8934
8936
|
/**
|
|
8935
8937
|
* Prefer literal printable ASCII characters over escape sequences.
|
|
8936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-literal-ascii.md
|
|
8937
8939
|
*/
|
|
8938
8940
|
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
8939
8941
|
/**
|
|
8940
8942
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-location-assign.md
|
|
8942
8944
|
*/
|
|
8943
8945
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8944
8946
|
/**
|
|
8945
8947
|
* Prefer using a logical operator over a ternary.
|
|
8946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8947
8949
|
*/
|
|
8948
8950
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8949
8951
|
/**
|
|
8950
8952
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-map-from-entries.md
|
|
8952
8954
|
*/
|
|
8953
8955
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8954
8956
|
/**
|
|
8955
8957
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-abs.md
|
|
8957
8959
|
*/
|
|
8958
8960
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8959
8961
|
/**
|
|
8960
8962
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-constants.md
|
|
8962
8964
|
*/
|
|
8963
8965
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8964
8966
|
/**
|
|
8965
8967
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-min-max.md
|
|
8967
8969
|
*/
|
|
8968
8970
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8969
8971
|
/**
|
|
8970
8972
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-trunc.md
|
|
8972
8974
|
*/
|
|
8973
8975
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8974
8976
|
/**
|
|
8975
8977
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
8976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
8977
8979
|
* @deprecated
|
|
8978
8980
|
*/
|
|
8979
8981
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
8980
8982
|
/**
|
|
8981
8983
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8983
8985
|
*/
|
|
8984
8986
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8985
8987
|
/**
|
|
8986
8988
|
* Prefer modern DOM APIs.
|
|
8987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8988
8990
|
*/
|
|
8989
8991
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8990
8992
|
/**
|
|
8991
8993
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8993
8995
|
*/
|
|
8994
8996
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8995
8997
|
/**
|
|
8996
8998
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-module.md
|
|
8998
9000
|
*/
|
|
8999
9001
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
9000
9002
|
/**
|
|
9001
9003
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
9002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
9003
9005
|
*/
|
|
9004
9006
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
9005
9007
|
/**
|
|
9006
9008
|
* Prefer negative index over `.length - index` when possible.
|
|
9007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-negative-index.md
|
|
9008
9010
|
*/
|
|
9009
9011
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
9010
9012
|
/**
|
|
9011
9013
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
9012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-node-protocol.md
|
|
9013
9015
|
*/
|
|
9014
9016
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
9015
9017
|
/**
|
|
9016
9018
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
9017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-coercion.md
|
|
9018
9020
|
*/
|
|
9019
9021
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
9020
9022
|
/**
|
|
9021
9023
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
9022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
9023
9025
|
*/
|
|
9024
9026
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
9025
9027
|
/**
|
|
9026
9028
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
9027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-properties.md
|
|
9028
9030
|
*/
|
|
9029
9031
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
9030
9032
|
/**
|
|
9031
9033
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
9032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-define-properties.md
|
|
9033
9035
|
*/
|
|
9034
9036
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
9035
9037
|
/**
|
|
9036
9038
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
9037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
9038
9040
|
*/
|
|
9039
9041
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
9040
9042
|
/**
|
|
9041
9043
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
9042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-from-entries.md
|
|
9043
9045
|
*/
|
|
9044
9046
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
9045
9047
|
/**
|
|
9046
9048
|
* Prefer the most specific `Object` iterable method.
|
|
9047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
9048
9050
|
*/
|
|
9049
9051
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
9050
9052
|
/**
|
|
9051
9053
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
9052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-observer-apis.md
|
|
9053
9055
|
*/
|
|
9054
9056
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
9055
9057
|
/**
|
|
9056
9058
|
* Prefer omitting the `catch` binding parameter.
|
|
9057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
9058
9060
|
*/
|
|
9059
9061
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
9060
9062
|
/**
|
|
9061
9063
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
9062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-path2d.md
|
|
9063
9065
|
*/
|
|
9064
9066
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
9065
9067
|
/**
|
|
9066
9068
|
* Prefer private class fields over the underscore-prefix convention.
|
|
9067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-private-class-fields.md
|
|
9068
9070
|
*/
|
|
9069
9071
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
9070
9072
|
/**
|
|
9071
9073
|
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
9072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-static-methods.md
|
|
9073
9075
|
*/
|
|
9074
9076
|
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
9075
9077
|
/**
|
|
9076
9078
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
9077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-try.md
|
|
9078
9080
|
*/
|
|
9079
9081
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
9080
9082
|
/**
|
|
9081
9083
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
9082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
9083
9085
|
*/
|
|
9084
9086
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
9085
9087
|
/**
|
|
9086
9088
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
9087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-prototype-methods.md
|
|
9088
9090
|
*/
|
|
9089
9091
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
9090
9092
|
/**
|
|
9091
9093
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
9092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-query-selector.md
|
|
9093
9095
|
*/
|
|
9094
9096
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
9095
9097
|
/**
|
|
9096
9098
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
9097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-queue-microtask.md
|
|
9098
9100
|
*/
|
|
9099
9101
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
9100
9102
|
/**
|
|
9101
9103
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
9102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-reflect-apply.md
|
|
9103
9105
|
*/
|
|
9104
9106
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
9105
9107
|
/**
|
|
9106
9108
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
9107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-escape.md
|
|
9108
9110
|
*/
|
|
9109
9111
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
9110
9112
|
/**
|
|
9111
9113
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
9112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-test.md
|
|
9113
9115
|
*/
|
|
9114
9116
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
9115
9117
|
/**
|
|
9116
9118
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
9117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-response-static-json.md
|
|
9118
9120
|
*/
|
|
9119
9121
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
9120
9122
|
/**
|
|
9121
9123
|
* Prefer `:scope` when using element query selector methods.
|
|
9122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-scoped-selector.md
|
|
9123
9125
|
*/
|
|
9124
9126
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
9125
9127
|
/**
|
|
9126
9128
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
9127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-has.md
|
|
9128
9130
|
*/
|
|
9129
9131
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
9130
9132
|
/**
|
|
9131
9133
|
* Prefer `Set` methods for Set operations.
|
|
9132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-methods.md
|
|
9133
9135
|
*/
|
|
9134
9136
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
9135
9137
|
/**
|
|
9136
9138
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
9137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-size.md
|
|
9138
9140
|
*/
|
|
9139
9141
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
9140
9142
|
/**
|
|
9141
9143
|
* Prefer arrow function properties over methods with a single return.
|
|
9142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-arrow-method.md
|
|
9143
9145
|
*/
|
|
9144
9146
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
9145
9147
|
/**
|
|
9146
9148
|
* Prefer shorter alternatives to Unicode escape sequences.
|
|
9147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
9148
9150
|
*/
|
|
9149
9151
|
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
9150
9152
|
/**
|
|
9151
9153
|
* Prefer simple conditions first in logical expressions.
|
|
9152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-condition-first.md
|
|
9153
9155
|
*/
|
|
9154
9156
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
9155
9157
|
/**
|
|
9156
9158
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
9157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
9158
9160
|
*/
|
|
9159
9161
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9160
9162
|
/**
|
|
9161
9163
|
* Prefer simplified conditions.
|
|
9162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simplified-conditions.md
|
|
9163
9165
|
*/
|
|
9164
9166
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
9165
9167
|
/**
|
|
9166
9168
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
9167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-array-predicate.md
|
|
9168
9170
|
*/
|
|
9169
9171
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9170
9172
|
/**
|
|
9171
9173
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
9172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-call.md
|
|
9173
9175
|
*/
|
|
9174
9176
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
9175
9177
|
/**
|
|
9176
9178
|
* Prefer a single object destructuring declaration per local const source.
|
|
9177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
9178
9180
|
*/
|
|
9179
9181
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
9180
9182
|
/**
|
|
9181
9183
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
9182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-replace.md
|
|
9183
9185
|
*/
|
|
9184
9186
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
9185
9187
|
/**
|
|
9186
|
-
* Prefer declaring variables in the smallest possible scope.
|
|
9187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9188
|
+
* Prefer declaring variables and type aliases in the smallest possible scope.
|
|
9189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-smaller-scope.md
|
|
9188
9190
|
*/
|
|
9189
9191
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
9190
9192
|
/**
|
|
9191
9193
|
* Prefer `String#split()` with a limit.
|
|
9192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-split-limit.md
|
|
9193
9195
|
*/
|
|
9194
9196
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
9195
9197
|
/**
|
|
9196
9198
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
9197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-spread.md
|
|
9198
9200
|
*/
|
|
9199
9201
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
9200
9202
|
/**
|
|
9201
9203
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
9202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-match-all.md
|
|
9203
9205
|
*/
|
|
9204
9206
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
9205
9207
|
/**
|
|
9206
9208
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
9207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
9208
9210
|
*/
|
|
9209
9211
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
9210
9212
|
/**
|
|
9211
9213
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
9212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-raw.md
|
|
9213
9215
|
*/
|
|
9214
9216
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
9215
9217
|
/**
|
|
9216
9218
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
9217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-repeat.md
|
|
9218
9220
|
*/
|
|
9219
9221
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
9220
9222
|
/**
|
|
9221
9223
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
9222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-replace-all.md
|
|
9223
9225
|
*/
|
|
9224
9226
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
9225
9227
|
/**
|
|
9226
9228
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
9227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-slice.md
|
|
9228
9230
|
*/
|
|
9229
9231
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
9230
9232
|
/**
|
|
9231
9233
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
9232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
9233
9235
|
*/
|
|
9234
9236
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
9235
9237
|
/**
|
|
9236
9238
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
9237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
9238
9240
|
*/
|
|
9239
9241
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
9240
9242
|
/**
|
|
9241
9243
|
* Prefer using `structuredClone` to create a deep clone.
|
|
9242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-structured-clone.md
|
|
9243
9245
|
*/
|
|
9244
9246
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
9245
9247
|
/**
|
|
9246
9248
|
* Prefer `switch` over multiple `else-if`.
|
|
9247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-switch.md
|
|
9248
9250
|
*/
|
|
9249
9251
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
9250
9252
|
/**
|
|
9251
9253
|
* Prefer `Temporal` over `Date`.
|
|
9252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal.md
|
|
9253
9255
|
*/
|
|
9254
9256
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
9255
9257
|
/**
|
|
9256
9258
|
* Prefer direct Temporal conversion methods.
|
|
9257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal-conversion.md
|
|
9258
9260
|
*/
|
|
9259
9261
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
9260
9262
|
/**
|
|
9261
9263
|
* Prefer ternary expressions over simple `if` statements.
|
|
9262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-ternary.md
|
|
9263
9265
|
*/
|
|
9264
9266
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
9265
9267
|
/**
|
|
9266
9268
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
9267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-then-catch.md
|
|
9268
9270
|
*/
|
|
9269
9271
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
9270
9272
|
/**
|
|
9271
9273
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
9272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-toggle-attribute.md
|
|
9273
9275
|
*/
|
|
9274
9276
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
9275
9277
|
/**
|
|
9276
9278
|
* Prefer top-level await over top-level promises and async function calls.
|
|
9277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-top-level-await.md
|
|
9278
9280
|
*/
|
|
9279
9281
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
9280
9282
|
/**
|
|
9281
9283
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
9282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-error.md
|
|
9283
9285
|
*/
|
|
9284
9286
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
9285
9287
|
/**
|
|
9286
9288
|
* Require type literals to be last in union types.
|
|
9287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-literal-last.md
|
|
9288
9290
|
*/
|
|
9289
9291
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
9290
9292
|
/**
|
|
9291
9293
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
9292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-base64.md
|
|
9293
9295
|
*/
|
|
9294
9296
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
9295
9297
|
/**
|
|
9296
9298
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
9297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-hex.md
|
|
9298
9300
|
*/
|
|
9299
9301
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
9300
9302
|
/**
|
|
9301
9303
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
9302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unary-minus.md
|
|
9303
9305
|
*/
|
|
9304
9306
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
9305
9307
|
/**
|
|
9306
9308
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
9307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
9308
9310
|
*/
|
|
9309
9311
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
9310
9312
|
/**
|
|
9311
9313
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
9312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-can-parse.md
|
|
9313
9315
|
*/
|
|
9314
9316
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
9315
9317
|
/**
|
|
9316
9318
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
9317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-href.md
|
|
9318
9320
|
*/
|
|
9319
9321
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
9320
9322
|
/**
|
|
9321
9323
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
9322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-search-parameters.md
|
|
9323
9325
|
*/
|
|
9324
9326
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
9325
9327
|
/**
|
|
9326
9328
|
* Prefer putting the condition in the while statement.
|
|
9327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-while-loop-condition.md
|
|
9328
9330
|
*/
|
|
9329
9331
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
9330
9332
|
/**
|
|
9331
9333
|
* Renamed to `unicorn/name-replacements`.
|
|
9332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
9333
9335
|
* @deprecated
|
|
9334
9336
|
*/
|
|
9335
9337
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
9336
9338
|
/**
|
|
9337
9339
|
* Enforce consistent relative URL style.
|
|
9338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/relative-url-style.md
|
|
9339
9341
|
*/
|
|
9340
9342
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
9341
9343
|
/**
|
|
9342
9344
|
* Enforce using the separator argument with `Array#join()`.
|
|
9343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-join-separator.md
|
|
9344
9346
|
*/
|
|
9345
9347
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
9346
9348
|
/**
|
|
9347
9349
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
9348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-sort-compare.md
|
|
9349
9351
|
*/
|
|
9350
9352
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
9351
9353
|
/**
|
|
9352
9354
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
9353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-css-escape.md
|
|
9354
9356
|
*/
|
|
9355
9357
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
9356
9358
|
/**
|
|
9357
9359
|
* Require configured YAML frontmatter fields.
|
|
9358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-frontmatter-fields.md
|
|
9359
9361
|
*/
|
|
9360
9362
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
9361
9363
|
/**
|
|
9362
9364
|
* Require non-empty module attributes for imports and exports
|
|
9363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-attributes.md
|
|
9364
9366
|
*/
|
|
9365
9367
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
9366
9368
|
/**
|
|
9367
9369
|
* Require non-empty specifier list in import and export statements.
|
|
9368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-specifiers.md
|
|
9369
9371
|
*/
|
|
9370
9372
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9371
9373
|
/**
|
|
9372
9374
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9374
9376
|
*/
|
|
9375
9377
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9376
9378
|
/**
|
|
9377
9379
|
* Require passive event listeners for high-frequency events.
|
|
9378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-passive-events.md
|
|
9379
9381
|
*/
|
|
9380
9382
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9381
9383
|
/**
|
|
9382
9384
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-post-message-target-origin.md
|
|
9384
9386
|
*/
|
|
9385
9387
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9386
9388
|
/**
|
|
9387
9389
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9389
9391
|
*/
|
|
9390
9392
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9391
9393
|
/**
|
|
9392
9394
|
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
9393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-text-decoder-streaming.md
|
|
9394
9396
|
*/
|
|
9395
9397
|
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
9396
9398
|
/**
|
|
9397
9399
|
* Enforce a consistent style for single-line block comments.
|
|
9398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/single-line-block-comment-style.md
|
|
9399
9401
|
*/
|
|
9400
9402
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
9401
9403
|
/**
|
|
9402
9404
|
* Enforce better string content.
|
|
9403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/string-content.md
|
|
9404
9406
|
*/
|
|
9405
9407
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9406
9408
|
/**
|
|
9407
9409
|
* Enforce consistent brace style for `case` clauses.
|
|
9408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-braces.md
|
|
9409
9411
|
*/
|
|
9410
9412
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9411
9413
|
/**
|
|
9412
9414
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-break-position.md
|
|
9414
9416
|
*/
|
|
9415
9417
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9416
9418
|
/**
|
|
9417
9419
|
* Fix whitespace-insensitive template indentation.
|
|
9418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/template-indent.md
|
|
9419
9421
|
*/
|
|
9420
9422
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9421
9423
|
/**
|
|
9422
9424
|
* Enforce consistent case for text encoding identifiers.
|
|
9423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9424
9426
|
*/
|
|
9425
9427
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9426
9428
|
/**
|
|
9427
9429
|
* Require `new` when creating an error.
|
|
9428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/throw-new-error.md
|
|
9429
9431
|
*/
|
|
9430
9432
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9431
9433
|
/**
|
|
9432
9434
|
* Limit the complexity of `try` blocks.
|
|
9433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/try-complexity.md
|
|
9434
9436
|
*/
|
|
9435
9437
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9436
9438
|
/**
|
|
@@ -10294,6 +10296,13 @@ type AntfuIndentUnindent = [] | [{
|
|
|
10294
10296
|
indent?: number;
|
|
10295
10297
|
tags?: string[];
|
|
10296
10298
|
}];
|
|
10299
|
+
// ----- antfu/reasonable-newline -----
|
|
10300
|
+
type AntfuReasonableNewline = [] | [{
|
|
10301
|
+
minObjectProperties?: number;
|
|
10302
|
+
objectLineLength?: number;
|
|
10303
|
+
minArrayItems?: number;
|
|
10304
|
+
arrayLineLength?: number;
|
|
10305
|
+
}];
|
|
10297
10306
|
// ----- array-bracket-newline -----
|
|
10298
10307
|
type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
10299
10308
|
multiline?: boolean;
|
|
@@ -16543,6 +16552,9 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
16543
16552
|
}];
|
|
16544
16553
|
// ----- unicorn/comment-content -----
|
|
16545
16554
|
type UnicornCommentContent = [] | [{
|
|
16555
|
+
ignore?: (string | {
|
|
16556
|
+
[k: string]: unknown | undefined;
|
|
16557
|
+
})[];
|
|
16546
16558
|
checkUniformCase?: boolean;
|
|
16547
16559
|
extendDefaultReplacements?: boolean;
|
|
16548
16560
|
replacements?: {
|
|
@@ -16815,6 +16827,7 @@ type UnicornNoNull = [] | [{
|
|
|
16815
16827
|
}];
|
|
16816
16828
|
// ----- unicorn/no-top-level-side-effects -----
|
|
16817
16829
|
type UnicornNoTopLevelSideEffects = [] | [{
|
|
16830
|
+
checkUnknownCalls?: boolean;
|
|
16818
16831
|
allow?: {
|
|
16819
16832
|
[k: string]: string[] | undefined;
|
|
16820
16833
|
};
|
|
@@ -17448,8 +17461,6 @@ type ZodSchemaErrorPropertyStyle = [] | [{
|
|
|
17448
17461
|
}];
|
|
17449
17462
|
// Names of all the configs
|
|
17450
17463
|
type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:depend' | '2digits:drizzle' | '2digits:github-actions/setup' | '2digits:github-actions/recommended' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:markdown/setup' | '2digits:markdown/processor' | '2digits:markdown/parser' | '2digits:markdown/rules' | '2digits:markdown/disables' | '2digits:next/setup' | '2digits:next/rules' | '2digits:next/proxy' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack-query' | '2digits:tanstack-router' | '2digits:toml' | '2digits:toml:mise' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:vitest/setup' | '2digits:vitest/rules' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/prettier' | '2digits:zod';
|
|
17451
|
-
//#endregion
|
|
17452
|
-
//#region src/types.d.ts
|
|
17453
17464
|
type Rules = RuleOptions;
|
|
17454
17465
|
interface TypedFlatConfigItem extends Omit<FlatConfig.Config, 'plugins' | 'languageOptions' | 'rules'> {
|
|
17455
17466
|
/**
|
|
@@ -17554,8 +17565,6 @@ interface OptionsCss extends OptionsOverrides {
|
|
|
17554
17565
|
*/
|
|
17555
17566
|
customSyntax?: unknown;
|
|
17556
17567
|
}
|
|
17557
|
-
//#endregion
|
|
17558
|
-
//#region src/factory.d.ts
|
|
17559
17568
|
type SharedOptions<T = unknown> = T & {
|
|
17560
17569
|
enable?: boolean;
|
|
17561
17570
|
};
|
|
@@ -17579,5 +17588,4 @@ interface ESLint2DigitsOptions {
|
|
|
17579
17588
|
zod?: SharedOptions | boolean;
|
|
17580
17589
|
}
|
|
17581
17590
|
export declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: Array<TypedFlatConfigItem>): Promise<Array<TypedFlatConfigItem>>;
|
|
17582
|
-
//#endregion
|
|
17583
17591
|
export { type ConfigNames, type OptionsCss, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithDrizzle, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type OptionsWithTailwind, type OptionsWithVitest, type Rules, type TypedFlatConfigItem, twoDigits as default };
|