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