@lichthagel/eslint-config 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +166 -139
- package/dist/index.d.ts +166 -139
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -3496,670 +3496,690 @@ interface RuleOptions {
|
|
|
3496
3496
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
3497
3497
|
/**
|
|
3498
3498
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
3499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
3500
3500
|
*/
|
|
3501
3501
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
3502
3502
|
/**
|
|
3503
3503
|
* Enforce a specific parameter name in catch clauses.
|
|
3504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
3505
3505
|
*/
|
|
3506
3506
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
3507
3507
|
/**
|
|
3508
3508
|
* Enforce consistent assertion style with `node:assert`.
|
|
3509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
3510
3510
|
*/
|
|
3511
3511
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
3512
3512
|
/**
|
|
3513
3513
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
3515
3515
|
*/
|
|
3516
3516
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
3517
3517
|
/**
|
|
3518
3518
|
* Use destructured variables over properties.
|
|
3519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
3520
3520
|
*/
|
|
3521
3521
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
3522
3522
|
/**
|
|
3523
3523
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
3525
3525
|
*/
|
|
3526
3526
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
3527
3527
|
/**
|
|
3528
3528
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
3530
3530
|
*/
|
|
3531
3531
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
3532
3532
|
/**
|
|
3533
3533
|
* Move function definitions to the highest possible scope.
|
|
3534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
3535
3535
|
*/
|
|
3536
3536
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
3537
3537
|
/**
|
|
3538
3538
|
* Enforce correct `Error` subclassing.
|
|
3539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
3540
3540
|
*/
|
|
3541
3541
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
3542
3542
|
/**
|
|
3543
3543
|
* Enforce no spaces between braces.
|
|
3544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
3545
3545
|
*/
|
|
3546
3546
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
3547
3547
|
/**
|
|
3548
3548
|
* Enforce passing a `message` value when creating a built-in error.
|
|
3549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
3550
3550
|
*/
|
|
3551
3551
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
3552
3552
|
/**
|
|
3553
3553
|
* Require escape sequences to use uppercase or lowercase values.
|
|
3554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
3555
3555
|
*/
|
|
3556
3556
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
3557
3557
|
/**
|
|
3558
3558
|
* Add expiration conditions to TODO comments.
|
|
3559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
3560
3560
|
*/
|
|
3561
3561
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
3562
3562
|
/**
|
|
3563
3563
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
3565
3565
|
*/
|
|
3566
3566
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
3567
3567
|
/**
|
|
3568
3568
|
* Enforce a case style for filenames.
|
|
3569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
3570
3570
|
*/
|
|
3571
3571
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
3572
3572
|
/**
|
|
3573
3573
|
* Enforce specific import styles per module.
|
|
3574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
3575
3575
|
*/
|
|
3576
3576
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
3577
3577
|
/**
|
|
3578
3578
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
3579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
3580
3580
|
*/
|
|
3581
3581
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
3582
3582
|
/**
|
|
3583
3583
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
3585
3585
|
*/
|
|
3586
3586
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
3587
3587
|
/**
|
|
3588
3588
|
* Disallow recursive access to `this` within getters and setters.
|
|
3589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
3590
3590
|
*/
|
|
3591
3591
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
3592
3592
|
/**
|
|
3593
3593
|
* Disallow anonymous functions and classes as the default export.
|
|
3594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
3595
3595
|
*/
|
|
3596
3596
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
3597
3597
|
/**
|
|
3598
3598
|
* Prevent passing a function reference directly to iterator methods.
|
|
3599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
3600
3600
|
*/
|
|
3601
3601
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
3602
3602
|
/**
|
|
3603
3603
|
* Prefer `for…of` over the `forEach` method.
|
|
3604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
3605
3605
|
*/
|
|
3606
3606
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
3607
3607
|
/**
|
|
3608
3608
|
* Disallow using the `this` argument in array methods.
|
|
3609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
3610
3610
|
*/
|
|
3611
3611
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
3612
3612
|
/**
|
|
3613
3613
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
3614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
3615
3615
|
* @deprecated
|
|
3616
3616
|
*/
|
|
3617
3617
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
3618
3618
|
/**
|
|
3619
3619
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
3620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
3621
3621
|
*/
|
|
3622
3622
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
3623
|
+
/**
|
|
3624
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
3625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
3626
|
+
*/
|
|
3627
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
3623
3628
|
/**
|
|
3624
3629
|
* Disallow member access from await expression.
|
|
3625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
3626
3631
|
*/
|
|
3627
3632
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
3628
3633
|
/**
|
|
3629
3634
|
* Disallow using `await` in `Promise` method parameters.
|
|
3630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
3631
3636
|
*/
|
|
3632
3637
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3633
3638
|
/**
|
|
3634
3639
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
3635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
3636
3641
|
*/
|
|
3637
3642
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
3638
3643
|
/**
|
|
3639
3644
|
* Do not use `document.cookie` directly.
|
|
3640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
3641
3646
|
*/
|
|
3642
3647
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
3643
3648
|
/**
|
|
3644
3649
|
* Disallow empty files.
|
|
3645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
3646
3651
|
*/
|
|
3647
3652
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
3648
3653
|
/**
|
|
3649
3654
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
3650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
3651
3656
|
*/
|
|
3652
3657
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
3653
3658
|
/**
|
|
3654
3659
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
3655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
3656
3661
|
*/
|
|
3657
3662
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
3658
3663
|
/**
|
|
3659
3664
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
3660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
3661
3666
|
* @deprecated
|
|
3662
3667
|
*/
|
|
3663
3668
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
3664
3669
|
/**
|
|
3665
3670
|
* Disallow `instanceof` with built-in objects
|
|
3666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
3667
3672
|
*/
|
|
3668
3673
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
3669
3674
|
/**
|
|
3670
3675
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
3671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
3672
3677
|
*/
|
|
3673
3678
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
3674
3679
|
/**
|
|
3675
3680
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
3676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
3677
3682
|
*/
|
|
3678
3683
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
3679
3684
|
/**
|
|
3680
3685
|
* Disallow identifiers starting with `new` or `class`.
|
|
3681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
3682
3687
|
*/
|
|
3683
3688
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
3684
3689
|
/**
|
|
3685
3690
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
3686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
3687
3692
|
* @deprecated
|
|
3688
3693
|
*/
|
|
3689
3694
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
3690
3695
|
/**
|
|
3691
3696
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
3692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
3693
3698
|
*/
|
|
3694
3699
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
3695
3700
|
/**
|
|
3696
3701
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
3697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
3698
3703
|
*/
|
|
3699
3704
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3700
3705
|
/**
|
|
3701
3706
|
* Disallow named usage of default import and export.
|
|
3702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
3703
3708
|
*/
|
|
3704
3709
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
3705
3710
|
/**
|
|
3706
3711
|
* Disallow negated conditions.
|
|
3707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
3708
3713
|
*/
|
|
3709
3714
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
3710
3715
|
/**
|
|
3711
3716
|
* Disallow negated expression in equality check.
|
|
3712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
3713
3718
|
*/
|
|
3714
3719
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
3715
3720
|
/**
|
|
3716
3721
|
* Disallow nested ternary expressions.
|
|
3717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
3718
3723
|
*/
|
|
3719
3724
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
3720
3725
|
/**
|
|
3721
3726
|
* Disallow `new Array()`.
|
|
3722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
3723
3728
|
*/
|
|
3724
3729
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
3725
3730
|
/**
|
|
3726
3731
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
3727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
3728
3733
|
*/
|
|
3729
3734
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
3730
3735
|
/**
|
|
3731
3736
|
* Disallow the use of the `null` literal.
|
|
3732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
3733
3738
|
*/
|
|
3734
3739
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
3735
3740
|
/**
|
|
3736
3741
|
* Disallow the use of objects as default parameters.
|
|
3737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
3738
3743
|
*/
|
|
3739
3744
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
3740
3745
|
/**
|
|
3741
3746
|
* Disallow `process.exit()`.
|
|
3742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
3743
3748
|
*/
|
|
3744
3749
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
3745
3750
|
/**
|
|
3746
3751
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
3747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
3748
3753
|
*/
|
|
3749
3754
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3750
3755
|
/**
|
|
3751
3756
|
* Disallow classes that only have static members.
|
|
3752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
3753
3758
|
*/
|
|
3754
3759
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
3755
3760
|
/**
|
|
3756
3761
|
* Disallow `then` property.
|
|
3757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
3758
3763
|
*/
|
|
3759
3764
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
3760
3765
|
/**
|
|
3761
3766
|
* Disallow assigning `this` to a variable.
|
|
3762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
3763
3768
|
*/
|
|
3764
3769
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
3765
3770
|
/**
|
|
3766
3771
|
* Disallow comparing `undefined` using `typeof`.
|
|
3767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
3768
3773
|
*/
|
|
3769
3774
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
3770
3775
|
/**
|
|
3771
3776
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
3772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
3773
3778
|
*/
|
|
3774
3779
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3775
3780
|
/**
|
|
3776
3781
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
3777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
3778
3783
|
*/
|
|
3779
3784
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
3780
3785
|
/**
|
|
3781
3786
|
* Disallow awaiting non-promise values.
|
|
3782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
3783
3788
|
*/
|
|
3784
3789
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
3785
3790
|
/**
|
|
3786
3791
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
3787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
3788
3793
|
*/
|
|
3789
3794
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
3790
3795
|
/**
|
|
3791
3796
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
3792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
3793
3798
|
*/
|
|
3794
3799
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
3795
3800
|
/**
|
|
3796
3801
|
* Disallow unreadable array destructuring.
|
|
3797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
3798
3803
|
*/
|
|
3799
3804
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
3800
3805
|
/**
|
|
3801
3806
|
* Disallow unreadable IIFEs.
|
|
3802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
3803
3808
|
*/
|
|
3804
3809
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
3805
3810
|
/**
|
|
3806
3811
|
* Disallow unused object properties.
|
|
3807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
3808
3813
|
*/
|
|
3809
3814
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
3815
|
+
/**
|
|
3816
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
3817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
3818
|
+
*/
|
|
3819
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
3810
3820
|
/**
|
|
3811
3821
|
* Disallow useless fallback when spreading in object literals.
|
|
3812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
3813
3823
|
*/
|
|
3814
3824
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
3815
3825
|
/**
|
|
3816
3826
|
* Disallow useless array length check.
|
|
3817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
3818
3828
|
*/
|
|
3819
3829
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
3820
3830
|
/**
|
|
3821
3831
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
3822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
3823
3833
|
*/
|
|
3824
3834
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
3825
3835
|
/**
|
|
3826
3836
|
* Disallow unnecessary spread.
|
|
3827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
3828
3838
|
*/
|
|
3829
3839
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
3830
3840
|
/**
|
|
3831
3841
|
* Disallow useless case in switch statements.
|
|
3832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
3833
3843
|
*/
|
|
3834
3844
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
3835
3845
|
/**
|
|
3836
3846
|
* Disallow useless `undefined`.
|
|
3837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
3838
3848
|
*/
|
|
3839
3849
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
3840
3850
|
/**
|
|
3841
3851
|
* Disallow number literals with zero fractions or dangling dots.
|
|
3842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
3843
3853
|
*/
|
|
3844
3854
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
3845
3855
|
/**
|
|
3846
3856
|
* Enforce proper case for numeric literals.
|
|
3847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
3848
3858
|
*/
|
|
3849
3859
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
3850
3860
|
/**
|
|
3851
3861
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
3852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
3853
3863
|
*/
|
|
3854
3864
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
3855
3865
|
/**
|
|
3856
3866
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
3857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
3858
3868
|
*/
|
|
3859
3869
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
3860
3870
|
/**
|
|
3861
3871
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
3862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
3863
3873
|
*/
|
|
3864
3874
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
3865
3875
|
/**
|
|
3866
3876
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
3867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
3868
3878
|
*/
|
|
3869
3879
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
3870
3880
|
/**
|
|
3871
3881
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
3872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
3873
3883
|
*/
|
|
3874
3884
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
3875
3885
|
/**
|
|
3876
3886
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
3877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
3878
3888
|
*/
|
|
3879
3889
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
3880
3890
|
/**
|
|
3881
3891
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
3882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
3883
3893
|
*/
|
|
3884
3894
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
3885
3895
|
/**
|
|
3886
3896
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
3887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
3888
3898
|
*/
|
|
3889
3899
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
3890
3900
|
/**
|
|
3891
3901
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
3892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
3893
3903
|
*/
|
|
3894
3904
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
3905
|
+
/**
|
|
3906
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
3907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
3908
|
+
*/
|
|
3909
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
3895
3910
|
/**
|
|
3896
3911
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
3897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
3898
3913
|
*/
|
|
3899
3914
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
3900
3915
|
/**
|
|
3901
3916
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
3902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
3903
3918
|
*/
|
|
3904
3919
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
3905
3920
|
/**
|
|
3906
3921
|
* Prefer default parameters over reassignment.
|
|
3907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
3908
3923
|
*/
|
|
3909
3924
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
3910
3925
|
/**
|
|
3911
3926
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
3912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
3913
3928
|
*/
|
|
3914
3929
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
3915
3930
|
/**
|
|
3916
3931
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
3917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
3918
3933
|
*/
|
|
3919
3934
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
3920
3935
|
/**
|
|
3921
3936
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
3922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
3923
3938
|
*/
|
|
3924
3939
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
3925
3940
|
/**
|
|
3926
3941
|
* Prefer `.textContent` over `.innerText`.
|
|
3927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
3928
3943
|
*/
|
|
3929
3944
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
3930
3945
|
/**
|
|
3931
3946
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
3932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
3933
3948
|
*/
|
|
3934
3949
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
3935
3950
|
/**
|
|
3936
3951
|
* Prefer `export…from` when re-exporting.
|
|
3937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
3938
3953
|
*/
|
|
3939
3954
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
3940
3955
|
/**
|
|
3941
3956
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
3942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
3943
3958
|
*/
|
|
3944
3959
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
3945
3960
|
/**
|
|
3946
3961
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
3947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
3948
3963
|
*/
|
|
3949
3964
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
3950
3965
|
/**
|
|
3951
3966
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
3952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
3953
3968
|
*/
|
|
3954
3969
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
3955
3970
|
/**
|
|
3956
3971
|
* Prefer reading a JSON file as a buffer.
|
|
3957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
3958
3973
|
*/
|
|
3959
3974
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
3960
3975
|
/**
|
|
3961
3976
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
3962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
3963
3978
|
*/
|
|
3964
3979
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
3965
3980
|
/**
|
|
3966
3981
|
* Prefer using a logical operator over a ternary.
|
|
3967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
3968
3983
|
*/
|
|
3969
3984
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
3970
3985
|
/**
|
|
3971
3986
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
3972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
3973
3988
|
*/
|
|
3974
3989
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
3975
3990
|
/**
|
|
3976
3991
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
3977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
3978
3993
|
*/
|
|
3979
3994
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
3980
3995
|
/**
|
|
3981
3996
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
3982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
3983
3998
|
*/
|
|
3984
3999
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
3985
4000
|
/**
|
|
3986
4001
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
3987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
3988
4003
|
*/
|
|
3989
4004
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
3990
4005
|
/**
|
|
3991
4006
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
3992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
3993
4008
|
*/
|
|
3994
4009
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
3995
4010
|
/**
|
|
3996
4011
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
3997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
3998
4013
|
*/
|
|
3999
4014
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
4000
4015
|
/**
|
|
4001
4016
|
* Prefer negative index over `.length - index` when possible.
|
|
4002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
4003
4018
|
*/
|
|
4004
4019
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
4005
4020
|
/**
|
|
4006
4021
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
4008
4023
|
*/
|
|
4009
4024
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
4010
4025
|
/**
|
|
4011
4026
|
* Prefer `Number` static properties over global ones.
|
|
4012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
4013
4028
|
*/
|
|
4014
4029
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
4015
4030
|
/**
|
|
4016
4031
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
4018
4033
|
*/
|
|
4019
4034
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
4020
4035
|
/**
|
|
4021
4036
|
* Prefer omitting the `catch` binding parameter.
|
|
4022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4023
4038
|
*/
|
|
4024
4039
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
4025
4040
|
/**
|
|
4026
4041
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
4028
4043
|
*/
|
|
4029
4044
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
4030
4045
|
/**
|
|
4031
4046
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
4033
4048
|
*/
|
|
4034
4049
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
4035
4050
|
/**
|
|
4036
4051
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
4038
4053
|
*/
|
|
4039
4054
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
4040
4055
|
/**
|
|
4041
4056
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
4043
4058
|
*/
|
|
4044
4059
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
4045
4060
|
/**
|
|
4046
4061
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
4048
4063
|
*/
|
|
4049
4064
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
4050
4065
|
/**
|
|
4051
4066
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
4052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
4053
4068
|
*/
|
|
4054
4069
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
4055
4070
|
/**
|
|
4056
4071
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
4057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
4058
4073
|
*/
|
|
4059
4074
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
4060
4075
|
/**
|
|
4061
4076
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
4063
4078
|
*/
|
|
4064
4079
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
4065
4080
|
/**
|
|
4066
4081
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
4068
4083
|
*/
|
|
4069
4084
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4070
4085
|
/**
|
|
4071
4086
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
4073
4088
|
*/
|
|
4074
4089
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4075
4090
|
/**
|
|
4076
4091
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
4078
4093
|
*/
|
|
4079
4094
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4080
4095
|
/**
|
|
4081
4096
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4083
4098
|
*/
|
|
4084
4099
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4085
4100
|
/**
|
|
4086
4101
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4088
4103
|
*/
|
|
4089
4104
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4090
4105
|
/**
|
|
4091
4106
|
* Prefer using `structuredClone` to create a deep clone.
|
|
4092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
4093
4108
|
*/
|
|
4094
4109
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4095
4110
|
/**
|
|
4096
4111
|
* Prefer `switch` over multiple `else-if`.
|
|
4097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
4098
4113
|
*/
|
|
4099
4114
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4100
4115
|
/**
|
|
4101
4116
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
4102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
4103
4118
|
*/
|
|
4104
4119
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4105
4120
|
/**
|
|
4106
4121
|
* Prefer top-level await over top-level promises and async function calls.
|
|
4107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
4108
4123
|
*/
|
|
4109
4124
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
4110
4125
|
/**
|
|
4111
4126
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
4112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
4113
4128
|
*/
|
|
4114
4129
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
4115
4130
|
/**
|
|
4116
4131
|
* Prevent abbreviations.
|
|
4117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
4118
4133
|
*/
|
|
4119
4134
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
4120
4135
|
/**
|
|
4121
4136
|
* Enforce consistent relative URL style.
|
|
4122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
4123
4138
|
*/
|
|
4124
4139
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
4125
4140
|
/**
|
|
4126
4141
|
* Enforce using the separator argument with `Array#join()`.
|
|
4127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
4128
4143
|
*/
|
|
4129
4144
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
4145
|
+
/**
|
|
4146
|
+
* Require non-empty specifier list in import and export statements.
|
|
4147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
4148
|
+
*/
|
|
4149
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
4130
4150
|
/**
|
|
4131
4151
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4133
4153
|
*/
|
|
4134
4154
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
4135
4155
|
/**
|
|
4136
4156
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
4138
4158
|
*/
|
|
4139
4159
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
4140
4160
|
/**
|
|
4141
4161
|
* Enforce better string content.
|
|
4142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
4143
4163
|
*/
|
|
4144
4164
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
4145
4165
|
/**
|
|
4146
4166
|
* Enforce consistent brace style for `case` clauses.
|
|
4147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
4148
4168
|
*/
|
|
4149
4169
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
4150
4170
|
/**
|
|
4151
4171
|
* Fix whitespace-insensitive template indentation.
|
|
4152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
4153
4173
|
*/
|
|
4154
4174
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
4155
4175
|
/**
|
|
4156
4176
|
* Enforce consistent case for text encoding identifiers.
|
|
4157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4158
4178
|
*/
|
|
4159
4179
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
4160
4180
|
/**
|
|
4161
4181
|
* Require `new` when creating an error.
|
|
4162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
4163
4183
|
*/
|
|
4164
4184
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
4165
4185
|
/**
|
|
@@ -5257,11 +5277,12 @@ type StylisticPaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
|
|
|
5257
5277
|
}]
|
|
5258
5278
|
// ----- @stylistic/padding-line-between-statements -----
|
|
5259
5279
|
type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
|
|
5260
|
-
type
|
|
5280
|
+
type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementType | [_StylisticPaddingLineBetweenStatementsStatementType, ...(_StylisticPaddingLineBetweenStatementsStatementType)[]])
|
|
5281
|
+
type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "return" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using")
|
|
5261
5282
|
type StylisticPaddingLineBetweenStatements = {
|
|
5262
5283
|
blankLine: _StylisticPaddingLineBetweenStatementsPaddingType
|
|
5263
|
-
prev:
|
|
5264
|
-
next:
|
|
5284
|
+
prev: _StylisticPaddingLineBetweenStatementsStatementOption
|
|
5285
|
+
next: _StylisticPaddingLineBetweenStatementsStatementOption
|
|
5265
5286
|
}[]
|
|
5266
5287
|
// ----- @stylistic/quote-props -----
|
|
5267
5288
|
type StylisticQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
@@ -6303,7 +6324,6 @@ type TypescriptEslintPreferDestructuring = []|[({
|
|
|
6303
6324
|
enforceForDeclarationWithTypeAnnotation?: boolean
|
|
6304
6325
|
|
|
6305
6326
|
enforceForRenamedProperties?: boolean
|
|
6306
|
-
[k: string]: unknown | undefined
|
|
6307
6327
|
}]
|
|
6308
6328
|
// ----- @typescript-eslint/prefer-literal-enum-member -----
|
|
6309
6329
|
type TypescriptEslintPreferLiteralEnumMember = []|[{
|
|
@@ -6332,7 +6352,6 @@ type TypescriptEslintPreferNullishCoalescing = []|[{
|
|
|
6332
6352
|
number?: boolean
|
|
6333
6353
|
|
|
6334
6354
|
string?: boolean
|
|
6335
|
-
[k: string]: unknown | undefined
|
|
6336
6355
|
} | true)
|
|
6337
6356
|
|
|
6338
6357
|
ignoreTernaryTests?: boolean
|
|
@@ -6552,6 +6571,7 @@ type AccessorPairs = []|[{
|
|
|
6552
6571
|
getWithoutSet?: boolean
|
|
6553
6572
|
setWithoutGet?: boolean
|
|
6554
6573
|
enforceForClassMembers?: boolean
|
|
6574
|
+
enforceForTSTypes?: boolean
|
|
6555
6575
|
}]
|
|
6556
6576
|
// ----- array-bracket-newline -----
|
|
6557
6577
|
type ArrayBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
@@ -6742,7 +6762,9 @@ type GetterReturn = []|[{
|
|
|
6742
6762
|
allowImplicit?: boolean
|
|
6743
6763
|
}]
|
|
6744
6764
|
// ----- grouped-accessor-pairs -----
|
|
6745
|
-
type GroupedAccessorPairs = []|[("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
6765
|
+
type GroupedAccessorPairs = []|[("anyOrder" | "getBeforeSet" | "setBeforeGet")]|[("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
6766
|
+
enforceForTSTypes?: boolean
|
|
6767
|
+
}]
|
|
6746
6768
|
// ----- handle-callback-err -----
|
|
6747
6769
|
type HandleCallbackErr = []|[string]
|
|
6748
6770
|
// ----- id-blacklist -----
|
|
@@ -8005,6 +8027,7 @@ type NoUnusedVars = []|[(("all" | "local") | {
|
|
|
8005
8027
|
caughtErrorsIgnorePattern?: string
|
|
8006
8028
|
destructuredArrayIgnorePattern?: string
|
|
8007
8029
|
ignoreClassWithStaticInitBlock?: boolean
|
|
8030
|
+
ignoreUsingDeclarations?: boolean
|
|
8008
8031
|
reportUsedIgnorePattern?: boolean
|
|
8009
8032
|
})]
|
|
8010
8033
|
// ----- no-use-before-define -----
|
|
@@ -11551,6 +11574,10 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
11551
11574
|
type UnicornNoArrayReduce = []|[{
|
|
11552
11575
|
allowSimpleOperations?: boolean
|
|
11553
11576
|
}]
|
|
11577
|
+
// ----- unicorn/no-array-reverse -----
|
|
11578
|
+
type UnicornNoArrayReverse = []|[{
|
|
11579
|
+
allowExpressionStatement?: boolean
|
|
11580
|
+
}]
|
|
11554
11581
|
// ----- unicorn/no-instanceof-builtins -----
|
|
11555
11582
|
type UnicornNoInstanceofBuiltins = []|[{
|
|
11556
11583
|
useErrorIsError?: boolean
|