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