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