@lichthagel/eslint-config 1.0.39 → 1.0.40
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.cts +383 -324
- package/dist/index.d.mts +383 -324
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1891,7 +1891,7 @@ interface RuleOptions {
|
|
|
1891
1891
|
* Disallow expressions where the operation doesn't affect the value
|
|
1892
1892
|
* @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
1893
1893
|
*/
|
|
1894
|
-
'no-constant-binary-expression'?: Linter.RuleEntry<
|
|
1894
|
+
'no-constant-binary-expression'?: Linter.RuleEntry<NoConstantBinaryExpression>;
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Disallow constant expressions in conditions
|
|
1897
1897
|
* @see https://eslint.org/docs/latest/rules/no-constant-condition
|
|
@@ -3183,6 +3183,11 @@ interface RuleOptions {
|
|
|
3183
3183
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-add-event-listener/
|
|
3184
3184
|
*/
|
|
3185
3185
|
'svelte/no-add-event-listener'?: Linter.RuleEntry<[]>;
|
|
3186
|
+
/**
|
|
3187
|
+
* disallow the use of `{@const}` in favor of `{const ...}` declaration tags
|
|
3188
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-const-tags/
|
|
3189
|
+
*/
|
|
3190
|
+
'svelte/no-at-const-tags'?: Linter.RuleEntry<[]>;
|
|
3186
3191
|
/**
|
|
3187
3192
|
* disallow the use of `{@debug}`
|
|
3188
3193
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/
|
|
@@ -3492,7 +3497,7 @@ interface RuleOptions {
|
|
|
3492
3497
|
*/
|
|
3493
3498
|
'svelte/valid-each-key'?: Linter.RuleEntry<[]>;
|
|
3494
3499
|
/**
|
|
3495
|
-
* disallow props
|
|
3500
|
+
* disallow invalid props in SvelteKit route components.
|
|
3496
3501
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
|
|
3497
3502
|
*/
|
|
3498
3503
|
'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>;
|
|
@@ -3566,1620 +3571,1670 @@ interface RuleOptions {
|
|
|
3566
3571
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
3567
3572
|
/**
|
|
3568
3573
|
* Prefer better DOM traversal APIs.
|
|
3569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/better-dom-traversing.md
|
|
3570
3575
|
*/
|
|
3571
3576
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
3572
3577
|
/**
|
|
3573
3578
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
3574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
3575
3580
|
* @deprecated
|
|
3576
3581
|
*/
|
|
3577
3582
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
3578
3583
|
/**
|
|
3579
3584
|
* Enforce a specific parameter name in catch clauses.
|
|
3580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/catch-error-name.md
|
|
3581
3586
|
*/
|
|
3582
3587
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
3583
3588
|
/**
|
|
3584
3589
|
* Enforce consistent class references in static methods.
|
|
3585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/class-reference-in-static-methods.md
|
|
3586
3591
|
*/
|
|
3587
3592
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
3588
3593
|
/**
|
|
3589
3594
|
* Enforce better comment content.
|
|
3590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/comment-content.md
|
|
3591
3596
|
*/
|
|
3592
3597
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
3593
3598
|
/**
|
|
3594
3599
|
* Enforce consistent assertion style with `node:assert`.
|
|
3595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-assert.md
|
|
3596
3601
|
*/
|
|
3597
3602
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
3598
3603
|
/**
|
|
3599
3604
|
* Enforce consistent naming for boolean names.
|
|
3600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-boolean-name.md
|
|
3601
3606
|
*/
|
|
3602
3607
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
3603
3608
|
/**
|
|
3604
3609
|
* Enforce consistent class member order.
|
|
3605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-class-member-order.md
|
|
3606
3611
|
*/
|
|
3607
3612
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
3608
3613
|
/**
|
|
3609
3614
|
* Enforce consistent spelling of compound words in identifiers.
|
|
3610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-compound-words.md
|
|
3611
3616
|
*/
|
|
3612
3617
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
3613
3618
|
/**
|
|
3614
3619
|
* Enforce consistent conditional object spread style.
|
|
3615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
3616
3621
|
*/
|
|
3617
3622
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
3618
3623
|
/**
|
|
3619
3624
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-date-clone.md
|
|
3621
3626
|
*/
|
|
3622
3627
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
3623
3628
|
/**
|
|
3624
3629
|
* Use destructured variables over properties.
|
|
3625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-destructuring.md
|
|
3626
3631
|
*/
|
|
3627
3632
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
3628
3633
|
/**
|
|
3629
3634
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-empty-array-spread.md
|
|
3631
3636
|
*/
|
|
3632
3637
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
3633
3638
|
/**
|
|
3634
3639
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-existence-index-check.md
|
|
3636
3641
|
*/
|
|
3637
3642
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
3638
3643
|
/**
|
|
3639
3644
|
* Enforce consistent decorator position on exported classes.
|
|
3640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-export-decorator-position.md
|
|
3641
3646
|
*/
|
|
3642
3647
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
3643
3648
|
/**
|
|
3644
3649
|
* Move function definitions to the highest possible scope.
|
|
3645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-function-scoping.md
|
|
3646
3651
|
*/
|
|
3647
3652
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
3648
3653
|
/**
|
|
3649
3654
|
* Enforce function syntax by role.
|
|
3650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-function-style.md
|
|
3651
3656
|
*/
|
|
3652
3657
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
3653
3658
|
/**
|
|
3654
3659
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
3655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-json-file-read.md
|
|
3656
3661
|
*/
|
|
3657
3662
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
3658
3663
|
/**
|
|
3659
3664
|
* Enforce consistent optional chaining for same-base member access.
|
|
3660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-optional-chaining.md
|
|
3661
3666
|
*/
|
|
3662
3667
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
3663
3668
|
/**
|
|
3664
3669
|
* Enforce consistent style for escaping `${` in template literals.
|
|
3665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-template-literal-escape.md
|
|
3666
3671
|
*/
|
|
3667
3672
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
3668
3673
|
/**
|
|
3669
3674
|
* Enforce consistent labels on tuple type elements.
|
|
3670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-tuple-labels.md
|
|
3671
3676
|
*/
|
|
3672
3677
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
3673
3678
|
/**
|
|
3674
3679
|
* Enforce correct `Error` subclassing.
|
|
3675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/custom-error-definition.md
|
|
3676
3681
|
*/
|
|
3677
3682
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
3678
3683
|
/**
|
|
3679
3684
|
* Enforce consistent default export declarations.
|
|
3680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/default-export-style.md
|
|
3681
3686
|
*/
|
|
3682
3687
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
3683
3688
|
/**
|
|
3684
3689
|
* Enforce consistent style for DOM element dataset access.
|
|
3685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/dom-node-dataset.md
|
|
3686
3691
|
*/
|
|
3687
3692
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
3688
3693
|
/**
|
|
3689
3694
|
* Enforce no spaces between braces.
|
|
3690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/empty-brace-spaces.md
|
|
3691
3696
|
*/
|
|
3692
3697
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
3693
3698
|
/**
|
|
3694
3699
|
* Enforce passing a `message` value when creating a built-in error.
|
|
3695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/error-message.md
|
|
3696
3701
|
*/
|
|
3697
3702
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
3698
3703
|
/**
|
|
3699
3704
|
* Require escape sequences to use uppercase or lowercase values.
|
|
3700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/escape-case.md
|
|
3701
3706
|
*/
|
|
3702
3707
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
3703
3708
|
/**
|
|
3704
3709
|
* Add expiration conditions to TODO comments.
|
|
3705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/expiring-todo-comments.md
|
|
3706
3711
|
*/
|
|
3707
3712
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
3708
3713
|
/**
|
|
3709
3714
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/explicit-length-check.md
|
|
3711
3716
|
*/
|
|
3712
3717
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
3713
3718
|
/**
|
|
3714
3719
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
3715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/explicit-timer-delay.md
|
|
3716
3721
|
*/
|
|
3717
3722
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
3718
3723
|
/**
|
|
3719
3724
|
* Enforce a case style for filenames and directory names.
|
|
3720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/filename-case.md
|
|
3721
3726
|
*/
|
|
3722
3727
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
3723
3728
|
/**
|
|
3724
3729
|
* Require identifiers to match a specified regular expression.
|
|
3725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/id-match.md
|
|
3726
3731
|
*/
|
|
3727
3732
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
3728
3733
|
/**
|
|
3729
3734
|
* Enforce specific import styles per module.
|
|
3730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/import-style.md
|
|
3731
3736
|
*/
|
|
3732
3737
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
3733
3738
|
/**
|
|
3734
3739
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
3735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/isolated-functions.md
|
|
3736
3741
|
*/
|
|
3737
3742
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
3738
3743
|
/**
|
|
3739
3744
|
* Require or disallow logical assignment operator shorthand
|
|
3740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/logical-assignment-operators.md
|
|
3741
3746
|
*/
|
|
3742
3747
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
3743
3748
|
/**
|
|
3744
3749
|
* Limit the depth of nested calls.
|
|
3745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/max-nested-calls.md
|
|
3746
3751
|
*/
|
|
3747
3752
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
3748
3753
|
/**
|
|
3749
3754
|
* Enforce replacements for variable, property, and filenames.
|
|
3750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/name-replacements.md
|
|
3751
3756
|
*/
|
|
3752
3757
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
3753
3758
|
/**
|
|
3754
3759
|
* Enforce correct use of `new` for builtin constructors.
|
|
3755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/new-for-builtins.md
|
|
3756
3761
|
*/
|
|
3757
3762
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
3758
3763
|
/**
|
|
3759
3764
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
3761
3766
|
*/
|
|
3762
3767
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
3763
3768
|
/**
|
|
3764
3769
|
* Disallow recursive access to `this` within getters and setters.
|
|
3765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-accessor-recursion.md
|
|
3766
3771
|
*/
|
|
3767
3772
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
3768
3773
|
/**
|
|
3769
3774
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
3770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
3771
3776
|
*/
|
|
3772
3777
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
3773
3778
|
/**
|
|
3774
3779
|
* Disallow anonymous functions and classes as the default export.
|
|
3775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-anonymous-default-export.md
|
|
3776
3781
|
*/
|
|
3777
3782
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
3778
3783
|
/**
|
|
3779
3784
|
* Prevent passing a function reference directly to iterator methods.
|
|
3780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-callback-reference.md
|
|
3781
3786
|
*/
|
|
3782
3787
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
3783
3788
|
/**
|
|
3784
3789
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
3785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-concat-in-loop.md
|
|
3786
3791
|
*/
|
|
3787
3792
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
3788
3793
|
/**
|
|
3789
3794
|
* Disallow using reference values as `Array#fill()` values.
|
|
3790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
3791
3796
|
*/
|
|
3792
3797
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
3793
3798
|
/**
|
|
3794
3799
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
3795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-from-fill.md
|
|
3796
3801
|
*/
|
|
3797
3802
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
3798
3803
|
/**
|
|
3799
3804
|
* Disallow front-of-array mutation.
|
|
3800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-front-mutation.md
|
|
3801
3806
|
*/
|
|
3802
3807
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
3803
3808
|
/**
|
|
3804
3809
|
* Disallow using the `this` argument in array methods.
|
|
3805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-method-this-argument.md
|
|
3806
3811
|
*/
|
|
3807
3812
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
3808
3813
|
/**
|
|
3809
3814
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
3810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
3811
3816
|
* @deprecated
|
|
3812
3817
|
*/
|
|
3813
3818
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
3814
3819
|
/**
|
|
3815
3820
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
3816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-reduce.md
|
|
3817
3822
|
*/
|
|
3818
3823
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
3819
3824
|
/**
|
|
3820
3825
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
3821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-reverse.md
|
|
3822
3827
|
*/
|
|
3823
3828
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
3824
3829
|
/**
|
|
3825
3830
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
3826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-sort.md
|
|
3827
3832
|
*/
|
|
3828
3833
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
3829
3834
|
/**
|
|
3830
3835
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
3831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
3832
3837
|
*/
|
|
3833
3838
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
3834
3839
|
/**
|
|
3835
3840
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
3836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-splice.md
|
|
3837
3842
|
*/
|
|
3838
3843
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
3839
3844
|
/**
|
|
3840
3845
|
* Disallow asterisk prefixes in documentation comments.
|
|
3841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
3842
3847
|
*/
|
|
3843
3848
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
3849
|
+
/**
|
|
3850
|
+
* Disallow async functions as `Promise#finally()` callbacks.
|
|
3851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-async-promise-finally.md
|
|
3852
|
+
*/
|
|
3853
|
+
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
3844
3854
|
/**
|
|
3845
3855
|
* Disallow member access from await expression.
|
|
3846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-await-expression-member.md
|
|
3847
3857
|
*/
|
|
3848
3858
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
3849
3859
|
/**
|
|
3850
3860
|
* Disallow using `await` in `Promise` method parameters.
|
|
3851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-await-in-promise-methods.md
|
|
3852
3862
|
*/
|
|
3853
3863
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
3854
3864
|
/**
|
|
3855
3865
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
3856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-blob-to-file.md
|
|
3857
3867
|
*/
|
|
3858
3868
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
3859
3869
|
/**
|
|
3860
3870
|
* Disallow boolean-returning sort comparators.
|
|
3861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
3862
3872
|
*/
|
|
3863
3873
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
3864
3874
|
/**
|
|
3865
3875
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
3866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-break-in-nested-loop.md
|
|
3867
3877
|
*/
|
|
3868
3878
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
3869
3879
|
/**
|
|
3870
3880
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
3871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-canvas-to-image.md
|
|
3872
3882
|
*/
|
|
3873
3883
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
3874
3884
|
/**
|
|
3875
3885
|
* Disallow chained comparisons such as `a < b < c`.
|
|
3876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-chained-comparison.md
|
|
3877
3887
|
*/
|
|
3878
3888
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
3879
3889
|
/**
|
|
3880
3890
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
3881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-collection-bracket-access.md
|
|
3882
3892
|
*/
|
|
3883
3893
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
3884
3894
|
/**
|
|
3885
3895
|
* Disallow dynamic object property existence checks.
|
|
3886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-computed-property-existence-check.md
|
|
3887
3897
|
*/
|
|
3888
3898
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
3889
3899
|
/**
|
|
3890
3900
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
3891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-confusing-array-splice.md
|
|
3892
3902
|
*/
|
|
3893
3903
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
3894
3904
|
/**
|
|
3895
3905
|
* Disallow confusing uses of `Array#with()`.
|
|
3896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-confusing-array-with.md
|
|
3897
3907
|
*/
|
|
3898
3908
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
3899
3909
|
/**
|
|
3900
3910
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
3901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-console-spaces.md
|
|
3902
3912
|
*/
|
|
3903
3913
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
3904
3914
|
/**
|
|
3905
3915
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
3906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-constant-zero-expression.md
|
|
3907
3917
|
*/
|
|
3908
3918
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
3909
3919
|
/**
|
|
3910
3920
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
3911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
3912
3922
|
*/
|
|
3913
3923
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
3914
3924
|
/**
|
|
3915
3925
|
* Do not use `document.cookie` directly.
|
|
3916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-document-cookie.md
|
|
3917
3927
|
*/
|
|
3918
3928
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
3919
3929
|
/**
|
|
3920
3930
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
3921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-double-comparison.md
|
|
3922
3932
|
*/
|
|
3923
3933
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
3924
3934
|
/**
|
|
3925
3935
|
* Disallow duplicate adjacent branches in if chains.
|
|
3926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-if-branches.md
|
|
3927
3937
|
*/
|
|
3928
3938
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
3929
3939
|
/**
|
|
3930
3940
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
3931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
3932
3942
|
*/
|
|
3933
3943
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
3934
3944
|
/**
|
|
3935
3945
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
3936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-loops.md
|
|
3937
3947
|
*/
|
|
3938
3948
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
3939
3949
|
/**
|
|
3940
3950
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
3941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-set-values.md
|
|
3942
3952
|
*/
|
|
3943
3953
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
3944
3954
|
/**
|
|
3945
3955
|
* Disallow empty files.
|
|
3946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-empty-file.md
|
|
3947
3957
|
*/
|
|
3948
3958
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
3949
3959
|
/**
|
|
3950
3960
|
* Disallow assigning to built-in error properties.
|
|
3951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-error-property-assignment.md
|
|
3952
3962
|
*/
|
|
3953
3963
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
3954
3964
|
/**
|
|
3955
3965
|
* Disallow exports in scripts.
|
|
3956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-exports-in-scripts.md
|
|
3957
3967
|
*/
|
|
3958
3968
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
3959
3969
|
/**
|
|
3960
3970
|
* Prefer `for…of` over the `forEach` method.
|
|
3961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-for-each.md
|
|
3962
3972
|
*/
|
|
3963
3973
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
3964
3974
|
/**
|
|
3965
3975
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
3966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-for-loop.md
|
|
3967
3977
|
*/
|
|
3968
3978
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
3969
3979
|
/**
|
|
3970
3980
|
* Disallow assigning properties on the global object.
|
|
3971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-global-object-property-assignment.md
|
|
3972
3982
|
*/
|
|
3973
3983
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
3974
3984
|
/**
|
|
3975
3985
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
3976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
3977
3987
|
* @deprecated
|
|
3978
3988
|
*/
|
|
3979
3989
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
3980
3990
|
/**
|
|
3981
3991
|
* Disallow immediate mutation after variable assignment.
|
|
3982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-immediate-mutation.md
|
|
3983
3993
|
*/
|
|
3984
3994
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
3985
3995
|
/**
|
|
3986
3996
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
3987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-impossible-length-comparison.md
|
|
3988
3998
|
*/
|
|
3989
3999
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
3990
4000
|
/**
|
|
3991
4001
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
3992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-incorrect-query-selector.md
|
|
3993
4003
|
*/
|
|
3994
4004
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
3995
4005
|
/**
|
|
3996
4006
|
* Disallow incorrect template literal interpolation syntax.
|
|
3997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
3998
4008
|
*/
|
|
3999
4009
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
4000
4010
|
/**
|
|
4001
4011
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
4003
4013
|
* @deprecated
|
|
4004
4014
|
*/
|
|
4005
4015
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
4006
4016
|
/**
|
|
4007
4017
|
* Disallow `instanceof` with built-in objects
|
|
4008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-instanceof-builtins.md
|
|
4009
4019
|
*/
|
|
4010
4020
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4011
4021
|
/**
|
|
4012
4022
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
4013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-argument-count.md
|
|
4014
4024
|
*/
|
|
4015
4025
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
4016
4026
|
/**
|
|
4017
4027
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
4018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-character-comparison.md
|
|
4019
4029
|
*/
|
|
4020
4030
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
4021
4031
|
/**
|
|
4022
4032
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4024
4034
|
*/
|
|
4025
4035
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
4026
4036
|
/**
|
|
4027
4037
|
* Disallow invalid `accept` values on file inputs.
|
|
4028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
4029
4039
|
*/
|
|
4030
4040
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
4031
4041
|
/**
|
|
4032
4042
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4034
4044
|
*/
|
|
4035
4045
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
4036
4046
|
/**
|
|
4037
4047
|
* Disallow invalid implementations of well-known symbol methods.
|
|
4038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
4039
4049
|
*/
|
|
4040
4050
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
4041
4051
|
/**
|
|
4042
4052
|
* Disallow identifiers starting with `new` or `class`.
|
|
4043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-keyword-prefix.md
|
|
4044
4054
|
*/
|
|
4045
4055
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
4046
4056
|
/**
|
|
4047
4057
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
4048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-late-current-target-access.md
|
|
4049
4059
|
*/
|
|
4050
4060
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
4051
4061
|
/**
|
|
4052
4062
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
4053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-late-event-control.md
|
|
4054
4064
|
*/
|
|
4055
4065
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
4056
4066
|
/**
|
|
4057
4067
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
4058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
4059
4069
|
* @deprecated
|
|
4060
4070
|
*/
|
|
4061
4071
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
4062
4072
|
/**
|
|
4063
4073
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-lonely-if.md
|
|
4065
4075
|
*/
|
|
4066
4076
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
4067
4077
|
/**
|
|
4068
4078
|
* Disallow mutating a loop iterable during iteration.
|
|
4069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
4070
4080
|
*/
|
|
4071
4081
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
4072
4082
|
/**
|
|
4073
4083
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4075
4085
|
*/
|
|
4076
4086
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
4077
4087
|
/**
|
|
4078
4088
|
* Disallow manually wrapped comments.
|
|
4079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
4080
4090
|
*/
|
|
4081
4091
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
4082
4092
|
/**
|
|
4083
4093
|
* Disallow checking a Map key before accessing a different key.
|
|
4084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-mismatched-map-key.md
|
|
4085
4095
|
*/
|
|
4086
4096
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
4087
4097
|
/**
|
|
4088
4098
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
4089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-misrefactored-assignment.md
|
|
4090
4100
|
*/
|
|
4091
4101
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
4092
4102
|
/**
|
|
4093
4103
|
* Disallow named usage of default import and export.
|
|
4094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-named-default.md
|
|
4095
4105
|
*/
|
|
4096
4106
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
4097
4107
|
/**
|
|
4098
4108
|
* Disallow negated array predicate calls.
|
|
4099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-array-predicate.md
|
|
4100
4110
|
*/
|
|
4101
4111
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
4102
4112
|
/**
|
|
4103
4113
|
* Disallow negated comparisons.
|
|
4104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-comparison.md
|
|
4105
4115
|
*/
|
|
4106
4116
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
4107
4117
|
/**
|
|
4108
4118
|
* Disallow negated conditions.
|
|
4109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-condition.md
|
|
4110
4120
|
*/
|
|
4111
4121
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
4112
4122
|
/**
|
|
4113
4123
|
* Disallow negated expression in equality check.
|
|
4114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4115
4125
|
*/
|
|
4116
4126
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
4117
4127
|
/**
|
|
4118
4128
|
* Disallow nested ternary expressions.
|
|
4119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-nested-ternary.md
|
|
4120
4130
|
*/
|
|
4121
4131
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
4122
4132
|
/**
|
|
4123
4133
|
* Disallow `new Array()`.
|
|
4124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-new-array.md
|
|
4125
4135
|
*/
|
|
4126
4136
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
4127
4137
|
/**
|
|
4128
4138
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-new-buffer.md
|
|
4130
4140
|
*/
|
|
4131
4141
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
4132
4142
|
/**
|
|
4133
4143
|
* Disallow non-function values with function-style verb prefixes.
|
|
4134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
4135
4145
|
*/
|
|
4136
4146
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
4137
4147
|
/**
|
|
4138
4148
|
* Disallow non-standard properties on built-in objects.
|
|
4139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
4140
4150
|
*/
|
|
4141
4151
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
4142
4152
|
/**
|
|
4143
4153
|
* Disallow the use of the `null` literal.
|
|
4144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-null.md
|
|
4145
4155
|
*/
|
|
4146
4156
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
4147
4157
|
/**
|
|
4148
4158
|
* Disallow the use of objects as default parameters.
|
|
4149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4150
4160
|
*/
|
|
4151
4161
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
4152
4162
|
/**
|
|
4153
4163
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
4154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-object-methods-with-collections.md
|
|
4155
4165
|
*/
|
|
4156
4166
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
4157
4167
|
/**
|
|
4158
4168
|
* Disallow optional chaining on undeclared variables.
|
|
4159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
4160
4170
|
*/
|
|
4161
4171
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
4162
4172
|
/**
|
|
4163
4173
|
* Disallow `process.exit()`.
|
|
4164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-process-exit.md
|
|
4165
4175
|
*/
|
|
4166
4176
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
4167
4177
|
/**
|
|
4168
4178
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
4169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-redundant-comparison.md
|
|
4170
4180
|
*/
|
|
4171
4181
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
4172
4182
|
/**
|
|
4173
4183
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
4174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-return-array-push.md
|
|
4175
4185
|
*/
|
|
4176
4186
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
4177
4187
|
/**
|
|
4178
4188
|
* Disallow selector syntax in DOM names.
|
|
4179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-selector-as-dom-name.md
|
|
4180
4190
|
*/
|
|
4181
4191
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
4182
4192
|
/**
|
|
4183
4193
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4185
4195
|
*/
|
|
4186
4196
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4187
4197
|
/**
|
|
4188
4198
|
* Disallow classes that only have static members.
|
|
4189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-static-only-class.md
|
|
4190
4200
|
*/
|
|
4191
4201
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
4192
4202
|
/**
|
|
4193
4203
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
4194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-subtraction-comparison.md
|
|
4195
4205
|
*/
|
|
4196
4206
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
4197
4207
|
/**
|
|
4198
4208
|
* Disallow `then` property.
|
|
4199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-thenable.md
|
|
4200
4210
|
*/
|
|
4201
4211
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
4202
4212
|
/**
|
|
4203
4213
|
* Disallow assigning `this` to a variable.
|
|
4204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-this-assignment.md
|
|
4205
4215
|
*/
|
|
4206
4216
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
4207
4217
|
/**
|
|
4208
4218
|
* Disallow `this` outside of classes.
|
|
4209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-this-outside-of-class.md
|
|
4210
4220
|
*/
|
|
4211
4221
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
4212
4222
|
/**
|
|
4213
4223
|
* Disallow assigning to top-level variables from inside functions.
|
|
4214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
4215
4225
|
*/
|
|
4216
4226
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
4217
4227
|
/**
|
|
4218
4228
|
* Disallow top-level side effects in exported modules.
|
|
4219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-top-level-side-effects.md
|
|
4220
4230
|
*/
|
|
4221
4231
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
4222
4232
|
/**
|
|
4223
4233
|
* Disallow comparing `undefined` using `typeof`.
|
|
4224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-typeof-undefined.md
|
|
4225
4235
|
*/
|
|
4226
4236
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
4227
4237
|
/**
|
|
4228
4238
|
* Disallow referencing methods without calling them.
|
|
4229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-uncalled-method.md
|
|
4230
4240
|
*/
|
|
4231
4241
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
4232
4242
|
/**
|
|
4233
4243
|
* Require class members to be declared.
|
|
4234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-undeclared-class-members.md
|
|
4235
4245
|
*/
|
|
4236
4246
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
4237
4247
|
/**
|
|
4238
4248
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
4239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
4240
4250
|
*/
|
|
4241
4251
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
4252
|
+
/**
|
|
4253
|
+
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
4254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
4255
|
+
*/
|
|
4256
|
+
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
4242
4257
|
/**
|
|
4243
4258
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
4244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
4245
4260
|
*/
|
|
4246
4261
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
4247
4262
|
/**
|
|
4248
4263
|
* Disallow awaiting non-promise values.
|
|
4249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-await.md
|
|
4250
4265
|
*/
|
|
4251
4266
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
4252
4267
|
/**
|
|
4253
4268
|
* Disallow unnecessary comparisons against boolean literals.
|
|
4254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
4255
4270
|
*/
|
|
4256
4271
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
4272
|
+
/**
|
|
4273
|
+
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
4274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
4275
|
+
*/
|
|
4276
|
+
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
4257
4277
|
/**
|
|
4258
4278
|
* Disallow unnecessary `globalThis` references.
|
|
4259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-global-this.md
|
|
4260
4280
|
*/
|
|
4261
4281
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
4262
4282
|
/**
|
|
4263
4283
|
* Disallow unnecessary nested ternary expressions.
|
|
4264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
4265
4285
|
*/
|
|
4266
4286
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
4267
4287
|
/**
|
|
4268
4288
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4270
4290
|
*/
|
|
4271
4291
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
4272
4292
|
/**
|
|
4273
4293
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
4275
4295
|
*/
|
|
4276
4296
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
4277
4297
|
/**
|
|
4278
4298
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
4279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-splice.md
|
|
4280
4300
|
*/
|
|
4281
4301
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
4282
4302
|
/**
|
|
4283
4303
|
* Disallow unreadable array destructuring.
|
|
4284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4285
4305
|
*/
|
|
4286
4306
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
4287
4307
|
/**
|
|
4288
4308
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
4289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
4290
4310
|
*/
|
|
4291
4311
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
4292
4312
|
/**
|
|
4293
4313
|
* Disallow unreadable IIFEs.
|
|
4294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-iife.md
|
|
4295
4315
|
*/
|
|
4296
4316
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
4297
4317
|
/**
|
|
4298
4318
|
* Disallow unreadable `new` expressions.
|
|
4299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-new-expression.md
|
|
4300
4320
|
*/
|
|
4301
4321
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
4302
4322
|
/**
|
|
4303
4323
|
* Disallow unreadable object destructuring.
|
|
4304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
4305
4325
|
*/
|
|
4306
4326
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
4307
4327
|
/**
|
|
4308
4328
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
4309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
4310
4330
|
*/
|
|
4311
4331
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
4312
4332
|
/**
|
|
4313
4333
|
* Disallow unsafe DOM HTML APIs.
|
|
4314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-dom-html.md
|
|
4315
4335
|
*/
|
|
4316
4336
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
4339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
4340
|
+
*/
|
|
4341
|
+
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
4317
4342
|
/**
|
|
4318
4343
|
* Disallow unsafe values as property keys.
|
|
4319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-property-key.md
|
|
4320
4345
|
*/
|
|
4321
4346
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
4322
4347
|
/**
|
|
4323
4348
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
4324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
4325
4350
|
*/
|
|
4326
4351
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
4327
4352
|
/**
|
|
4328
4353
|
* Disallow ignoring the return value of selected array methods.
|
|
4329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unused-array-method-return.md
|
|
4330
4355
|
*/
|
|
4331
4356
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
4332
4357
|
/**
|
|
4333
4358
|
* Disallow unused object properties.
|
|
4334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unused-properties.md
|
|
4335
4360
|
*/
|
|
4336
4361
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
4337
4362
|
/**
|
|
4338
4363
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
4339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-boolean-cast.md
|
|
4340
4365
|
*/
|
|
4341
4366
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
4342
4367
|
/**
|
|
4343
4368
|
* Disallow useless type coercions of values that are already of the target type.
|
|
4344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-coercion.md
|
|
4345
4370
|
*/
|
|
4346
4371
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
4347
4372
|
/**
|
|
4348
4373
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
4349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-collection-argument.md
|
|
4350
4375
|
*/
|
|
4351
4376
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
4352
4377
|
/**
|
|
4353
4378
|
* Disallow useless compound assignments such as `x += 0`.
|
|
4354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-compound-assignment.md
|
|
4355
4380
|
*/
|
|
4356
4381
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
4357
4382
|
/**
|
|
4358
4383
|
* Disallow useless concatenation of literals.
|
|
4359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-concat.md
|
|
4360
4385
|
*/
|
|
4361
4386
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
4362
4387
|
/**
|
|
4363
4388
|
* Disallow useless `continue` statements.
|
|
4364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-continue.md
|
|
4365
4390
|
*/
|
|
4366
4391
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
4367
4392
|
/**
|
|
4368
4393
|
* Disallow unnecessary existence checks before deletion.
|
|
4369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-delete-check.md
|
|
4370
4395
|
*/
|
|
4371
4396
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
4372
4397
|
/**
|
|
4373
4398
|
* Disallow `else` after a statement that exits.
|
|
4374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-else.md
|
|
4375
4400
|
*/
|
|
4376
4401
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
4377
4402
|
/**
|
|
4378
4403
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
4379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
4380
4405
|
*/
|
|
4381
4406
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
4382
4407
|
/**
|
|
4383
4408
|
* Disallow useless fallback when spreading in object literals.
|
|
4384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
4385
4410
|
*/
|
|
4386
4411
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
4387
4412
|
/**
|
|
4388
4413
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
4389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
4390
4415
|
*/
|
|
4391
4416
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
4392
4417
|
/**
|
|
4393
4418
|
* Disallow useless array length check.
|
|
4394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-length-check.md
|
|
4395
4420
|
*/
|
|
4396
4421
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
4397
4422
|
/**
|
|
4398
4423
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
4399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-logical-operand.md
|
|
4400
4425
|
*/
|
|
4401
4426
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
4402
4427
|
/**
|
|
4403
4428
|
* Disallow useless overrides of class methods.
|
|
4404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-override.md
|
|
4405
4430
|
*/
|
|
4406
4431
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
4407
4432
|
/**
|
|
4408
4433
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
4409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
4410
4435
|
*/
|
|
4411
4436
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
4412
4437
|
/**
|
|
4413
4438
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
4414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-recursion.md
|
|
4415
4440
|
*/
|
|
4416
4441
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
4417
4442
|
/**
|
|
4418
4443
|
* Disallow unnecessary spread.
|
|
4419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-spread.md
|
|
4420
4445
|
*/
|
|
4421
4446
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
4422
4447
|
/**
|
|
4423
4448
|
* Disallow useless case in switch statements.
|
|
4424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-switch-case.md
|
|
4425
4450
|
*/
|
|
4426
4451
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
4427
4452
|
/**
|
|
4428
4453
|
* Disallow useless template literal expressions.
|
|
4429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-template-literals.md
|
|
4430
4455
|
*/
|
|
4431
4456
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
4432
4457
|
/**
|
|
4433
4458
|
* Disallow useless `undefined`.
|
|
4434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-undefined.md
|
|
4435
4460
|
*/
|
|
4436
4461
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
4437
4462
|
/**
|
|
4438
4463
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
4439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
4440
4465
|
*/
|
|
4441
4466
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
4442
4467
|
/**
|
|
4443
4468
|
* Disallow number literals with zero fractions or dangling dots.
|
|
4444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-zero-fractions.md
|
|
4445
4470
|
*/
|
|
4446
4471
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
4447
4472
|
/**
|
|
4448
4473
|
* Enforce proper case for numeric literals.
|
|
4449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/number-literal-case.md
|
|
4450
4475
|
*/
|
|
4451
4476
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
4452
4477
|
/**
|
|
4453
4478
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
4454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/numeric-separators-style.md
|
|
4455
4480
|
*/
|
|
4456
4481
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
4457
4482
|
/**
|
|
4458
4483
|
* Require assignment operator shorthand where possible.
|
|
4459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/operator-assignment.md
|
|
4460
4485
|
*/
|
|
4461
4486
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
4487
|
+
/**
|
|
4488
|
+
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
4489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-abort-signal-any.md
|
|
4490
|
+
*/
|
|
4491
|
+
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
4462
4492
|
/**
|
|
4463
4493
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
4464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
4465
4495
|
*/
|
|
4466
4496
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
4467
4497
|
/**
|
|
4468
4498
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
4469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-add-event-listener.md
|
|
4470
4500
|
*/
|
|
4471
4501
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
4472
4502
|
/**
|
|
4473
4503
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
4474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
4475
4505
|
*/
|
|
4476
4506
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
4477
4507
|
/**
|
|
4478
4508
|
* Prefer `AggregateError` when throwing collected errors.
|
|
4479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-aggregate-error.md
|
|
4480
4510
|
*/
|
|
4481
4511
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
4482
4512
|
/**
|
|
4483
4513
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
4484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-find.md
|
|
4485
4515
|
*/
|
|
4486
4516
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
4487
4517
|
/**
|
|
4488
4518
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
4489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-flat.md
|
|
4490
4520
|
*/
|
|
4491
4521
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
4492
4522
|
/**
|
|
4493
4523
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
4494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-flat-map.md
|
|
4495
4525
|
*/
|
|
4496
4526
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
4497
4527
|
/**
|
|
4498
4528
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
4499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-async.md
|
|
4500
4530
|
*/
|
|
4501
4531
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
4502
4532
|
/**
|
|
4503
4533
|
* Prefer using the `Array.from()` mapping function argument.
|
|
4504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-map.md
|
|
4505
4535
|
*/
|
|
4506
4536
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
4537
|
+
/**
|
|
4538
|
+
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
4539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-range.md
|
|
4540
|
+
*/
|
|
4541
|
+
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
4507
4542
|
/**
|
|
4508
4543
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
4509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-index-of.md
|
|
4510
4545
|
*/
|
|
4511
4546
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
4512
4547
|
/**
|
|
4513
4548
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
4514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
4515
4550
|
*/
|
|
4516
4551
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
4517
4552
|
/**
|
|
4518
4553
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
4519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-last-methods.md
|
|
4520
4555
|
*/
|
|
4521
4556
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
4522
4557
|
/**
|
|
4523
4558
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
4524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-slice.md
|
|
4525
4560
|
*/
|
|
4526
4561
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
4527
4562
|
/**
|
|
4528
4563
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
4529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-some.md
|
|
4530
4565
|
*/
|
|
4531
4566
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
4532
4567
|
/**
|
|
4533
4568
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
4534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-at.md
|
|
4535
4570
|
*/
|
|
4536
4571
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
4537
4572
|
/**
|
|
4538
4573
|
* Prefer `await` over promise chaining.
|
|
4539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-await.md
|
|
4540
4575
|
*/
|
|
4541
4576
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
4542
4577
|
/**
|
|
4543
4578
|
* Prefer `BigInt` literals over the constructor.
|
|
4544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-bigint-literals.md
|
|
4545
4580
|
*/
|
|
4546
4581
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
4547
4582
|
/**
|
|
4548
4583
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
4549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
4550
4585
|
*/
|
|
4551
4586
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
4587
|
+
/**
|
|
4588
|
+
* Prefer block statements over IIFEs used only for scoping.
|
|
4589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
4590
|
+
*/
|
|
4591
|
+
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
4552
4592
|
/**
|
|
4553
4593
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
4554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-boolean-return.md
|
|
4555
4595
|
*/
|
|
4556
4596
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
4557
4597
|
/**
|
|
4558
4598
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
4559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-class-fields.md
|
|
4560
4600
|
*/
|
|
4561
4601
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
4562
4602
|
/**
|
|
4563
4603
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
4564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-classlist-toggle.md
|
|
4565
4605
|
*/
|
|
4566
4606
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
4567
4607
|
/**
|
|
4568
4608
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
4569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-code-point.md
|
|
4570
4610
|
*/
|
|
4571
4611
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
4572
4612
|
/**
|
|
4573
4613
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
4574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-continue.md
|
|
4575
4615
|
*/
|
|
4576
4616
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
4577
4617
|
/**
|
|
4578
4618
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-date-now.md
|
|
4580
4620
|
*/
|
|
4581
4621
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
4582
4622
|
/**
|
|
4583
4623
|
* Prefer default parameters over reassignment.
|
|
4584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-default-parameters.md
|
|
4585
4625
|
*/
|
|
4586
4626
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
4587
4627
|
/**
|
|
4588
4628
|
* Prefer direct iteration over default iterator method calls.
|
|
4589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-direct-iteration.md
|
|
4590
4630
|
*/
|
|
4591
4631
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
4592
4632
|
/**
|
|
4593
4633
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
4594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dispose.md
|
|
4595
4635
|
*/
|
|
4596
4636
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
4597
4637
|
/**
|
|
4598
4638
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
4599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-append.md
|
|
4600
4640
|
*/
|
|
4601
4641
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
4602
4642
|
/**
|
|
4603
4643
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
4604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
4605
4645
|
* @deprecated
|
|
4606
4646
|
*/
|
|
4607
4647
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
4608
4648
|
/**
|
|
4609
4649
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
4610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
4611
4651
|
*/
|
|
4612
4652
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
4613
4653
|
/**
|
|
4614
4654
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4616
4656
|
*/
|
|
4617
4657
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
4618
4658
|
/**
|
|
4619
4659
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
4620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
4621
4661
|
*/
|
|
4622
4662
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
4623
4663
|
/**
|
|
4624
4664
|
* Prefer `.textContent` over `.innerText`.
|
|
4625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4626
4666
|
*/
|
|
4627
4667
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
4628
4668
|
/**
|
|
4629
4669
|
* Prefer early returns over full-function conditional wrapping.
|
|
4630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-early-return.md
|
|
4631
4671
|
*/
|
|
4632
4672
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
4633
4673
|
/**
|
|
4634
4674
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
4635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-else-if.md
|
|
4636
4676
|
*/
|
|
4637
4677
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
4638
4678
|
/**
|
|
4639
4679
|
* Prefer `Error.isError()` when checking for errors.
|
|
4640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-error-is-error.md
|
|
4641
4681
|
*/
|
|
4642
4682
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
4643
4683
|
/**
|
|
4644
4684
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
4645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-event-target.md
|
|
4646
4686
|
*/
|
|
4647
4687
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
4648
4688
|
/**
|
|
4649
4689
|
* Prefer `export…from` when re-exporting.
|
|
4650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-export-from.md
|
|
4651
4691
|
*/
|
|
4652
4692
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
4653
4693
|
/**
|
|
4654
4694
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
4655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
4656
4696
|
*/
|
|
4657
4697
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
4658
4698
|
/**
|
|
4659
4699
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
4660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
4661
4701
|
*/
|
|
4662
4702
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
4663
4703
|
/**
|
|
4664
4704
|
* Prefer global numeric constants over `Number` static properties.
|
|
4665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-global-number-constants.md
|
|
4666
4706
|
*/
|
|
4667
4707
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
4668
4708
|
/**
|
|
4669
4709
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-global-this.md
|
|
4671
4711
|
*/
|
|
4672
4712
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
4713
|
+
/**
|
|
4714
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
4715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-group-by.md
|
|
4716
|
+
*/
|
|
4717
|
+
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
4673
4718
|
/**
|
|
4674
4719
|
* Prefer `.has()` when checking existence.
|
|
4675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-has-check.md
|
|
4676
4721
|
*/
|
|
4677
4722
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
4678
4723
|
/**
|
|
4679
4724
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
4680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
4681
4726
|
*/
|
|
4682
4727
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
4683
4728
|
/**
|
|
4684
4729
|
* Prefer HTTPS over HTTP.
|
|
4685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-https.md
|
|
4686
4731
|
*/
|
|
4687
4732
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
4688
4733
|
/**
|
|
4689
4734
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
4690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
4691
4736
|
*/
|
|
4692
4737
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
4693
4738
|
/**
|
|
4694
4739
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
4695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-import-meta-properties.md
|
|
4696
4741
|
*/
|
|
4697
4742
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
4698
4743
|
/**
|
|
4699
4744
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-includes.md
|
|
4701
4746
|
*/
|
|
4702
4747
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
4703
4748
|
/**
|
|
4704
4749
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
4705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
4706
4751
|
*/
|
|
4707
4752
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
4708
4753
|
/**
|
|
4709
4754
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
4710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
4711
4756
|
*/
|
|
4712
4757
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
4713
4758
|
/**
|
|
4714
4759
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
4715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-concat.md
|
|
4716
4761
|
*/
|
|
4717
4762
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
4763
|
+
/**
|
|
4764
|
+
* Prefer iterator helpers over temporary arrays from iterators.
|
|
4765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-helpers.md
|
|
4766
|
+
*/
|
|
4767
|
+
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
4718
4768
|
/**
|
|
4719
4769
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
4720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-to-array.md
|
|
4721
4771
|
*/
|
|
4722
4772
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
4723
4773
|
/**
|
|
4724
4774
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
4725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
4726
4776
|
*/
|
|
4727
4777
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
4728
4778
|
/**
|
|
4729
4779
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
4730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
4731
4781
|
* @deprecated
|
|
4732
4782
|
*/
|
|
4733
4783
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
4734
4784
|
/**
|
|
4735
4785
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
4736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4737
4787
|
*/
|
|
4738
4788
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
4739
4789
|
/**
|
|
4740
4790
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
4741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-location-assign.md
|
|
4742
4792
|
*/
|
|
4743
4793
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
4744
4794
|
/**
|
|
4745
4795
|
* Prefer using a logical operator over a ternary.
|
|
4746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4747
4797
|
*/
|
|
4748
4798
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
4749
4799
|
/**
|
|
4750
4800
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
4751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-map-from-entries.md
|
|
4752
4802
|
*/
|
|
4753
4803
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
4754
4804
|
/**
|
|
4755
4805
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
4756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-abs.md
|
|
4757
4807
|
*/
|
|
4758
4808
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
4759
4809
|
/**
|
|
4760
4810
|
* Prefer `Math` constants over their approximate numeric values.
|
|
4761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-constants.md
|
|
4762
4812
|
*/
|
|
4763
4813
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
4764
4814
|
/**
|
|
4765
4815
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-min-max.md
|
|
4767
4817
|
*/
|
|
4768
4818
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
4769
4819
|
/**
|
|
4770
4820
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
4771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-trunc.md
|
|
4772
4822
|
*/
|
|
4773
4823
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
4774
4824
|
/**
|
|
4775
4825
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
4776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-minimal-ternary.md
|
|
4777
4827
|
*/
|
|
4778
4828
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
4779
4829
|
/**
|
|
4780
4830
|
* Prefer modern DOM APIs.
|
|
4781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4782
4832
|
*/
|
|
4783
4833
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
4784
4834
|
/**
|
|
4785
4835
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
4786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4787
4837
|
*/
|
|
4788
4838
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
4789
4839
|
/**
|
|
4790
4840
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-module.md
|
|
4792
4842
|
*/
|
|
4793
4843
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
4794
4844
|
/**
|
|
4795
4845
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4797
4847
|
*/
|
|
4798
4848
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
4799
4849
|
/**
|
|
4800
4850
|
* Prefer negative index over `.length - index` when possible.
|
|
4801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-negative-index.md
|
|
4802
4852
|
*/
|
|
4803
4853
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
4804
4854
|
/**
|
|
4805
4855
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-node-protocol.md
|
|
4807
4857
|
*/
|
|
4808
4858
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
4809
4859
|
/**
|
|
4810
4860
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
4811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-coercion.md
|
|
4812
4862
|
*/
|
|
4813
4863
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
4814
4864
|
/**
|
|
4815
4865
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
4816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
4817
4867
|
*/
|
|
4818
4868
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
4819
4869
|
/**
|
|
4820
4870
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
4821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-properties.md
|
|
4822
4872
|
*/
|
|
4823
4873
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
4824
4874
|
/**
|
|
4825
4875
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
4826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-define-properties.md
|
|
4827
4877
|
*/
|
|
4828
4878
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
4829
4879
|
/**
|
|
4830
4880
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
4831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
4832
4882
|
*/
|
|
4833
4883
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
4834
4884
|
/**
|
|
4835
4885
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-from-entries.md
|
|
4837
4887
|
*/
|
|
4838
4888
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
4839
4889
|
/**
|
|
4840
4890
|
* Prefer the most specific `Object` iterable method.
|
|
4841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
4842
4892
|
*/
|
|
4843
4893
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
4844
4894
|
/**
|
|
4845
4895
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
4846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-observer-apis.md
|
|
4847
4897
|
*/
|
|
4848
4898
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
4849
4899
|
/**
|
|
4850
4900
|
* Prefer omitting the `catch` binding parameter.
|
|
4851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4852
4902
|
*/
|
|
4853
4903
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
4854
4904
|
/**
|
|
4855
4905
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
4856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-path2d.md
|
|
4857
4907
|
*/
|
|
4858
4908
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
4859
4909
|
/**
|
|
4860
4910
|
* Prefer private class fields over the underscore-prefix convention.
|
|
4861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-private-class-fields.md
|
|
4862
4912
|
*/
|
|
4863
4913
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
4864
4914
|
/**
|
|
4865
4915
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
4866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-promise-try.md
|
|
4867
4917
|
*/
|
|
4868
4918
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
4869
4919
|
/**
|
|
4870
4920
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
4871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
4872
4922
|
*/
|
|
4873
4923
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
4874
4924
|
/**
|
|
4875
4925
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-prototype-methods.md
|
|
4877
4927
|
*/
|
|
4878
4928
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
4879
4929
|
/**
|
|
4880
4930
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
4881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-query-selector.md
|
|
4882
4932
|
*/
|
|
4883
4933
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
4884
4934
|
/**
|
|
4885
4935
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
4886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-queue-microtask.md
|
|
4887
4937
|
*/
|
|
4888
4938
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
4889
4939
|
/**
|
|
4890
4940
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-reflect-apply.md
|
|
4892
4942
|
*/
|
|
4893
4943
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
4894
4944
|
/**
|
|
4895
4945
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
4896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-regexp-escape.md
|
|
4897
4947
|
*/
|
|
4898
4948
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
4899
4949
|
/**
|
|
4900
4950
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
4901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-regexp-test.md
|
|
4902
4952
|
*/
|
|
4903
4953
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
4904
4954
|
/**
|
|
4905
4955
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
4906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-response-static-json.md
|
|
4907
4957
|
*/
|
|
4908
4958
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
4909
4959
|
/**
|
|
4910
4960
|
* Prefer `:scope` when using element query selector methods.
|
|
4911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-scoped-selector.md
|
|
4912
4962
|
*/
|
|
4913
4963
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
4914
4964
|
/**
|
|
4915
4965
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-has.md
|
|
4917
4967
|
*/
|
|
4918
4968
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
4919
4969
|
/**
|
|
4920
4970
|
* Prefer `Set` methods for Set operations.
|
|
4921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-methods.md
|
|
4922
4972
|
*/
|
|
4923
4973
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
4924
4974
|
/**
|
|
4925
4975
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
4926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-size.md
|
|
4927
4977
|
*/
|
|
4928
4978
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
4929
4979
|
/**
|
|
4930
4980
|
* Prefer arrow function properties over methods with a single return.
|
|
4931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-short-arrow-method.md
|
|
4932
4982
|
*/
|
|
4933
4983
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
4934
4984
|
/**
|
|
4935
4985
|
* Prefer simple conditions first in logical expressions.
|
|
4936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simple-condition-first.md
|
|
4937
4987
|
*/
|
|
4938
4988
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
4939
4989
|
/**
|
|
4940
4990
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
4941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
4942
4992
|
*/
|
|
4943
4993
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
4994
|
+
/**
|
|
4995
|
+
* Prefer simplified conditions.
|
|
4996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simplified-conditions.md
|
|
4997
|
+
*/
|
|
4998
|
+
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
4944
4999
|
/**
|
|
4945
5000
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
4946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-array-predicate.md
|
|
4947
5002
|
*/
|
|
4948
5003
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
4949
5004
|
/**
|
|
4950
5005
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
4951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-call.md
|
|
4952
5007
|
*/
|
|
4953
5008
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
4954
5009
|
/**
|
|
4955
5010
|
* Prefer a single object destructuring declaration per local const source.
|
|
4956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
4957
5012
|
*/
|
|
4958
5013
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
4959
5014
|
/**
|
|
4960
5015
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
4961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-replace.md
|
|
4962
5017
|
*/
|
|
4963
5018
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
4964
5019
|
/**
|
|
4965
5020
|
* Prefer declaring variables in the smallest possible scope.
|
|
4966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-smaller-scope.md
|
|
4967
5022
|
*/
|
|
4968
5023
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
4969
5024
|
/**
|
|
4970
5025
|
* Prefer `String#split()` with a limit.
|
|
4971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-split-limit.md
|
|
4972
5027
|
*/
|
|
4973
5028
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
4974
5029
|
/**
|
|
4975
5030
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
4976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-spread.md
|
|
4977
5032
|
*/
|
|
4978
5033
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
4979
5034
|
/**
|
|
4980
5035
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
4981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-match-all.md
|
|
4982
5037
|
*/
|
|
4983
5038
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
4984
5039
|
/**
|
|
4985
5040
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
4986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
4987
5042
|
*/
|
|
4988
5043
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
4989
5044
|
/**
|
|
4990
5045
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-raw.md
|
|
4992
5047
|
*/
|
|
4993
5048
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
4994
5049
|
/**
|
|
4995
5050
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
4996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-repeat.md
|
|
4997
5052
|
*/
|
|
4998
5053
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
4999
5054
|
/**
|
|
5000
5055
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
5001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-replace-all.md
|
|
5002
5057
|
*/
|
|
5003
5058
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5004
5059
|
/**
|
|
5005
5060
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-slice.md
|
|
5007
5062
|
*/
|
|
5008
5063
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5009
5064
|
/**
|
|
5010
5065
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
5011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5012
5067
|
*/
|
|
5013
5068
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5014
5069
|
/**
|
|
5015
5070
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5017
5072
|
*/
|
|
5018
5073
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5019
5074
|
/**
|
|
5020
5075
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-structured-clone.md
|
|
5022
5077
|
*/
|
|
5023
5078
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5024
5079
|
/**
|
|
5025
5080
|
* Prefer `switch` over multiple `else-if`.
|
|
5026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-switch.md
|
|
5027
5082
|
*/
|
|
5028
5083
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5029
5084
|
/**
|
|
5030
5085
|
* Prefer `Temporal` over `Date`.
|
|
5031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-temporal.md
|
|
5032
5087
|
*/
|
|
5033
5088
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
5034
5089
|
/**
|
|
5035
5090
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
5036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-ternary.md
|
|
5037
5092
|
*/
|
|
5038
5093
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5039
5094
|
/**
|
|
5040
5095
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
5041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-toggle-attribute.md
|
|
5042
5097
|
*/
|
|
5043
5098
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
5044
5099
|
/**
|
|
5045
5100
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-top-level-await.md
|
|
5047
5102
|
*/
|
|
5048
5103
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5049
5104
|
/**
|
|
5050
5105
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-type-error.md
|
|
5052
5107
|
*/
|
|
5053
5108
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5054
5109
|
/**
|
|
5055
5110
|
* Require type literals to be last in union types.
|
|
5056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-type-literal-last.md
|
|
5057
5112
|
*/
|
|
5058
5113
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
5059
5114
|
/**
|
|
5060
5115
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
5061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-uint8array-base64.md
|
|
5062
5117
|
*/
|
|
5063
5118
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
5064
5119
|
/**
|
|
5065
5120
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
5066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-unary-minus.md
|
|
5067
5122
|
*/
|
|
5068
5123
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
5069
5124
|
/**
|
|
5070
5125
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
5071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
5072
5127
|
*/
|
|
5073
5128
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
5074
5129
|
/**
|
|
5075
5130
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
5076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-can-parse.md
|
|
5077
5132
|
*/
|
|
5078
5133
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
5079
5134
|
/**
|
|
5080
5135
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
5081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-href.md
|
|
5082
5137
|
*/
|
|
5083
5138
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
5084
5139
|
/**
|
|
5085
5140
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
5086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-search-parameters.md
|
|
5087
5142
|
*/
|
|
5088
5143
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
5089
5144
|
/**
|
|
5090
5145
|
* Prefer putting the condition in the while statement.
|
|
5091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-while-loop-condition.md
|
|
5092
5147
|
*/
|
|
5093
5148
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
5094
5149
|
/**
|
|
5095
5150
|
* Renamed to `unicorn/name-replacements`.
|
|
5096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
5097
5152
|
* @deprecated
|
|
5098
5153
|
*/
|
|
5099
5154
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
5100
5155
|
/**
|
|
5101
5156
|
* Enforce consistent relative URL style.
|
|
5102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/relative-url-style.md
|
|
5103
5158
|
*/
|
|
5104
5159
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5105
5160
|
/**
|
|
5106
5161
|
* Enforce using the separator argument with `Array#join()`.
|
|
5107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-array-join-separator.md
|
|
5108
5163
|
*/
|
|
5109
5164
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5110
5165
|
/**
|
|
5111
5166
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
5112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-array-sort-compare.md
|
|
5113
5168
|
*/
|
|
5114
5169
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
5115
5170
|
/**
|
|
5116
5171
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
5117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-css-escape.md
|
|
5118
5173
|
*/
|
|
5119
5174
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
5120
5175
|
/**
|
|
5121
5176
|
* Require non-empty module attributes for imports and exports
|
|
5122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-module-attributes.md
|
|
5123
5178
|
*/
|
|
5124
5179
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5125
5180
|
/**
|
|
5126
5181
|
* Require non-empty specifier list in import and export statements.
|
|
5127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-module-specifiers.md
|
|
5128
5183
|
*/
|
|
5129
5184
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5130
5185
|
/**
|
|
5131
5186
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5133
5188
|
*/
|
|
5134
5189
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5135
5190
|
/**
|
|
5136
5191
|
* Require passive event listeners for high-frequency events.
|
|
5137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-passive-events.md
|
|
5138
5193
|
*/
|
|
5139
5194
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
5140
5195
|
/**
|
|
5141
5196
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-post-message-target-origin.md
|
|
5143
5198
|
*/
|
|
5144
5199
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5145
5200
|
/**
|
|
5146
5201
|
* Require boolean-returning Proxy traps to return booleans.
|
|
5147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
5148
5203
|
*/
|
|
5149
5204
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5150
5205
|
/**
|
|
5151
5206
|
* Enforce better string content.
|
|
5152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/string-content.md
|
|
5153
5208
|
*/
|
|
5154
5209
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5155
5210
|
/**
|
|
5156
5211
|
* Enforce consistent brace style for `case` clauses.
|
|
5157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/switch-case-braces.md
|
|
5158
5213
|
*/
|
|
5159
5214
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5160
5215
|
/**
|
|
5161
5216
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
5162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/switch-case-break-position.md
|
|
5163
5218
|
*/
|
|
5164
5219
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
5165
5220
|
/**
|
|
5166
5221
|
* Fix whitespace-insensitive template indentation.
|
|
5167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/template-indent.md
|
|
5168
5223
|
*/
|
|
5169
5224
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5170
5225
|
/**
|
|
5171
5226
|
* Enforce consistent case for text encoding identifiers.
|
|
5172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5173
5228
|
*/
|
|
5174
5229
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5175
5230
|
/**
|
|
5176
5231
|
* Require `new` when creating an error.
|
|
5177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/throw-new-error.md
|
|
5178
5233
|
*/
|
|
5179
5234
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5180
5235
|
/**
|
|
5181
5236
|
* Limit the complexity of `try` blocks.
|
|
5182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/try-complexity.md
|
|
5183
5238
|
*/
|
|
5184
5239
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
5185
5240
|
/**
|
|
@@ -8278,6 +8333,9 @@ type NoConfusingArrow = [] | [{
|
|
|
8278
8333
|
}]; // ----- no-console -----
|
|
8279
8334
|
type NoConsole = [] | [{
|
|
8280
8335
|
allow?: [string, ...(string)[]];
|
|
8336
|
+
}]; // ----- no-constant-binary-expression -----
|
|
8337
|
+
type NoConstantBinaryExpression = [] | [{
|
|
8338
|
+
checkRelationalComparisons?: boolean;
|
|
8281
8339
|
}]; // ----- no-constant-condition -----
|
|
8282
8340
|
type NoConstantCondition = [] | [{
|
|
8283
8341
|
checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false);
|
|
@@ -11820,6 +11878,7 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
11820
11878
|
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
11821
11879
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
11822
11880
|
verbs?: string[];
|
|
11881
|
+
ignore?: unknown[];
|
|
11823
11882
|
}]; // ----- unicorn/no-null -----
|
|
11824
11883
|
type UnicornNoNull = [] | [{
|
|
11825
11884
|
checkArguments?: boolean;
|