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