@moso/eslint-config 3.3.0 → 3.5.0
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.mts +819 -394
- package/dist/index.mjs +117 -127
- package/package.json +43 -42
package/dist/index.d.mts
CHANGED
|
@@ -1875,6 +1875,11 @@ interface RuleOptions {
|
|
|
1875
1875
|
* @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging
|
|
1876
1876
|
*/
|
|
1877
1877
|
'@typescript-eslint/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]>;
|
|
1878
|
+
/**
|
|
1879
|
+
* Disallow assigning non-enum values to enum typed locations
|
|
1880
|
+
* @see https://typescript-eslint.io/rules/no-unsafe-enum-assignment
|
|
1881
|
+
*/
|
|
1882
|
+
'@typescript-eslint/no-unsafe-enum-assignment'?: Linter.RuleEntry<[]>;
|
|
1878
1883
|
/**
|
|
1879
1884
|
* Disallow comparing an enum value with a non-enum value
|
|
1880
1885
|
* @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
|
|
@@ -2459,7 +2464,7 @@ interface RuleOptions {
|
|
|
2459
2464
|
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
2460
2465
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
2461
2466
|
*/
|
|
2462
|
-
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<
|
|
2467
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<DeMorganNoNegatedDisjunction>;
|
|
2463
2468
|
/**
|
|
2464
2469
|
* Disallow dependencies in favor of more performant or secure alternatives
|
|
2465
2470
|
*/
|
|
@@ -2607,103 +2612,103 @@ interface RuleOptions {
|
|
|
2607
2612
|
'erasable-syntax-only/parameter-properties'?: Linter.RuleEntry<[]>;
|
|
2608
2613
|
/**
|
|
2609
2614
|
* Enforce functional parameters.
|
|
2610
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2615
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/functional-parameters.md
|
|
2611
2616
|
*/
|
|
2612
2617
|
'functional/functional-parameters'?: Linter.RuleEntry<FunctionalFunctionalParameters>;
|
|
2613
2618
|
/**
|
|
2614
2619
|
* Enforce treating data as immutable.
|
|
2615
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2620
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/immutable-data.md
|
|
2616
2621
|
*/
|
|
2617
2622
|
'functional/immutable-data'?: Linter.RuleEntry<FunctionalImmutableData>;
|
|
2618
2623
|
/**
|
|
2619
2624
|
* Disallow inheritance in classes.
|
|
2620
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2625
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-class-inheritance.md
|
|
2621
2626
|
*/
|
|
2622
2627
|
'functional/no-class-inheritance'?: Linter.RuleEntry<FunctionalNoClassInheritance>;
|
|
2623
2628
|
/**
|
|
2624
2629
|
* Disallow classes.
|
|
2625
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2630
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-classes.md
|
|
2626
2631
|
*/
|
|
2627
2632
|
'functional/no-classes'?: Linter.RuleEntry<FunctionalNoClasses>;
|
|
2628
2633
|
/**
|
|
2629
2634
|
* Disallow conditional statements.
|
|
2630
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2635
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-conditional-statements.md
|
|
2631
2636
|
*/
|
|
2632
2637
|
'functional/no-conditional-statements'?: Linter.RuleEntry<FunctionalNoConditionalStatements>;
|
|
2633
2638
|
/**
|
|
2634
2639
|
* Disallow expression statements.
|
|
2635
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2640
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-expression-statements.md
|
|
2636
2641
|
*/
|
|
2637
2642
|
'functional/no-expression-statements'?: Linter.RuleEntry<FunctionalNoExpressionStatements>;
|
|
2638
2643
|
/**
|
|
2639
2644
|
* Disallow mutable variables.
|
|
2640
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2645
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-let.md
|
|
2641
2646
|
*/
|
|
2642
2647
|
'functional/no-let'?: Linter.RuleEntry<FunctionalNoLet>;
|
|
2643
2648
|
/**
|
|
2644
2649
|
* Disallow imperative loops.
|
|
2645
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2650
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-loop-statements.md
|
|
2646
2651
|
*/
|
|
2647
2652
|
'functional/no-loop-statements'?: Linter.RuleEntry<[]>;
|
|
2648
2653
|
/**
|
|
2649
2654
|
* Restrict types so that only members of the same kind are allowed in them.
|
|
2650
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2655
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-mixed-types.md
|
|
2651
2656
|
*/
|
|
2652
2657
|
'functional/no-mixed-types'?: Linter.RuleEntry<FunctionalNoMixedTypes>;
|
|
2653
2658
|
/**
|
|
2654
2659
|
* Disallow rejecting promises.
|
|
2655
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2660
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-promise-reject.md
|
|
2656
2661
|
*/
|
|
2657
2662
|
'functional/no-promise-reject'?: Linter.RuleEntry<[]>;
|
|
2658
2663
|
/**
|
|
2659
2664
|
* Disallow functions that don't return anything.
|
|
2660
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2665
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-return-void.md
|
|
2661
2666
|
*/
|
|
2662
2667
|
'functional/no-return-void'?: Linter.RuleEntry<FunctionalNoReturnVoid>;
|
|
2663
2668
|
/**
|
|
2664
2669
|
* Disallow this access.
|
|
2665
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2670
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-this-expressions.md
|
|
2666
2671
|
*/
|
|
2667
2672
|
'functional/no-this-expressions'?: Linter.RuleEntry<[]>;
|
|
2668
2673
|
/**
|
|
2669
2674
|
* Disallow throwing exceptions.
|
|
2670
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2675
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-throw-statements.md
|
|
2671
2676
|
*/
|
|
2672
2677
|
'functional/no-throw-statements'?: Linter.RuleEntry<FunctionalNoThrowStatements>;
|
|
2673
2678
|
/**
|
|
2674
2679
|
* Disallow try-catch[-finally] and try-finally patterns.
|
|
2675
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2680
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/no-try-statements.md
|
|
2676
2681
|
*/
|
|
2677
2682
|
'functional/no-try-statements'?: Linter.RuleEntry<FunctionalNoTryStatements>;
|
|
2678
2683
|
/**
|
|
2679
2684
|
* Require function parameters to be typed as certain immutability
|
|
2680
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2685
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/prefer-immutable-types.md
|
|
2681
2686
|
*/
|
|
2682
2687
|
'functional/prefer-immutable-types'?: Linter.RuleEntry<FunctionalPreferImmutableTypes>;
|
|
2683
2688
|
/**
|
|
2684
2689
|
* Prefer property signatures over method signatures.
|
|
2685
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2690
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/prefer-property-signatures.md
|
|
2686
2691
|
*/
|
|
2687
2692
|
'functional/prefer-property-signatures'?: Linter.RuleEntry<FunctionalPreferPropertySignatures>;
|
|
2688
2693
|
/**
|
|
2689
2694
|
* Prefer readonly types over mutable types.
|
|
2690
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2695
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/prefer-readonly-type.md
|
|
2691
2696
|
* @deprecated
|
|
2692
2697
|
*/
|
|
2693
2698
|
'functional/prefer-readonly-type'?: Linter.RuleEntry<FunctionalPreferReadonlyType>;
|
|
2694
2699
|
/**
|
|
2695
2700
|
* Replaces `x => f(x)` with just `f`.
|
|
2696
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2701
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/prefer-tacit.md
|
|
2697
2702
|
*/
|
|
2698
2703
|
'functional/prefer-tacit'?: Linter.RuleEntry<FunctionalPreferTacit>;
|
|
2699
2704
|
/**
|
|
2700
2705
|
* Require consistently using either `readonly` keywords or `Readonly<T>`
|
|
2701
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2706
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/readonly-type.md
|
|
2702
2707
|
*/
|
|
2703
2708
|
'functional/readonly-type'?: Linter.RuleEntry<FunctionalReadonlyType>;
|
|
2704
2709
|
/**
|
|
2705
2710
|
* Enforce the immutability of types based on patterns.
|
|
2706
|
-
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.
|
|
2711
|
+
* @see https://github.com/eslint-functional/eslint-plugin-functional/blob/v10.0.1/docs/rules/type-declaration-immutability.md
|
|
2707
2712
|
*/
|
|
2708
2713
|
'functional/type-declaration-immutability'?: Linter.RuleEntry<FunctionalTypeDeclarationImmutability>;
|
|
2709
2714
|
/**
|
|
@@ -2790,7 +2795,7 @@ interface RuleOptions {
|
|
|
2790
2795
|
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
|
|
2791
2796
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header
|
|
2792
2797
|
*/
|
|
2793
|
-
'jsdoc/check-syntax'?: Linter.RuleEntry<
|
|
2798
|
+
'jsdoc/check-syntax'?: Linter.RuleEntry<JsdocCheckSyntax>;
|
|
2794
2799
|
/**
|
|
2795
2800
|
* Reports invalid block tag names.
|
|
2796
2801
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header
|
|
@@ -3105,6 +3110,11 @@ interface RuleOptions {
|
|
|
3105
3110
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
3106
3111
|
*/
|
|
3107
3112
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Disallows (or requires descriptions for) `@ts-<directive>` comments, mirroring `@typescript-eslint/ban-ts-comment`.
|
|
3115
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-ban-ts-comment.md#repos-sticky-header
|
|
3116
|
+
*/
|
|
3117
|
+
'jsdoc/ts-ban-ts-comment'?: Linter.RuleEntry<JsdocTsBanTsComment>;
|
|
3108
3118
|
/**
|
|
3109
3119
|
* Prefers either function properties or method signatures
|
|
3110
3120
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
@@ -4586,6 +4596,81 @@ interface RuleOptions {
|
|
|
4586
4596
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html
|
|
4587
4597
|
*/
|
|
4588
4598
|
'regexp/use-ignore-case'?: Linter.RuleEntry<[]>;
|
|
4599
|
+
/**
|
|
4600
|
+
* Detects trojan source attacks that employ unicode bidi attacks to inject malicious code.
|
|
4601
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-bidi-characters.md
|
|
4602
|
+
*/
|
|
4603
|
+
'security/detect-bidi-characters'?: Linter.RuleEntry<[]>;
|
|
4604
|
+
/**
|
|
4605
|
+
* Detects calls to "buffer" with "noAssert" flag set.
|
|
4606
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-buffer-noassert.md
|
|
4607
|
+
*/
|
|
4608
|
+
'security/detect-buffer-noassert'?: Linter.RuleEntry<[]>;
|
|
4609
|
+
/**
|
|
4610
|
+
* Detects instances of "child_process" & non-literal "exec()" calls.
|
|
4611
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-child-process.md
|
|
4612
|
+
*/
|
|
4613
|
+
'security/detect-child-process'?: Linter.RuleEntry<[]>;
|
|
4614
|
+
/**
|
|
4615
|
+
* Detects "object.escapeMarkup = false", which can be used with some template engines to disable escaping of HTML entities.
|
|
4616
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-disable-mustache-escape.md
|
|
4617
|
+
*/
|
|
4618
|
+
'security/detect-disable-mustache-escape'?: Linter.RuleEntry<[]>;
|
|
4619
|
+
/**
|
|
4620
|
+
* Detects "eval(variable)" which can allow an attacker to run arbitrary code inside your process.
|
|
4621
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-eval-with-expression.md
|
|
4622
|
+
*/
|
|
4623
|
+
'security/detect-eval-with-expression'?: Linter.RuleEntry<[]>;
|
|
4624
|
+
/**
|
|
4625
|
+
* Detects invisible characters that have no visible glyph and can be used to hide malicious code.
|
|
4626
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-invisible-characters.md
|
|
4627
|
+
*/
|
|
4628
|
+
'security/detect-invisible-characters'?: Linter.RuleEntry<[]>;
|
|
4629
|
+
/**
|
|
4630
|
+
* Detects instances of new Buffer(argument) where argument is any non-literal value.
|
|
4631
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-new-buffer.md
|
|
4632
|
+
*/
|
|
4633
|
+
'security/detect-new-buffer'?: Linter.RuleEntry<[]>;
|
|
4634
|
+
/**
|
|
4635
|
+
* Detects Express "csrf" middleware setup before "method-override" middleware.
|
|
4636
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-no-csrf-before-method-override.md
|
|
4637
|
+
*/
|
|
4638
|
+
'security/detect-no-csrf-before-method-override'?: Linter.RuleEntry<[]>;
|
|
4639
|
+
/**
|
|
4640
|
+
* Detects variable in filename argument of "fs" calls, which might allow an attacker to access anything on your system.
|
|
4641
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-fs-filename.md
|
|
4642
|
+
*/
|
|
4643
|
+
'security/detect-non-literal-fs-filename'?: Linter.RuleEntry<[]>;
|
|
4644
|
+
/**
|
|
4645
|
+
* Detects "RegExp(variable)", which might allow an attacker to DOS your server with a long-running regular expression.
|
|
4646
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-regexp.md
|
|
4647
|
+
*/
|
|
4648
|
+
'security/detect-non-literal-regexp'?: Linter.RuleEntry<[]>;
|
|
4649
|
+
/**
|
|
4650
|
+
* Detects "require(variable)", which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk.
|
|
4651
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-require.md
|
|
4652
|
+
*/
|
|
4653
|
+
'security/detect-non-literal-require'?: Linter.RuleEntry<[]>;
|
|
4654
|
+
/**
|
|
4655
|
+
* Detects "variable[key]" as a left- or right-hand assignment operand.
|
|
4656
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-object-injection.md
|
|
4657
|
+
*/
|
|
4658
|
+
'security/detect-object-injection'?: Linter.RuleEntry<[]>;
|
|
4659
|
+
/**
|
|
4660
|
+
* Detects insecure comparisons (`==`, `!=`, `!==` and `===`), which check input sequentially.
|
|
4661
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-possible-timing-attacks.md
|
|
4662
|
+
*/
|
|
4663
|
+
'security/detect-possible-timing-attacks'?: Linter.RuleEntry<[]>;
|
|
4664
|
+
/**
|
|
4665
|
+
* Detects if "pseudoRandomBytes()" is in use, which might not give you the randomness you need and expect.
|
|
4666
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-pseudoRandomBytes.md
|
|
4667
|
+
*/
|
|
4668
|
+
'security/detect-pseudoRandomBytes'?: Linter.RuleEntry<[]>;
|
|
4669
|
+
/**
|
|
4670
|
+
* Detects potentially unsafe regular expressions, which may take a very long time to run, blocking the event loop.
|
|
4671
|
+
* @see https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-unsafe-regex.md
|
|
4672
|
+
*/
|
|
4673
|
+
'security/detect-unsafe-regex'?: Linter.RuleEntry<[]>;
|
|
4589
4674
|
/**
|
|
4590
4675
|
* Enforce canonical class names.
|
|
4591
4676
|
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md
|
|
@@ -4784,1740 +4869,1992 @@ interface RuleOptions {
|
|
|
4784
4869
|
'toml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
4785
4870
|
/**
|
|
4786
4871
|
* Prefer better DOM traversal APIs.
|
|
4787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/better-dom-traversing.md
|
|
4788
4873
|
*/
|
|
4789
4874
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
4790
4875
|
/**
|
|
4791
4876
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
4792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
4793
4878
|
* @deprecated
|
|
4794
4879
|
*/
|
|
4795
4880
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
4796
4881
|
/**
|
|
4797
4882
|
* Enforce a specific parameter name in catch clauses.
|
|
4798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/catch-error-name.md
|
|
4799
4884
|
*/
|
|
4800
4885
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4801
4886
|
/**
|
|
4802
4887
|
* Enforce consistent class references in static methods.
|
|
4803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/class-reference-in-static-methods.md
|
|
4804
4889
|
*/
|
|
4805
4890
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
4891
|
+
/**
|
|
4892
|
+
* Enforce consistent spacing before and after commas in JSON.
|
|
4893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comma-spacing.md
|
|
4894
|
+
*/
|
|
4895
|
+
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
4806
4896
|
/**
|
|
4807
4897
|
* Enforce better comment content.
|
|
4808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comment-content.md
|
|
4809
4899
|
*/
|
|
4810
4900
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
4811
4901
|
/**
|
|
4812
4902
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
4813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-arrow-return-style.md
|
|
4814
4904
|
*/
|
|
4815
4905
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
4816
4906
|
/**
|
|
4817
4907
|
* Enforce consistent assertion style with `node:assert`.
|
|
4818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-assert.md
|
|
4819
4909
|
*/
|
|
4820
4910
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4821
4911
|
/**
|
|
4822
4912
|
* Enforce consistent naming for boolean names.
|
|
4823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-boolean-name.md
|
|
4824
4914
|
*/
|
|
4825
4915
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
4826
4916
|
/**
|
|
4827
4917
|
* Enforce consistent class member order.
|
|
4828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-class-member-order.md
|
|
4829
4919
|
*/
|
|
4830
4920
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
4831
4921
|
/**
|
|
4832
4922
|
* Enforce consistent spelling of compound words in identifiers.
|
|
4833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-compound-words.md
|
|
4834
4924
|
*/
|
|
4835
4925
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
4836
4926
|
/**
|
|
4837
4927
|
* Enforce consistent conditional object spread style.
|
|
4838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
4839
4929
|
*/
|
|
4840
4930
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
4841
4931
|
/**
|
|
4842
4932
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-date-clone.md
|
|
4844
4934
|
*/
|
|
4845
4935
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4846
4936
|
/**
|
|
4847
4937
|
* Use destructured variables over properties.
|
|
4848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-destructuring.md
|
|
4849
4939
|
*/
|
|
4850
4940
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4851
4941
|
/**
|
|
4852
4942
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4854
4944
|
*/
|
|
4855
4945
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4856
4946
|
/**
|
|
4857
4947
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-existence-index-check.md
|
|
4859
4949
|
*/
|
|
4860
4950
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4861
4951
|
/**
|
|
4862
4952
|
* Enforce consistent decorator position on exported classes.
|
|
4863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-export-decorator-position.md
|
|
4864
4954
|
*/
|
|
4865
4955
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
4866
4956
|
/**
|
|
4867
4957
|
* Move function definitions to the highest possible scope.
|
|
4868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-scoping.md
|
|
4869
4959
|
*/
|
|
4870
4960
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4871
4961
|
/**
|
|
4872
4962
|
* Enforce function syntax by role.
|
|
4873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-style.md
|
|
4874
4964
|
*/
|
|
4875
4965
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
4876
4966
|
/**
|
|
4877
4967
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
4878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-json-file-read.md
|
|
4879
4969
|
*/
|
|
4880
4970
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
4881
4971
|
/**
|
|
4882
4972
|
* Enforce consistent optional chaining for same-base member access.
|
|
4883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-optional-chaining.md
|
|
4884
4974
|
*/
|
|
4885
4975
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
4886
4976
|
/**
|
|
4887
4977
|
* Enforce consistent style for escaping `${` in template literals.
|
|
4888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-template-literal-escape.md
|
|
4889
4979
|
*/
|
|
4890
4980
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
4891
4981
|
/**
|
|
4892
4982
|
* Enforce consistent labels on tuple type elements.
|
|
4893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-tuple-labels.md
|
|
4894
4984
|
*/
|
|
4895
4985
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
4896
4986
|
/**
|
|
4897
4987
|
* Enforce correct `Error` subclassing.
|
|
4898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/custom-error-definition.md
|
|
4899
4989
|
*/
|
|
4900
4990
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4901
4991
|
/**
|
|
4902
4992
|
* Enforce consistent default export declarations.
|
|
4903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/default-export-style.md
|
|
4904
4994
|
*/
|
|
4905
4995
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
4906
4996
|
/**
|
|
4907
4997
|
* Enforce consistent style for DOM element dataset access.
|
|
4908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/dom-node-dataset.md
|
|
4909
4999
|
*/
|
|
4910
5000
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
4911
5001
|
/**
|
|
4912
5002
|
* Enforce no spaces between braces.
|
|
4913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/empty-brace-spaces.md
|
|
4914
5004
|
*/
|
|
4915
5005
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4916
5006
|
/**
|
|
4917
5007
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/error-message.md
|
|
4919
5009
|
*/
|
|
4920
5010
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4921
5011
|
/**
|
|
4922
5012
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/escape-case.md
|
|
4924
5014
|
*/
|
|
4925
5015
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4926
5016
|
/**
|
|
4927
5017
|
* Add expiration conditions to TODO comments.
|
|
4928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/expiring-todo-comments.md
|
|
4929
5019
|
*/
|
|
4930
5020
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4931
5021
|
/**
|
|
4932
5022
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-length-check.md
|
|
4934
5024
|
*/
|
|
4935
5025
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4936
5026
|
/**
|
|
4937
5027
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
4938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-timer-delay.md
|
|
4939
5029
|
*/
|
|
4940
5030
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
4941
5031
|
/**
|
|
4942
5032
|
* Enforce a case style for filenames and directory names.
|
|
4943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/filename-case.md
|
|
4944
5034
|
*/
|
|
4945
5035
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4946
5036
|
/**
|
|
4947
5037
|
* Require identifiers to match a specified regular expression.
|
|
4948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/id-match.md
|
|
4949
5039
|
*/
|
|
4950
5040
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
4951
5041
|
/**
|
|
4952
5042
|
* Enforce specific import styles per module.
|
|
4953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/import-style.md
|
|
4954
5044
|
*/
|
|
4955
5045
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5046
|
+
/**
|
|
5047
|
+
* Enforce consistent indentation in JSON and CSS.
|
|
5048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/indent.md
|
|
5049
|
+
*/
|
|
5050
|
+
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
4956
5051
|
/**
|
|
4957
5052
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
4958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/isolated-functions.md
|
|
4959
5054
|
*/
|
|
4960
5055
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
4961
5056
|
/**
|
|
4962
5057
|
* Enforce a consistent style for optional loop sources.
|
|
4963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/iteration-fallback-style.md
|
|
4964
5059
|
*/
|
|
4965
5060
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
5061
|
+
/**
|
|
5062
|
+
* Enforce a case style for data keys.
|
|
5063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/key-name-casing.md
|
|
5064
|
+
*/
|
|
5065
|
+
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
4966
5066
|
/**
|
|
4967
5067
|
* Require or disallow logical assignment operator shorthand
|
|
4968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/logical-assignment-operators.md
|
|
4969
5069
|
*/
|
|
4970
5070
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
4971
5071
|
/**
|
|
4972
5072
|
* Limit the depth of nested calls.
|
|
4973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/max-nested-calls.md
|
|
4974
5074
|
*/
|
|
4975
5075
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
4976
5076
|
/**
|
|
4977
5077
|
* Enforce replacements for variable, property, and filenames.
|
|
4978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/name-replacements.md
|
|
4979
5079
|
*/
|
|
4980
5080
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
4981
5081
|
/**
|
|
4982
5082
|
* Enforce correct use of `new` for builtin constructors.
|
|
4983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/new-for-builtins.md
|
|
4984
5084
|
*/
|
|
4985
5085
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4986
5086
|
/**
|
|
4987
5087
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4989
5089
|
*/
|
|
4990
5090
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4991
5091
|
/**
|
|
4992
5092
|
* Disallow recursive access to `this` within getters and setters.
|
|
4993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accessor-recursion.md
|
|
4994
5094
|
*/
|
|
4995
5095
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
4996
5096
|
/**
|
|
4997
5097
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
4998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
4999
5099
|
*/
|
|
5000
5100
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
5001
5101
|
/**
|
|
5002
5102
|
* Disallow anonymous functions and classes as the default export.
|
|
5003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-anonymous-default-export.md
|
|
5004
5104
|
*/
|
|
5005
5105
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5006
5106
|
/**
|
|
5007
5107
|
* Prevent passing a function reference directly to iterator methods.
|
|
5008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-callback-reference.md
|
|
5009
5109
|
*/
|
|
5010
5110
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
5011
5111
|
/**
|
|
5012
5112
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
5013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-concat-in-loop.md
|
|
5014
5114
|
*/
|
|
5015
5115
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
5016
5116
|
/**
|
|
5017
5117
|
* Disallow using reference values as `Array#fill()` values.
|
|
5018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
5019
5119
|
*/
|
|
5020
5120
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
5021
5121
|
/**
|
|
5022
5122
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
5023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-from-fill.md
|
|
5024
5124
|
*/
|
|
5025
5125
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
5026
5126
|
/**
|
|
5027
5127
|
* Disallow front-of-array mutation.
|
|
5028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-front-mutation.md
|
|
5029
5129
|
*/
|
|
5030
5130
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
5031
5131
|
/**
|
|
5032
5132
|
* Disallow using the `this` argument in array methods.
|
|
5033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-method-this-argument.md
|
|
5034
5134
|
*/
|
|
5035
5135
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5036
5136
|
/**
|
|
5037
5137
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5039
5139
|
* @deprecated
|
|
5040
5140
|
*/
|
|
5041
5141
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5042
5142
|
/**
|
|
5043
5143
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reduce.md
|
|
5045
5145
|
*/
|
|
5046
5146
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5047
5147
|
/**
|
|
5048
5148
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reverse.md
|
|
5050
5150
|
*/
|
|
5051
5151
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5052
5152
|
/**
|
|
5053
5153
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort.md
|
|
5055
5155
|
*/
|
|
5056
5156
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5057
5157
|
/**
|
|
5058
5158
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
5059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
5060
5160
|
*/
|
|
5061
5161
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
5062
5162
|
/**
|
|
5063
5163
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
5064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-splice.md
|
|
5065
5165
|
*/
|
|
5066
5166
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
5067
5167
|
/**
|
|
5068
|
-
* Disallow asterisk prefixes in
|
|
5069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5168
|
+
* Disallow asterisk prefixes in multiline comments.
|
|
5169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
5070
5170
|
*/
|
|
5071
5171
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
5172
|
+
/**
|
|
5173
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
5174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-iterator-callback.md
|
|
5175
|
+
*/
|
|
5176
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
5072
5177
|
/**
|
|
5073
5178
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
5074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-promise-finally.md
|
|
5075
5180
|
*/
|
|
5076
5181
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
5077
5182
|
/**
|
|
5078
5183
|
* Disallow member access from await expression.
|
|
5079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-expression-member.md
|
|
5080
5185
|
*/
|
|
5081
5186
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5082
5187
|
/**
|
|
5083
5188
|
* Disallow using `await` in `Promise` method parameters.
|
|
5084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5085
5190
|
*/
|
|
5086
5191
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5087
5192
|
/**
|
|
5088
5193
|
* Disallow barrel files.
|
|
5089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-barrel-files.md
|
|
5090
5195
|
*/
|
|
5091
5196
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
5092
5197
|
/**
|
|
5093
5198
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
5094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-blob-to-file.md
|
|
5095
5200
|
*/
|
|
5096
5201
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
5097
5202
|
/**
|
|
5098
5203
|
* Disallow boolean-returning sort comparators.
|
|
5099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
5100
5205
|
*/
|
|
5101
5206
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
5102
5207
|
/**
|
|
5103
|
-
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
5104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5208
|
+
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
5209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-break-in-nested-loop.md
|
|
5105
5210
|
*/
|
|
5106
|
-
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<
|
|
5211
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
5107
5212
|
/**
|
|
5108
5213
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
5109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-canvas-to-image.md
|
|
5110
5215
|
*/
|
|
5111
5216
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
5112
5217
|
/**
|
|
5113
5218
|
* Disallow chained comparisons such as `a < b < c`.
|
|
5114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-chained-comparison.md
|
|
5115
5220
|
*/
|
|
5116
5221
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
5117
5222
|
/**
|
|
5118
5223
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
5119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-collection-bracket-access.md
|
|
5120
5225
|
*/
|
|
5121
5226
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
5122
5227
|
/**
|
|
5123
5228
|
* Disallow dynamic object property existence checks.
|
|
5124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-computed-property-existence-check.md
|
|
5125
5230
|
*/
|
|
5126
5231
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
5232
|
+
/**
|
|
5233
|
+
* Disallow conflicting CSS query and HTML form constraints.
|
|
5234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-conflicting-constraints.md
|
|
5235
|
+
*/
|
|
5236
|
+
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
5127
5237
|
/**
|
|
5128
5238
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
5129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-splice.md
|
|
5130
5240
|
*/
|
|
5131
5241
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
5132
5242
|
/**
|
|
5133
5243
|
* Disallow confusing uses of `Array#with()`.
|
|
5134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-with.md
|
|
5135
5245
|
*/
|
|
5136
5246
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
5137
5247
|
/**
|
|
5138
5248
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-console-spaces.md
|
|
5140
5250
|
*/
|
|
5141
5251
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5142
5252
|
/**
|
|
5143
5253
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
5144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-constant-zero-expression.md
|
|
5145
5255
|
*/
|
|
5146
5256
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
5147
5257
|
/**
|
|
5148
5258
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
5149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
5150
5260
|
*/
|
|
5151
5261
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
5262
|
+
/**
|
|
5263
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
5264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
5265
|
+
* @deprecated
|
|
5266
|
+
*/
|
|
5267
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
5152
5268
|
/**
|
|
5153
5269
|
* Do not use `document.cookie` directly.
|
|
5154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-document-cookie.md
|
|
5155
5271
|
*/
|
|
5156
5272
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5157
5273
|
/**
|
|
5158
5274
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
5159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-double-comparison.md
|
|
5160
5276
|
*/
|
|
5161
5277
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
5278
|
+
/**
|
|
5279
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
5280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
5281
|
+
* @deprecated
|
|
5282
|
+
*/
|
|
5283
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
5284
|
+
/**
|
|
5285
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
5286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
5287
|
+
* @deprecated
|
|
5288
|
+
*/
|
|
5289
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
5162
5290
|
/**
|
|
5163
5291
|
* Disallow duplicate adjacent branches in if chains.
|
|
5164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-if-branches.md
|
|
5165
5293
|
*/
|
|
5166
5294
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
5167
5295
|
/**
|
|
5168
5296
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
5169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
5170
5298
|
*/
|
|
5171
5299
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
5172
5300
|
/**
|
|
5173
5301
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
5174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-loops.md
|
|
5175
5303
|
*/
|
|
5176
5304
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
5177
5305
|
/**
|
|
5178
5306
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
5179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-set-values.md
|
|
5180
5308
|
*/
|
|
5181
5309
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
5182
5310
|
/**
|
|
5183
5311
|
* Disallow empty files.
|
|
5184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-file.md
|
|
5185
5313
|
*/
|
|
5186
5314
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
5315
|
+
/**
|
|
5316
|
+
* Disallow empty link text in Markdown.
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-link-text.md
|
|
5318
|
+
*/
|
|
5319
|
+
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
5187
5320
|
/**
|
|
5188
5321
|
* Disallow assigning to built-in error properties.
|
|
5189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-error-property-assignment.md
|
|
5190
5323
|
*/
|
|
5191
5324
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5192
5325
|
/**
|
|
5193
5326
|
* Disallow exports in scripts.
|
|
5194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-exports-in-scripts.md
|
|
5195
5328
|
*/
|
|
5196
5329
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
5197
5330
|
/**
|
|
5198
5331
|
* Prefer `for…of` over the `forEach` method.
|
|
5199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-each.md
|
|
5200
5333
|
*/
|
|
5201
5334
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
5202
5335
|
/**
|
|
5203
5336
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-loop.md
|
|
5205
5338
|
*/
|
|
5206
5339
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5207
5340
|
/**
|
|
5208
5341
|
* Disallow assigning properties on the global object.
|
|
5209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-global-object-property-assignment.md
|
|
5210
5343
|
*/
|
|
5211
5344
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
5212
5345
|
/**
|
|
5213
|
-
* Replaced by `unicorn/prefer-unicode-code-point-escapes
|
|
5214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5346
|
+
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
5347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
5215
5348
|
* @deprecated
|
|
5216
5349
|
*/
|
|
5217
5350
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5218
5351
|
/**
|
|
5219
5352
|
* Disallow immediate mutation after variable assignment.
|
|
5220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-immediate-mutation.md
|
|
5221
5354
|
*/
|
|
5222
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<
|
|
5355
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
5223
5356
|
/**
|
|
5224
5357
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
5225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-impossible-length-comparison.md
|
|
5226
5359
|
*/
|
|
5227
5360
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
5361
|
+
/**
|
|
5362
|
+
* Disallow class accessors that hide an inherited getter or setter.
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
5364
|
+
*/
|
|
5365
|
+
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
5228
5366
|
/**
|
|
5229
5367
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
5230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-query-selector.md
|
|
5231
5369
|
*/
|
|
5232
5370
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
5233
5371
|
/**
|
|
5234
5372
|
* Disallow incorrect template literal interpolation syntax.
|
|
5235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
5236
5374
|
*/
|
|
5237
5375
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
5376
|
+
/**
|
|
5377
|
+
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
5379
|
+
*/
|
|
5380
|
+
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
5238
5381
|
/**
|
|
5239
5382
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5241
5384
|
* @deprecated
|
|
5242
5385
|
*/
|
|
5243
5386
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5244
5387
|
/**
|
|
5245
5388
|
* Disallow `instanceof` with built-in objects
|
|
5246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-instanceof-builtins.md
|
|
5247
5390
|
*/
|
|
5248
5391
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5249
5392
|
/**
|
|
5250
5393
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
5251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-argument-count.md
|
|
5252
5395
|
*/
|
|
5253
5396
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
5397
|
+
/**
|
|
5398
|
+
* Disallow invalid values for HTML boolean attributes.
|
|
5399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
5400
|
+
*/
|
|
5401
|
+
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
5254
5402
|
/**
|
|
5255
5403
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
5256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-character-comparison.md
|
|
5257
5405
|
*/
|
|
5258
5406
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
5407
|
+
/**
|
|
5408
|
+
* Disallow invalid DOM tokens.
|
|
5409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-dom-token.md
|
|
5410
|
+
*/
|
|
5411
|
+
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
5259
5412
|
/**
|
|
5260
5413
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5262
5415
|
*/
|
|
5263
5416
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5264
5417
|
/**
|
|
5265
5418
|
* Disallow invalid `accept` values on file inputs.
|
|
5266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
5267
5420
|
*/
|
|
5268
5421
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5422
|
+
/**
|
|
5423
|
+
* Disallow invalid subresource integrity metadata.
|
|
5424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-integrity.md
|
|
5425
|
+
*/
|
|
5426
|
+
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
5427
|
+
/**
|
|
5428
|
+
* Disallow invalid or ignored Intl options.
|
|
5429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-intl-options.md
|
|
5430
|
+
*/
|
|
5431
|
+
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
5432
|
+
/**
|
|
5433
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
5434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
5435
|
+
* @deprecated
|
|
5436
|
+
*/
|
|
5437
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
5438
|
+
/**
|
|
5439
|
+
* Disallow invalid property descriptors.
|
|
5440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
5441
|
+
*/
|
|
5442
|
+
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
5269
5443
|
/**
|
|
5270
5444
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5272
5446
|
*/
|
|
5273
5447
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5448
|
+
/**
|
|
5449
|
+
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
5450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-response-options.md
|
|
5451
|
+
*/
|
|
5452
|
+
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
5453
|
+
/**
|
|
5454
|
+
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
5455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-style-set-property.md
|
|
5456
|
+
*/
|
|
5457
|
+
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
5458
|
+
/**
|
|
5459
|
+
* Disallow statically known invalid Temporal arithmetic.
|
|
5460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
5461
|
+
*/
|
|
5462
|
+
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
5463
|
+
/**
|
|
5464
|
+
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
5465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
5466
|
+
*/
|
|
5467
|
+
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
5274
5468
|
/**
|
|
5275
5469
|
* Disallow invalid implementations of well-known symbol methods.
|
|
5276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
5277
5471
|
*/
|
|
5278
5472
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
5473
|
+
/**
|
|
5474
|
+
* Disallow `javascript:` URLs in Markdown.
|
|
5475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-javascript-url.md
|
|
5476
|
+
*/
|
|
5477
|
+
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
5279
5478
|
/**
|
|
5280
5479
|
* Disallow identifiers starting with `new` or `class`.
|
|
5281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-keyword-prefix.md
|
|
5282
5481
|
*/
|
|
5283
5482
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5284
5483
|
/**
|
|
5285
5484
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-current-target-access.md
|
|
5287
5486
|
*/
|
|
5288
5487
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5289
5488
|
/**
|
|
5290
5489
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
5291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-event-control.md
|
|
5292
5491
|
*/
|
|
5293
5492
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
5493
|
+
/**
|
|
5494
|
+
* Disallow empty lines at the beginning of a file.
|
|
5495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-leading-empty-lines.md
|
|
5496
|
+
*/
|
|
5497
|
+
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
5294
5498
|
/**
|
|
5295
5499
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5297
5501
|
* @deprecated
|
|
5298
5502
|
*/
|
|
5299
5503
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5300
5504
|
/**
|
|
5301
5505
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-lonely-if.md
|
|
5303
5507
|
*/
|
|
5304
5508
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5305
5509
|
/**
|
|
5306
5510
|
* Disallow mutating a loop iterable during iteration.
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
5308
5512
|
*/
|
|
5309
5513
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
5514
|
+
/**
|
|
5515
|
+
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
5516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loss-of-precision.md
|
|
5517
|
+
*/
|
|
5518
|
+
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
5310
5519
|
/**
|
|
5311
5520
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5313
5522
|
*/
|
|
5314
5523
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5315
5524
|
/**
|
|
5316
5525
|
* Disallow manually wrapped comments.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
5318
5527
|
*/
|
|
5319
5528
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
5320
5529
|
/**
|
|
5321
5530
|
* Disallow checking a Map key before accessing a different key.
|
|
5322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-mismatched-map-key.md
|
|
5323
5532
|
*/
|
|
5324
5533
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
5325
5534
|
/**
|
|
5326
5535
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-misrefactored-assignment.md
|
|
5328
5537
|
*/
|
|
5329
5538
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
5330
5539
|
/**
|
|
5331
5540
|
* Disallow references to missing local resources.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-missing-local-resource.md
|
|
5333
5542
|
*/
|
|
5334
5543
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
5335
5544
|
/**
|
|
5336
5545
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
5338
5547
|
*/
|
|
5339
5548
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
5340
5549
|
/**
|
|
5341
5550
|
* Disallow named usage of default import and export.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-named-default.md
|
|
5343
5552
|
*/
|
|
5344
5553
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5345
5554
|
/**
|
|
5346
5555
|
* Disallow negated array predicate calls.
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-array-predicate.md
|
|
5348
5557
|
*/
|
|
5349
5558
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5350
5559
|
/**
|
|
5351
5560
|
* Disallow negated comparisons.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-comparison.md
|
|
5353
5562
|
*/
|
|
5354
5563
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
5355
5564
|
/**
|
|
5356
5565
|
* Disallow negated conditions.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-condition.md
|
|
5358
5567
|
*/
|
|
5359
5568
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5360
5569
|
/**
|
|
5361
5570
|
* Disallow negated expression in equality check.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5363
5572
|
*/
|
|
5364
5573
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5365
5574
|
/**
|
|
5366
5575
|
* Disallow nested ternary expressions.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nested-ternary.md
|
|
5368
5577
|
*/
|
|
5369
5578
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5579
|
+
/**
|
|
5580
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
5581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
5582
|
+
* @deprecated
|
|
5583
|
+
*/
|
|
5584
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
5370
5585
|
/**
|
|
5371
5586
|
* Disallow `new Array()`.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-array.md
|
|
5373
5588
|
*/
|
|
5374
5589
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5375
5590
|
/**
|
|
5376
5591
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-buffer.md
|
|
5378
5593
|
*/
|
|
5379
5594
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5380
5595
|
/**
|
|
5381
5596
|
* Disallow non-function values with function-style verb prefixes.
|
|
5382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
5383
5598
|
*/
|
|
5384
5599
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
5385
5600
|
/**
|
|
5386
5601
|
* Disallow non-standard properties on built-in objects.
|
|
5387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
5388
5603
|
*/
|
|
5389
5604
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
5390
5605
|
/**
|
|
5391
5606
|
* Disallow the use of the `null` literal.
|
|
5392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-null.md
|
|
5393
5608
|
*/
|
|
5394
5609
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5395
5610
|
/**
|
|
5396
5611
|
* Disallow the use of objects as default parameters.
|
|
5397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5398
5613
|
*/
|
|
5399
5614
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5400
5615
|
/**
|
|
5401
5616
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
5402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-methods-with-collections.md
|
|
5403
5618
|
*/
|
|
5404
5619
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
5405
5620
|
/**
|
|
5406
5621
|
* Disallow optional chaining on undeclared variables.
|
|
5407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
5408
5623
|
*/
|
|
5409
5624
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
5625
|
+
/**
|
|
5626
|
+
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
5627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
5628
|
+
*/
|
|
5629
|
+
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
5410
5630
|
/**
|
|
5411
5631
|
* Disallow `process.exit()`.
|
|
5412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-process-exit.md
|
|
5413
5633
|
*/
|
|
5414
5634
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5415
5635
|
/**
|
|
5416
5636
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
5417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-redundant-comparison.md
|
|
5418
5638
|
*/
|
|
5419
5639
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
5640
|
+
/**
|
|
5641
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
5642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
5643
|
+
* @deprecated
|
|
5644
|
+
*/
|
|
5645
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
5420
5646
|
/**
|
|
5421
5647
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
5422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-return-array-push.md
|
|
5423
5649
|
*/
|
|
5424
5650
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
5425
5651
|
/**
|
|
5426
5652
|
* Disallow selector syntax in DOM names.
|
|
5427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-selector-as-dom-name.md
|
|
5428
5654
|
*/
|
|
5429
5655
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
5430
5656
|
/**
|
|
5431
5657
|
* Disallow shorthand properties that override related longhand properties.
|
|
5432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
5433
5659
|
*/
|
|
5434
5660
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
5435
5661
|
/**
|
|
5436
5662
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5438
5664
|
*/
|
|
5439
5665
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5440
5666
|
/**
|
|
5441
5667
|
* Disallow classes that only have static members.
|
|
5442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-static-only-class.md
|
|
5443
5669
|
*/
|
|
5444
5670
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5445
5671
|
/**
|
|
5446
5672
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
5447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-subtraction-comparison.md
|
|
5448
5674
|
*/
|
|
5449
5675
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
5450
5676
|
/**
|
|
5451
5677
|
* Disallow `then` property.
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-thenable.md
|
|
5453
5679
|
*/
|
|
5454
5680
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5455
5681
|
/**
|
|
5456
5682
|
* Disallow assigning `this` to a variable.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-assignment.md
|
|
5458
5684
|
*/
|
|
5459
5685
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5460
5686
|
/**
|
|
5461
5687
|
* Disallow `this` outside of classes.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-outside-of-class.md
|
|
5463
5689
|
*/
|
|
5464
5690
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
5465
5691
|
/**
|
|
5466
5692
|
* Disallow assigning to top-level variables from inside functions.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
5468
5694
|
*/
|
|
5469
5695
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
5470
5696
|
/**
|
|
5471
5697
|
* Disallow top-level side effects in exported modules.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-side-effects.md
|
|
5473
5699
|
*/
|
|
5474
5700
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
5475
5701
|
/**
|
|
5476
5702
|
* Disallow `all` as a transition property.
|
|
5477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-transition-all.md
|
|
5478
5704
|
*/
|
|
5479
5705
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
5480
5706
|
/**
|
|
5481
5707
|
* Disallow comparing `undefined` using `typeof`.
|
|
5482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-typeof-undefined.md
|
|
5483
5709
|
*/
|
|
5484
5710
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5485
5711
|
/**
|
|
5486
5712
|
* Disallow referencing methods without calling them.
|
|
5487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-uncalled-method.md
|
|
5488
5714
|
*/
|
|
5489
5715
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
5490
5716
|
/**
|
|
5491
5717
|
* Require class members to be declared.
|
|
5492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-undeclared-class-members.md
|
|
5493
5719
|
*/
|
|
5494
5720
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
5721
|
+
/**
|
|
5722
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
5724
|
+
* @deprecated
|
|
5725
|
+
*/
|
|
5726
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
5727
|
+
/**
|
|
5728
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
5729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
5730
|
+
* @deprecated
|
|
5731
|
+
*/
|
|
5732
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
5495
5733
|
/**
|
|
5496
5734
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5498
5736
|
*/
|
|
5499
5737
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5500
5738
|
/**
|
|
5501
|
-
* Disallow `Array#flatMap()
|
|
5502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5739
|
+
* Disallow unnecessary use of `Array#flatMap()`.
|
|
5740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
5503
5741
|
*/
|
|
5504
5742
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5505
5743
|
/**
|
|
5506
5744
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5508
5746
|
*/
|
|
5509
5747
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5510
5748
|
/**
|
|
5511
5749
|
* Disallow awaiting non-promise values.
|
|
5512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-await.md
|
|
5513
5751
|
*/
|
|
5514
5752
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5515
5753
|
/**
|
|
5516
5754
|
* Disallow unnecessary comparisons against boolean literals.
|
|
5517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
5518
5756
|
*/
|
|
5519
5757
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
5520
5758
|
/**
|
|
5521
5759
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
5523
5761
|
*/
|
|
5524
5762
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5525
5763
|
/**
|
|
5526
5764
|
* Disallow unnecessary `globalThis` references.
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-global-this.md
|
|
5528
5766
|
*/
|
|
5529
5767
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
5530
5768
|
/**
|
|
5531
5769
|
* Disallow unnecessary nested ternary expressions.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
5533
5771
|
*/
|
|
5534
5772
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5773
|
+
/**
|
|
5774
|
+
* Disallow parameters that receive the same value at every call.
|
|
5775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-parameters.md
|
|
5776
|
+
*/
|
|
5777
|
+
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
5535
5778
|
/**
|
|
5536
5779
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5538
5781
|
*/
|
|
5539
5782
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5540
5783
|
/**
|
|
5541
5784
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5543
5786
|
*/
|
|
5544
5787
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5545
5788
|
/**
|
|
5546
5789
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-splice.md
|
|
5548
5791
|
*/
|
|
5549
5792
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
5550
5793
|
/**
|
|
5551
5794
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
5553
5796
|
*/
|
|
5554
5797
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
5555
5798
|
/**
|
|
5556
5799
|
* Disallow unreadable array destructuring.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5558
5801
|
*/
|
|
5559
5802
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
5560
5803
|
/**
|
|
5561
5804
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
5563
5806
|
*/
|
|
5564
5807
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
5565
5808
|
/**
|
|
5566
5809
|
* Disallow unreadable IIFEs.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-iife.md
|
|
5568
5811
|
*/
|
|
5569
5812
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5570
5813
|
/**
|
|
5571
5814
|
* Disallow unreadable `new` expressions.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-new-expression.md
|
|
5573
5816
|
*/
|
|
5574
5817
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
5575
5818
|
/**
|
|
5576
5819
|
* Disallow unreadable object destructuring.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
5578
5821
|
*/
|
|
5579
5822
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5580
5823
|
/**
|
|
5581
5824
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
5583
5826
|
*/
|
|
5584
5827
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
5585
5828
|
/**
|
|
5586
5829
|
* Disallow unsafe DOM HTML APIs.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-dom-html.md
|
|
5588
5831
|
*/
|
|
5589
5832
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
5833
|
+
/**
|
|
5834
|
+
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
5835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
5836
|
+
*/
|
|
5837
|
+
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
5590
5838
|
/**
|
|
5591
5839
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
5593
5841
|
*/
|
|
5594
5842
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
5595
5843
|
/**
|
|
5596
5844
|
* Disallow unsafe values as property keys.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-property-key.md
|
|
5598
5846
|
*/
|
|
5599
5847
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
5600
5848
|
/**
|
|
5601
5849
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
5603
5851
|
*/
|
|
5604
5852
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
5605
5853
|
/**
|
|
5606
5854
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
5608
5856
|
*/
|
|
5609
5857
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
5610
5858
|
/**
|
|
5611
|
-
*
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5859
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
5860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
5861
|
+
* @deprecated
|
|
5862
|
+
*/
|
|
5863
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
5864
|
+
/**
|
|
5865
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
5867
|
+
* @deprecated
|
|
5613
5868
|
*/
|
|
5614
5869
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5870
|
+
/**
|
|
5871
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
5872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
5873
|
+
*/
|
|
5874
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
5875
|
+
/**
|
|
5876
|
+
* Disallow discarding lazy iterator helpers.
|
|
5877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-iterator-helper.md
|
|
5878
|
+
*/
|
|
5879
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
5615
5880
|
/**
|
|
5616
5881
|
* Disallow unused object properties.
|
|
5617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-properties.md
|
|
5618
5883
|
*/
|
|
5619
5884
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5885
|
+
/**
|
|
5886
|
+
* Disallow passing full URLs to `URLSearchParams`.
|
|
5887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-url-in-search-params.md
|
|
5888
|
+
*/
|
|
5889
|
+
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
5620
5890
|
/**
|
|
5621
5891
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
5622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-boolean-cast.md
|
|
5623
5893
|
*/
|
|
5624
5894
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
5625
5895
|
/**
|
|
5626
5896
|
* Disallow useless type coercions of values that are already of the target type.
|
|
5627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-coercion.md
|
|
5628
5898
|
*/
|
|
5629
5899
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
5630
5900
|
/**
|
|
5631
5901
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-collection-argument.md
|
|
5633
5903
|
*/
|
|
5634
5904
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5635
5905
|
/**
|
|
5636
5906
|
* Disallow useless compound assignments such as `x += 0`.
|
|
5637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-compound-assignment.md
|
|
5638
5908
|
*/
|
|
5639
5909
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
5640
5910
|
/**
|
|
5641
5911
|
* Disallow useless concatenation of literals.
|
|
5642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-concat.md
|
|
5643
5913
|
*/
|
|
5644
5914
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
5645
5915
|
/**
|
|
5646
5916
|
* Disallow useless `continue` statements.
|
|
5647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-continue.md
|
|
5648
5918
|
*/
|
|
5649
5919
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
5650
5920
|
/**
|
|
5651
5921
|
* Disallow unnecessary existence checks before deletion.
|
|
5652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-delete-check.md
|
|
5653
5923
|
*/
|
|
5654
5924
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
5655
5925
|
/**
|
|
5656
5926
|
* Disallow `else` after a statement that exits.
|
|
5657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-else.md
|
|
5658
5928
|
*/
|
|
5659
5929
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
5660
5930
|
/**
|
|
5661
5931
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5663
5933
|
*/
|
|
5664
5934
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5665
5935
|
/**
|
|
5666
5936
|
* Disallow useless fallback when spreading in object literals.
|
|
5667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5668
5938
|
*/
|
|
5669
5939
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5670
5940
|
/**
|
|
5671
5941
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5673
5943
|
*/
|
|
5674
5944
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5675
5945
|
/**
|
|
5676
5946
|
* Disallow useless array length check.
|
|
5677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-length-check.md
|
|
5678
5948
|
*/
|
|
5679
5949
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5680
5950
|
/**
|
|
5681
5951
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
5682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-logical-operand.md
|
|
5683
5953
|
*/
|
|
5684
5954
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
5685
5955
|
/**
|
|
5686
5956
|
* Disallow useless overrides of class methods.
|
|
5687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-override.md
|
|
5688
5958
|
*/
|
|
5689
5959
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
5690
5960
|
/**
|
|
5691
5961
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5693
5963
|
*/
|
|
5694
5964
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5695
5965
|
/**
|
|
5696
5966
|
* Disallow redundant re-exports.
|
|
5697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-re-export.md
|
|
5698
5968
|
*/
|
|
5699
5969
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
5700
5970
|
/**
|
|
5701
5971
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
5702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-recursion.md
|
|
5703
5973
|
*/
|
|
5704
5974
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
5975
|
+
/**
|
|
5976
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
5977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-set-construction.md
|
|
5978
|
+
*/
|
|
5979
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
5705
5980
|
/**
|
|
5706
5981
|
* Disallow unnecessary spread.
|
|
5707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-spread.md
|
|
5708
5983
|
*/
|
|
5709
5984
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5710
5985
|
/**
|
|
5711
5986
|
* Disallow useless case in switch statements.
|
|
5712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-switch-case.md
|
|
5713
5988
|
*/
|
|
5714
5989
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5715
5990
|
/**
|
|
5716
5991
|
* Disallow useless template literal expressions.
|
|
5717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-template-literals.md
|
|
5718
5993
|
*/
|
|
5719
5994
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
5720
5995
|
/**
|
|
5721
5996
|
* Disallow useless `undefined`.
|
|
5722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-undefined.md
|
|
5723
5998
|
*/
|
|
5724
5999
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6000
|
+
/**
|
|
6001
|
+
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
6002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-using-resource-escape.md
|
|
6003
|
+
*/
|
|
6004
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
5725
6005
|
/**
|
|
5726
6006
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
5727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
5728
6008
|
*/
|
|
5729
6009
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
5730
6010
|
/**
|
|
5731
|
-
*
|
|
5732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6011
|
+
* Require consistent decimal numbers without redundant zeros.
|
|
6012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-zero-fractions.md
|
|
5733
6013
|
*/
|
|
5734
6014
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5735
6015
|
/**
|
|
5736
6016
|
* Enforce proper case for numeric literals.
|
|
5737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/number-literal-case.md
|
|
5738
6018
|
*/
|
|
5739
6019
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5740
6020
|
/**
|
|
5741
6021
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/numeric-separators-style.md
|
|
5743
6023
|
*/
|
|
5744
6024
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5745
6025
|
/**
|
|
5746
6026
|
* Require assignment operator shorthand where possible.
|
|
5747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/operator-assignment.md
|
|
5748
6028
|
*/
|
|
5749
6029
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
5750
6030
|
/**
|
|
5751
6031
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
5752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-any.md
|
|
5753
6033
|
*/
|
|
5754
6034
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
5755
6035
|
/**
|
|
5756
6036
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
5757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
5758
6038
|
*/
|
|
5759
6039
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
5760
6040
|
/**
|
|
5761
6041
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener.md
|
|
5763
6043
|
*/
|
|
5764
6044
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5765
6045
|
/**
|
|
5766
6046
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
5767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
5768
6048
|
*/
|
|
5769
6049
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
5770
6050
|
/**
|
|
5771
6051
|
* Prefer `AggregateError` when throwing collected errors.
|
|
5772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-aggregate-error.md
|
|
5773
6053
|
*/
|
|
5774
6054
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
5775
6055
|
/**
|
|
5776
6056
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-find.md
|
|
5778
6058
|
*/
|
|
5779
6059
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5780
6060
|
/**
|
|
5781
6061
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat.md
|
|
5783
6063
|
*/
|
|
5784
6064
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5785
6065
|
/**
|
|
5786
6066
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
5787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat-map.md
|
|
5788
6068
|
*/
|
|
5789
6069
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5790
6070
|
/**
|
|
5791
|
-
* Prefer `Array.fromAsync()` over
|
|
5792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6071
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
6072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-async.md
|
|
5793
6073
|
*/
|
|
5794
6074
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
5795
6075
|
/**
|
|
5796
6076
|
* Prefer using the `Array.from()` mapping function argument.
|
|
5797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-map.md
|
|
5798
6078
|
*/
|
|
5799
6079
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
5800
6080
|
/**
|
|
5801
6081
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
5802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-range.md
|
|
5803
6083
|
*/
|
|
5804
6084
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
5805
6085
|
/**
|
|
5806
6086
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-index-of.md
|
|
5808
6088
|
*/
|
|
5809
6089
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5810
6090
|
/**
|
|
5811
6091
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
5812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
5813
6093
|
*/
|
|
5814
6094
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5815
6095
|
/**
|
|
5816
6096
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-last-methods.md
|
|
5818
6098
|
*/
|
|
5819
6099
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
5820
6100
|
/**
|
|
5821
6101
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
5822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-slice.md
|
|
5823
6103
|
*/
|
|
5824
6104
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
5825
6105
|
/**
|
|
5826
6106
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-some.md
|
|
5828
6108
|
*/
|
|
5829
6109
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5830
6110
|
/**
|
|
5831
6111
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-at.md
|
|
5833
6113
|
*/
|
|
5834
6114
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5835
6115
|
/**
|
|
5836
6116
|
* Prefer `await` over promise chaining.
|
|
5837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-await.md
|
|
5838
6118
|
*/
|
|
5839
6119
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
5840
6120
|
/**
|
|
5841
6121
|
* Prefer `BigInt` literals over the constructor.
|
|
5842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-bigint-literals.md
|
|
5843
6123
|
*/
|
|
5844
6124
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5845
6125
|
/**
|
|
5846
6126
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5848
6128
|
*/
|
|
5849
6129
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5850
6130
|
/**
|
|
5851
6131
|
* Prefer block statements over IIFEs used only for scoping.
|
|
5852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
5853
6133
|
*/
|
|
5854
6134
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
5855
6135
|
/**
|
|
5856
6136
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
5857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-boolean-return.md
|
|
5858
6138
|
*/
|
|
5859
6139
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5860
6140
|
/**
|
|
5861
6141
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-class-fields.md
|
|
5863
6143
|
*/
|
|
5864
6144
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5865
6145
|
/**
|
|
5866
6146
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5868
6148
|
*/
|
|
5869
6149
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5870
6150
|
/**
|
|
5871
6151
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-code-point.md
|
|
5873
6153
|
*/
|
|
5874
6154
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5875
6155
|
/**
|
|
5876
|
-
* Prefer
|
|
5877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6156
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
6157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-combined-guards.md
|
|
6158
|
+
*/
|
|
6159
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
6160
|
+
/**
|
|
6161
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
6162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-continue.md
|
|
5878
6163
|
*/
|
|
5879
6164
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
5880
6165
|
/**
|
|
5881
6166
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-date-now.md
|
|
5883
6168
|
*/
|
|
5884
6169
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5885
6170
|
/**
|
|
5886
|
-
* Prefer default parameters over reassignment.
|
|
5887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6171
|
+
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
6172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-default-parameters.md
|
|
5888
6173
|
*/
|
|
5889
6174
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5890
6175
|
/**
|
|
5891
6176
|
* Prefer direct iteration over default iterator method calls.
|
|
5892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-direct-iteration.md
|
|
5893
6178
|
*/
|
|
5894
6179
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
5895
6180
|
/**
|
|
5896
6181
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
5897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dispose.md
|
|
5898
6183
|
*/
|
|
5899
6184
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
5900
6185
|
/**
|
|
5901
6186
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-append.md
|
|
5903
6188
|
*/
|
|
5904
6189
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5905
6190
|
/**
|
|
5906
6191
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
5907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5908
6193
|
* @deprecated
|
|
5909
6194
|
*/
|
|
5910
6195
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5911
6196
|
/**
|
|
5912
6197
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
5913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
5914
6199
|
*/
|
|
5915
6200
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
5916
6201
|
/**
|
|
5917
6202
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5919
6204
|
*/
|
|
5920
6205
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5921
6206
|
/**
|
|
5922
|
-
* Prefer `.replaceChildren()` when
|
|
5923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6207
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
6208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
5924
6209
|
*/
|
|
5925
6210
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
5926
6211
|
/**
|
|
5927
6212
|
* Prefer `.textContent` over `.innerText`.
|
|
5928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5929
6214
|
*/
|
|
5930
6215
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5931
6216
|
/**
|
|
5932
|
-
* Prefer early returns over
|
|
5933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6217
|
+
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
6218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-early-return.md
|
|
5934
6219
|
*/
|
|
5935
6220
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
5936
6221
|
/**
|
|
5937
6222
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
5938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-else-if.md
|
|
5939
6224
|
*/
|
|
5940
6225
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
5941
6226
|
/**
|
|
5942
6227
|
* Prefer `Error.isError()` when checking for errors.
|
|
5943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-error-is-error.md
|
|
5944
6229
|
*/
|
|
5945
6230
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
6231
|
+
/**
|
|
6232
|
+
* Prefer escape sequences for irregular whitespace characters.
|
|
6233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
6234
|
+
*/
|
|
6235
|
+
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
5946
6236
|
/**
|
|
5947
6237
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-event-target.md
|
|
5949
6239
|
*/
|
|
5950
6240
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5951
6241
|
/**
|
|
5952
|
-
*
|
|
5953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6242
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
6243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
6244
|
+
* @deprecated
|
|
5954
6245
|
*/
|
|
5955
|
-
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<
|
|
6246
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
5956
6247
|
/**
|
|
5957
6248
|
* Prefer `export…from` when re-exporting.
|
|
5958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-export-from.md
|
|
5959
6250
|
*/
|
|
5960
6251
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5961
6252
|
/**
|
|
5962
6253
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
5963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
5964
6255
|
*/
|
|
5965
6256
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5966
6257
|
/**
|
|
5967
6258
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
5969
6260
|
*/
|
|
5970
6261
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
5971
6262
|
/**
|
|
5972
6263
|
* Prefer global numeric constants over `Number` static properties.
|
|
5973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-number-constants.md
|
|
5974
6265
|
*/
|
|
5975
6266
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
5976
6267
|
/**
|
|
5977
6268
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-this.md
|
|
5979
6270
|
*/
|
|
5980
6271
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5981
6272
|
/**
|
|
5982
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
5983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6273
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-group-by.md
|
|
5984
6275
|
*/
|
|
5985
6276
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
5986
6277
|
/**
|
|
5987
6278
|
* Prefer `.has()` when checking existence.
|
|
5988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-has-check.md
|
|
5989
6280
|
*/
|
|
5990
6281
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
5991
6282
|
/**
|
|
5992
6283
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
5993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
5994
6285
|
*/
|
|
5995
6286
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
5996
6287
|
/**
|
|
5997
6288
|
* Prefer HTTPS over HTTP.
|
|
5998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-https.md
|
|
5999
6290
|
*/
|
|
6000
6291
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
6001
6292
|
/**
|
|
6002
6293
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
6003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
6004
6295
|
*/
|
|
6005
6296
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
6006
6297
|
/**
|
|
6007
6298
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6009
6300
|
*/
|
|
6010
6301
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6011
6302
|
/**
|
|
6012
6303
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes.md
|
|
6014
6305
|
*/
|
|
6015
6306
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6016
6307
|
/**
|
|
6017
6308
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
6018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
6019
6310
|
*/
|
|
6020
6311
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
6021
6312
|
/**
|
|
6022
6313
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
6023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
6024
6315
|
*/
|
|
6025
6316
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
6026
6317
|
/**
|
|
6027
6318
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
6028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-concat.md
|
|
6029
6320
|
*/
|
|
6030
6321
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
6031
6322
|
/**
|
|
6032
6323
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
6033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-helpers.md
|
|
6034
6325
|
*/
|
|
6035
6326
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
6036
6327
|
/**
|
|
6037
6328
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
6038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array.md
|
|
6039
6330
|
*/
|
|
6040
6331
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
6041
6332
|
/**
|
|
6042
6333
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
6043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
6044
6335
|
*/
|
|
6045
6336
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
6337
|
+
/**
|
|
6338
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
6339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-zip.md
|
|
6340
|
+
*/
|
|
6341
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
6342
|
+
/**
|
|
6343
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
6344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-json-import.md
|
|
6345
|
+
*/
|
|
6346
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
6046
6347
|
/**
|
|
6047
6348
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
6048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
6049
6350
|
* @deprecated
|
|
6050
6351
|
*/
|
|
6051
6352
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6052
6353
|
/**
|
|
6053
6354
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6055
6356
|
*/
|
|
6056
6357
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6358
|
+
/**
|
|
6359
|
+
* Prefer literal printable ASCII characters over escape sequences.
|
|
6360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-literal-ascii.md
|
|
6361
|
+
*/
|
|
6362
|
+
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
6057
6363
|
/**
|
|
6058
6364
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
6059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-location-assign.md
|
|
6060
6366
|
*/
|
|
6061
6367
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
6062
6368
|
/**
|
|
6063
6369
|
* Prefer using a logical operator over a ternary.
|
|
6064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6065
6371
|
*/
|
|
6066
6372
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6067
6373
|
/**
|
|
6068
6374
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
6069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-map-from-entries.md
|
|
6070
6376
|
*/
|
|
6071
6377
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
6072
6378
|
/**
|
|
6073
6379
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
6074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-abs.md
|
|
6075
6381
|
*/
|
|
6076
6382
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
6077
6383
|
/**
|
|
6078
6384
|
* Prefer `Math` constants over their approximate numeric values.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-constants.md
|
|
6080
6386
|
*/
|
|
6081
6387
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
6082
6388
|
/**
|
|
6083
6389
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-min-max.md
|
|
6085
6391
|
*/
|
|
6086
6392
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6087
6393
|
/**
|
|
6088
6394
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-trunc.md
|
|
6090
6396
|
*/
|
|
6091
6397
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6398
|
+
/**
|
|
6399
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
6400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
6401
|
+
* @deprecated
|
|
6402
|
+
*/
|
|
6403
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
6092
6404
|
/**
|
|
6093
6405
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-minimal-ternary.md
|
|
6095
6407
|
*/
|
|
6096
6408
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
6097
6409
|
/**
|
|
6098
6410
|
* Prefer modern DOM APIs.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6100
6412
|
*/
|
|
6101
6413
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6102
6414
|
/**
|
|
6103
6415
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6105
6417
|
*/
|
|
6106
6418
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6107
6419
|
/**
|
|
6108
6420
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-module.md
|
|
6110
6422
|
*/
|
|
6111
6423
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6112
6424
|
/**
|
|
6113
6425
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6115
6427
|
*/
|
|
6116
6428
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6117
6429
|
/**
|
|
6118
6430
|
* Prefer negative index over `.length - index` when possible.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-negative-index.md
|
|
6120
6432
|
*/
|
|
6121
6433
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6122
6434
|
/**
|
|
6123
6435
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-node-protocol.md
|
|
6125
6437
|
*/
|
|
6126
6438
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6127
6439
|
/**
|
|
6128
6440
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-coercion.md
|
|
6130
6442
|
*/
|
|
6131
6443
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
6132
6444
|
/**
|
|
6133
6445
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
6134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
6135
6447
|
*/
|
|
6136
6448
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
6137
6449
|
/**
|
|
6138
6450
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
6139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-properties.md
|
|
6140
6452
|
*/
|
|
6141
6453
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6142
6454
|
/**
|
|
6143
6455
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
6144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-define-properties.md
|
|
6145
6457
|
*/
|
|
6146
6458
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
6147
6459
|
/**
|
|
6148
6460
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
6149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
6150
6462
|
*/
|
|
6151
6463
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
6152
6464
|
/**
|
|
6153
6465
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-from-entries.md
|
|
6155
6467
|
*/
|
|
6156
6468
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6157
6469
|
/**
|
|
6158
6470
|
* Prefer the most specific `Object` iterable method.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
6160
6472
|
*/
|
|
6161
6473
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
6162
6474
|
/**
|
|
6163
6475
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
6164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-observer-apis.md
|
|
6165
6477
|
*/
|
|
6166
6478
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
6167
6479
|
/**
|
|
6168
6480
|
* Prefer omitting the `catch` binding parameter.
|
|
6169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6170
6482
|
*/
|
|
6171
6483
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6172
6484
|
/**
|
|
6173
6485
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
6174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-path2d.md
|
|
6175
6487
|
*/
|
|
6176
6488
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
6177
6489
|
/**
|
|
6178
6490
|
* Prefer private class fields over the underscore-prefix convention.
|
|
6179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-private-class-fields.md
|
|
6180
6492
|
*/
|
|
6181
6493
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
6494
|
+
/**
|
|
6495
|
+
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
6496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-static-methods.md
|
|
6497
|
+
*/
|
|
6498
|
+
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
6182
6499
|
/**
|
|
6183
6500
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
6184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-try.md
|
|
6185
6502
|
*/
|
|
6186
6503
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
6187
6504
|
/**
|
|
6188
6505
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
6189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
6190
6507
|
*/
|
|
6191
6508
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
6192
6509
|
/**
|
|
6193
6510
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-prototype-methods.md
|
|
6195
6512
|
*/
|
|
6196
6513
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6197
6514
|
/**
|
|
6198
6515
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
6199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-query-selector.md
|
|
6200
6517
|
*/
|
|
6201
6518
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
6202
6519
|
/**
|
|
6203
6520
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
6204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-queue-microtask.md
|
|
6205
6522
|
*/
|
|
6206
6523
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
6207
6524
|
/**
|
|
6208
6525
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-reflect-apply.md
|
|
6210
6527
|
*/
|
|
6211
6528
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6212
6529
|
/**
|
|
6213
6530
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
6214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-escape.md
|
|
6215
6532
|
*/
|
|
6216
6533
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
6217
6534
|
/**
|
|
6218
6535
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
6219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-test.md
|
|
6220
6537
|
*/
|
|
6221
6538
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6222
6539
|
/**
|
|
6223
6540
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-response-static-json.md
|
|
6225
6542
|
*/
|
|
6226
6543
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6227
6544
|
/**
|
|
6228
6545
|
* Prefer `:scope` when using element query selector methods.
|
|
6229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-scoped-selector.md
|
|
6230
6547
|
*/
|
|
6231
6548
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
6232
6549
|
/**
|
|
6233
6550
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-has.md
|
|
6235
6552
|
*/
|
|
6236
6553
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
6237
6554
|
/**
|
|
6238
6555
|
* Prefer `Set` methods for Set operations.
|
|
6239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-methods.md
|
|
6240
6557
|
*/
|
|
6241
6558
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
6242
6559
|
/**
|
|
6243
6560
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-size.md
|
|
6245
6562
|
*/
|
|
6246
6563
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6247
6564
|
/**
|
|
6248
6565
|
* Prefer arrow function properties over methods with a single return.
|
|
6249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-arrow-method.md
|
|
6250
6567
|
*/
|
|
6251
6568
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
6569
|
+
/**
|
|
6570
|
+
* Prefer shorter alternatives to Unicode escape sequences.
|
|
6571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
6572
|
+
*/
|
|
6573
|
+
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
6252
6574
|
/**
|
|
6253
6575
|
* Prefer simple conditions first in logical expressions.
|
|
6254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-condition-first.md
|
|
6255
6577
|
*/
|
|
6256
6578
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
6257
6579
|
/**
|
|
6258
6580
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
6259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
6260
6582
|
*/
|
|
6261
6583
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6262
6584
|
/**
|
|
6263
6585
|
* Prefer simplified conditions.
|
|
6264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simplified-conditions.md
|
|
6265
6587
|
*/
|
|
6266
|
-
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<
|
|
6588
|
+
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
6267
6589
|
/**
|
|
6268
6590
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
6269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-array-predicate.md
|
|
6270
6592
|
*/
|
|
6271
6593
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6272
6594
|
/**
|
|
6273
6595
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-call.md
|
|
6275
6597
|
*/
|
|
6276
6598
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6277
6599
|
/**
|
|
6278
6600
|
* Prefer a single object destructuring declaration per local const source.
|
|
6279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
6280
6602
|
*/
|
|
6281
6603
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6282
6604
|
/**
|
|
6283
6605
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
6284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-replace.md
|
|
6285
6607
|
*/
|
|
6286
6608
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
6287
6609
|
/**
|
|
6288
6610
|
* Prefer declaring variables in the smallest possible scope.
|
|
6289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-smaller-scope.md
|
|
6290
6612
|
*/
|
|
6291
6613
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
6292
6614
|
/**
|
|
6293
6615
|
* Prefer `String#split()` with a limit.
|
|
6294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-split-limit.md
|
|
6295
6617
|
*/
|
|
6296
6618
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
6297
6619
|
/**
|
|
6298
6620
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
6299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-spread.md
|
|
6300
6622
|
*/
|
|
6301
6623
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6302
6624
|
/**
|
|
6303
6625
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
6304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-match-all.md
|
|
6305
6627
|
*/
|
|
6306
6628
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
6307
6629
|
/**
|
|
6308
6630
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
6309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
6310
6632
|
*/
|
|
6311
6633
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
6312
6634
|
/**
|
|
6313
6635
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-raw.md
|
|
6315
6637
|
*/
|
|
6316
6638
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6317
6639
|
/**
|
|
6318
6640
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
6319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-repeat.md
|
|
6320
6642
|
*/
|
|
6321
6643
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
6322
6644
|
/**
|
|
6323
6645
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
6324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-replace-all.md
|
|
6325
6647
|
*/
|
|
6326
6648
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6327
6649
|
/**
|
|
6328
6650
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-slice.md
|
|
6330
6652
|
*/
|
|
6331
6653
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6332
6654
|
/**
|
|
6333
6655
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
6334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6335
6657
|
*/
|
|
6336
6658
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6337
6659
|
/**
|
|
6338
6660
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6340
6662
|
*/
|
|
6341
6663
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6342
6664
|
/**
|
|
6343
6665
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-structured-clone.md
|
|
6345
6667
|
*/
|
|
6346
6668
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6347
6669
|
/**
|
|
6348
6670
|
* Prefer `switch` over multiple `else-if`.
|
|
6349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-switch.md
|
|
6350
6672
|
*/
|
|
6351
6673
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6352
6674
|
/**
|
|
6353
6675
|
* Prefer `Temporal` over `Date`.
|
|
6354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal.md
|
|
6355
6677
|
*/
|
|
6356
6678
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
6679
|
+
/**
|
|
6680
|
+
* Prefer direct Temporal conversion methods.
|
|
6681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal-conversion.md
|
|
6682
|
+
*/
|
|
6683
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
6357
6684
|
/**
|
|
6358
6685
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
6359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-ternary.md
|
|
6360
6687
|
*/
|
|
6361
6688
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6362
6689
|
/**
|
|
6363
6690
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
6364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-then-catch.md
|
|
6365
6692
|
*/
|
|
6366
6693
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
6367
6694
|
/**
|
|
6368
6695
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
6369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-toggle-attribute.md
|
|
6370
6697
|
*/
|
|
6371
6698
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
6372
6699
|
/**
|
|
6373
6700
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-top-level-await.md
|
|
6375
6702
|
*/
|
|
6376
6703
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6377
6704
|
/**
|
|
6378
6705
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-error.md
|
|
6380
6707
|
*/
|
|
6381
6708
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6382
6709
|
/**
|
|
6383
6710
|
* Require type literals to be last in union types.
|
|
6384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-literal-last.md
|
|
6385
6712
|
*/
|
|
6386
6713
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
6387
6714
|
/**
|
|
6388
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
6389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
6716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-base64.md
|
|
6390
6717
|
*/
|
|
6391
6718
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
6719
|
+
/**
|
|
6720
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
6721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-hex.md
|
|
6722
|
+
*/
|
|
6723
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
6392
6724
|
/**
|
|
6393
6725
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
6394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unary-minus.md
|
|
6395
6727
|
*/
|
|
6396
6728
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
6397
6729
|
/**
|
|
6398
6730
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
6399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
6400
6732
|
*/
|
|
6401
6733
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
6402
6734
|
/**
|
|
6403
6735
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
6404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-can-parse.md
|
|
6405
6737
|
*/
|
|
6406
6738
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
6407
6739
|
/**
|
|
6408
6740
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
6409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-href.md
|
|
6410
6742
|
*/
|
|
6411
6743
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
6412
6744
|
/**
|
|
6413
6745
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
6414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-search-parameters.md
|
|
6415
6747
|
*/
|
|
6416
6748
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
6417
6749
|
/**
|
|
6418
6750
|
* Prefer putting the condition in the while statement.
|
|
6419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-while-loop-condition.md
|
|
6420
6752
|
*/
|
|
6421
6753
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
6422
6754
|
/**
|
|
6423
6755
|
* Renamed to `unicorn/name-replacements`.
|
|
6424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
6425
6757
|
* @deprecated
|
|
6426
6758
|
*/
|
|
6427
6759
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
6428
6760
|
/**
|
|
6429
6761
|
* Enforce consistent relative URL style.
|
|
6430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/relative-url-style.md
|
|
6431
6763
|
*/
|
|
6432
6764
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6433
6765
|
/**
|
|
6434
6766
|
* Enforce using the separator argument with `Array#join()`.
|
|
6435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-join-separator.md
|
|
6436
6768
|
*/
|
|
6437
6769
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6438
6770
|
/**
|
|
6439
6771
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
6440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-sort-compare.md
|
|
6441
6773
|
*/
|
|
6442
6774
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
6443
6775
|
/**
|
|
6444
6776
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
6445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-css-escape.md
|
|
6446
6778
|
*/
|
|
6447
6779
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
6448
6780
|
/**
|
|
6449
6781
|
* Require configured YAML frontmatter fields.
|
|
6450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-frontmatter-fields.md
|
|
6451
6783
|
*/
|
|
6452
6784
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
6453
6785
|
/**
|
|
6454
6786
|
* Require non-empty module attributes for imports and exports
|
|
6455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-attributes.md
|
|
6456
6788
|
*/
|
|
6457
6789
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6458
6790
|
/**
|
|
6459
6791
|
* Require non-empty specifier list in import and export statements.
|
|
6460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-specifiers.md
|
|
6461
6793
|
*/
|
|
6462
6794
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6463
6795
|
/**
|
|
6464
6796
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6466
6798
|
*/
|
|
6467
6799
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6468
6800
|
/**
|
|
6469
6801
|
* Require passive event listeners for high-frequency events.
|
|
6470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-passive-events.md
|
|
6471
6803
|
*/
|
|
6472
6804
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
6473
6805
|
/**
|
|
6474
6806
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-post-message-target-origin.md
|
|
6476
6808
|
*/
|
|
6477
6809
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6478
6810
|
/**
|
|
6479
6811
|
* Require boolean-returning Proxy traps to return booleans.
|
|
6480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
6481
6813
|
*/
|
|
6482
6814
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
6815
|
+
/**
|
|
6816
|
+
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
6817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-text-decoder-streaming.md
|
|
6818
|
+
*/
|
|
6819
|
+
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
6483
6820
|
/**
|
|
6484
6821
|
* Enforce a consistent style for single-line block comments.
|
|
6485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/single-line-block-comment-style.md
|
|
6486
6823
|
*/
|
|
6487
6824
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
6488
6825
|
/**
|
|
6489
6826
|
* Enforce better string content.
|
|
6490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/string-content.md
|
|
6491
6828
|
*/
|
|
6492
6829
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6493
6830
|
/**
|
|
6494
6831
|
* Enforce consistent brace style for `case` clauses.
|
|
6495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-braces.md
|
|
6496
6833
|
*/
|
|
6497
6834
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6498
6835
|
/**
|
|
6499
6836
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-break-position.md
|
|
6501
6838
|
*/
|
|
6502
6839
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6503
6840
|
/**
|
|
6504
6841
|
* Fix whitespace-insensitive template indentation.
|
|
6505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/template-indent.md
|
|
6506
6843
|
*/
|
|
6507
6844
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6508
6845
|
/**
|
|
6509
6846
|
* Enforce consistent case for text encoding identifiers.
|
|
6510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6511
6848
|
*/
|
|
6512
6849
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6513
6850
|
/**
|
|
6514
6851
|
* Require `new` when creating an error.
|
|
6515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/throw-new-error.md
|
|
6516
6853
|
*/
|
|
6517
6854
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6518
6855
|
/**
|
|
6519
6856
|
* Limit the complexity of `try` blocks.
|
|
6520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/try-complexity.md
|
|
6521
6858
|
*/
|
|
6522
6859
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6523
6860
|
/**
|
|
@@ -10996,6 +11333,10 @@ type BaselineJsUseBaseline = [] | [{
|
|
|
10996
11333
|
ignore?: string[];
|
|
10997
11334
|
});
|
|
10998
11335
|
}];
|
|
11336
|
+
// ----- de-morgan/no-negated-disjunction -----
|
|
11337
|
+
type DeMorganNoNegatedDisjunction = [] | [{
|
|
11338
|
+
enforceForMixedOperators?: boolean;
|
|
11339
|
+
}];
|
|
10999
11340
|
// ----- e18e/ban-dependencies -----
|
|
11000
11341
|
type E18EBanDependencies = [] | [{
|
|
11001
11342
|
presets?: string[];
|
|
@@ -11431,6 +11772,7 @@ type ImportLitePreferDefaultExport = [] | [{
|
|
|
11431
11772
|
}];
|
|
11432
11773
|
// ----- jsdoc/check-alignment -----
|
|
11433
11774
|
type JsdocCheckAlignment = [] | [{
|
|
11775
|
+
ignoreEmptyLines?: boolean;
|
|
11434
11776
|
innerIndent?: number;
|
|
11435
11777
|
}];
|
|
11436
11778
|
// ----- jsdoc/check-examples -----
|
|
@@ -11458,6 +11800,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
11458
11800
|
// ----- jsdoc/check-indentation -----
|
|
11459
11801
|
type JsdocCheckIndentation = [] | [{
|
|
11460
11802
|
allowIndentedSections?: boolean;
|
|
11803
|
+
allowNoSpaceAfterAsterisk?: boolean;
|
|
11461
11804
|
excludeTags?: string[];
|
|
11462
11805
|
}];
|
|
11463
11806
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -11493,6 +11836,10 @@ type JsdocCheckParamNames = [] | [{
|
|
|
11493
11836
|
type JsdocCheckPropertyNames = [] | [{
|
|
11494
11837
|
enableFixer?: boolean;
|
|
11495
11838
|
}];
|
|
11839
|
+
// ----- jsdoc/check-syntax -----
|
|
11840
|
+
type JsdocCheckSyntax = [] | [{
|
|
11841
|
+
enableFixer?: boolean;
|
|
11842
|
+
}];
|
|
11496
11843
|
// ----- jsdoc/check-tag-names -----
|
|
11497
11844
|
type JsdocCheckTagNames = [] | [{
|
|
11498
11845
|
definedTags?: string[];
|
|
@@ -11877,7 +12224,6 @@ type JsdocRequireTags = [] | [{
|
|
|
11877
12224
|
tags?: (string | {
|
|
11878
12225
|
context?: string;
|
|
11879
12226
|
tag?: string;
|
|
11880
|
-
[k: string]: unknown | undefined;
|
|
11881
12227
|
})[];
|
|
11882
12228
|
}];
|
|
11883
12229
|
// ----- jsdoc/require-template -----
|
|
@@ -11948,6 +12294,22 @@ type JsdocTextEscaping = [] | [{
|
|
|
11948
12294
|
escapeHTML?: boolean;
|
|
11949
12295
|
escapeMarkdown?: boolean;
|
|
11950
12296
|
}];
|
|
12297
|
+
// ----- jsdoc/ts-ban-ts-comment -----
|
|
12298
|
+
type JsdocTsBanTsComment = [] | [{
|
|
12299
|
+
minimumDescriptionLength?: number;
|
|
12300
|
+
"ts-check"?: (boolean | "allow-with-description" | {
|
|
12301
|
+
descriptionFormat?: string;
|
|
12302
|
+
});
|
|
12303
|
+
"ts-expect-error"?: (boolean | "allow-with-description" | {
|
|
12304
|
+
descriptionFormat?: string;
|
|
12305
|
+
});
|
|
12306
|
+
"ts-ignore"?: (boolean | "allow-with-description" | {
|
|
12307
|
+
descriptionFormat?: string;
|
|
12308
|
+
});
|
|
12309
|
+
"ts-nocheck"?: (boolean | "allow-with-description" | {
|
|
12310
|
+
descriptionFormat?: string;
|
|
12311
|
+
});
|
|
12312
|
+
}];
|
|
11951
12313
|
// ----- jsdoc/ts-method-signature-style -----
|
|
11952
12314
|
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
11953
12315
|
enableFixer?: boolean;
|
|
@@ -15677,6 +16039,7 @@ type ReactRefreshOnlyExportComponents = [] | [{
|
|
|
15677
16039
|
extraHOCs?: string[];
|
|
15678
16040
|
allowExportNames?: string[];
|
|
15679
16041
|
allowConstantExport?: boolean;
|
|
16042
|
+
allowCompoundComponents?: boolean;
|
|
15680
16043
|
checkJS?: boolean;
|
|
15681
16044
|
}];
|
|
15682
16045
|
// ----- regexp/hexadecimal-escape -----
|
|
@@ -19004,6 +19367,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19004
19367
|
})[];
|
|
19005
19368
|
multipleFileExtensions?: boolean;
|
|
19006
19369
|
checkDirectories?: boolean;
|
|
19370
|
+
directoryRoots?: (string | {
|
|
19371
|
+
[k: string]: unknown | undefined;
|
|
19372
|
+
})[];
|
|
19007
19373
|
} | {
|
|
19008
19374
|
cases?: {
|
|
19009
19375
|
camelCase?: boolean;
|
|
@@ -19017,6 +19383,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
19017
19383
|
})[];
|
|
19018
19384
|
multipleFileExtensions?: boolean;
|
|
19019
19385
|
checkDirectories?: boolean;
|
|
19386
|
+
directoryRoots?: (string | {
|
|
19387
|
+
[k: string]: unknown | undefined;
|
|
19388
|
+
})[];
|
|
19020
19389
|
})];
|
|
19021
19390
|
// ----- unicorn/id-match -----
|
|
19022
19391
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -19042,6 +19411,11 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
19042
19411
|
interface _UnicornImportStyle_BooleanObject {
|
|
19043
19412
|
[k: string]: boolean | undefined;
|
|
19044
19413
|
}
|
|
19414
|
+
// ----- unicorn/indent -----
|
|
19415
|
+
type UnicornIndent = [] | [{
|
|
19416
|
+
indent?: ("tab" | number);
|
|
19417
|
+
tabWidth?: number;
|
|
19418
|
+
}];
|
|
19045
19419
|
// ----- unicorn/isolated-functions -----
|
|
19046
19420
|
type UnicornIsolatedFunctions = [] | [{
|
|
19047
19421
|
overrideGlobals?: {
|
|
@@ -19053,6 +19427,15 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
19053
19427
|
}];
|
|
19054
19428
|
// ----- unicorn/iteration-fallback-style -----
|
|
19055
19429
|
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
19430
|
+
// ----- unicorn/key-name-casing -----
|
|
19431
|
+
type UnicornKeyNameCasing = [] | [{
|
|
19432
|
+
camelCase?: boolean;
|
|
19433
|
+
PascalCase?: boolean;
|
|
19434
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
19435
|
+
"kebab-case"?: boolean;
|
|
19436
|
+
snake_case?: boolean;
|
|
19437
|
+
ignore?: string[];
|
|
19438
|
+
}];
|
|
19056
19439
|
// ----- unicorn/logical-assignment-operators -----
|
|
19057
19440
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
19058
19441
|
enforceForIfStatements?: boolean;
|
|
@@ -19103,10 +19486,18 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
19103
19486
|
type UnicornNoArraySort = [] | [{
|
|
19104
19487
|
allowExpressionStatement?: boolean;
|
|
19105
19488
|
}];
|
|
19489
|
+
// ----- unicorn/no-break-in-nested-loop -----
|
|
19490
|
+
type UnicornNoBreakInNestedLoop = [] | [{
|
|
19491
|
+
checkContinue?: boolean;
|
|
19492
|
+
}];
|
|
19106
19493
|
// ----- unicorn/no-empty-file -----
|
|
19107
19494
|
type UnicornNoEmptyFile = [] | [{
|
|
19108
19495
|
allowComments?: boolean;
|
|
19109
19496
|
}];
|
|
19497
|
+
// ----- unicorn/no-immediate-mutation -----
|
|
19498
|
+
type UnicornNoImmediateMutation = [] | [{
|
|
19499
|
+
checkConditionals?: boolean;
|
|
19500
|
+
}];
|
|
19110
19501
|
// ----- unicorn/no-instanceof-builtins -----
|
|
19111
19502
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
19112
19503
|
useErrorIsError?: boolean;
|
|
@@ -19147,6 +19538,10 @@ type UnicornNoNull = [] | [{
|
|
|
19147
19538
|
type UnicornNoTypeofUndefined = [] | [{
|
|
19148
19539
|
checkGlobalVariables?: boolean;
|
|
19149
19540
|
}];
|
|
19541
|
+
// ----- unicorn/no-unnecessary-parameters -----
|
|
19542
|
+
type UnicornNoUnnecessaryParameters = [] | [{
|
|
19543
|
+
minimumCallCount?: number;
|
|
19544
|
+
}];
|
|
19150
19545
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
19151
19546
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
19152
19547
|
targets?: (string | string[] | {
|
|
@@ -19210,9 +19605,15 @@ type UnicornPreferAt = [] | [{
|
|
|
19210
19605
|
getLastElementFunctions?: string[];
|
|
19211
19606
|
checkAllIndexAccess?: boolean;
|
|
19212
19607
|
}];
|
|
19608
|
+
// ----- unicorn/prefer-combined-guards -----
|
|
19609
|
+
type UnicornPreferCombinedGuards = [] | [{
|
|
19610
|
+
checkCompoundConditions?: boolean;
|
|
19611
|
+
checkMultiStatementBodies?: boolean;
|
|
19612
|
+
}];
|
|
19213
19613
|
// ----- unicorn/prefer-continue -----
|
|
19214
19614
|
type UnicornPreferContinue = [] | [{
|
|
19215
19615
|
maximumStatements?: number;
|
|
19616
|
+
checkShortBodies?: boolean;
|
|
19216
19617
|
}];
|
|
19217
19618
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
19218
19619
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -19222,10 +19623,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
19222
19623
|
// ----- unicorn/prefer-early-return -----
|
|
19223
19624
|
type UnicornPreferEarlyReturn = [] | [{
|
|
19224
19625
|
maximumStatements?: number;
|
|
19225
|
-
|
|
19226
|
-
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
19227
|
-
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
19228
|
-
unit?: ("dvh" | "svh" | "lvh");
|
|
19626
|
+
checkShortBodies?: boolean;
|
|
19229
19627
|
}];
|
|
19230
19628
|
// ----- unicorn/prefer-export-from -----
|
|
19231
19629
|
type UnicornPreferExportFrom = [] | [{
|
|
@@ -19270,6 +19668,10 @@ type UnicornPreferSetHas = [] | [{
|
|
|
19270
19668
|
}];
|
|
19271
19669
|
// ----- unicorn/prefer-short-arrow-method -----
|
|
19272
19670
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
19671
|
+
// ----- unicorn/prefer-simplified-conditions -----
|
|
19672
|
+
type UnicornPreferSimplifiedConditions = [] | [{
|
|
19673
|
+
negatedConditions?: ("simplify" | "expand");
|
|
19674
|
+
}];
|
|
19273
19675
|
// ----- unicorn/prefer-single-call -----
|
|
19274
19676
|
type UnicornPreferSingleCall = [] | [{
|
|
19275
19677
|
ignore?: string[];
|
|
@@ -21064,7 +21466,7 @@ type YmlSpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
21064
21466
|
markers?: string[];
|
|
21065
21467
|
}];
|
|
21066
21468
|
// Names of all the configs
|
|
21067
|
-
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node/setup' | 'moso/node/rules' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn/setup' | 'moso/unicorn/rules' | 'moso/stylistic' | 'moso/baseline/setup' | 'moso/baseline/rules' | 'moso/baseline/type-aware-rules' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/functional' | 'moso/functional/disable-type-aware' | 'moso/jsdoc/setup' | 'moso/jsdoc/rules' | 'moso/jsonc/setup' | 'moso/jsonc/rules' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react/setup' | 'moso/react/rules' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/test/setup' | 'moso/test/rules' | 'moso/toml/setup' | 'moso/toml/rules' | 'moso/typescript/setup' | 'moso/typescript/rules' | 'moso/typescript/erasable-syntax' | 'moso/typescript/rules-type-aware' | 'moso/typescript/dts-overrides' | 'moso/typescript/test-overrides' | 'moso/typescript/javascript-overrides' | 'moso/vue/setup' | 'moso/vue/rules' | 'moso/tailwind' | 'moso/yaml/setup' | 'moso/yaml/rules' | 'moso/disables/allow-default-export' | 'moso/disables/bin' | 'moso/disables/cjs' | 'moso/disables/cli' | 'moso/disables/components' | 'moso/disables/config-files' | 'moso/disables/dts' | 'moso/disables/github' | 'moso/disables/node-frameworks' | 'moso/disables/node-typescript' | 'moso/disables/scripts' | 'moso/disables/tests' | 'moso/disables/typings';
|
|
21469
|
+
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/security' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node/setup' | 'moso/node/rules' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn/setup' | 'moso/unicorn/rules' | 'moso/stylistic' | 'moso/baseline/setup' | 'moso/baseline/rules' | 'moso/baseline/type-aware-rules' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/functional' | 'moso/functional/disable-type-aware' | 'moso/jsdoc/setup' | 'moso/jsdoc/rules' | 'moso/jsonc/setup' | 'moso/jsonc/rules' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react/setup' | 'moso/react/rules' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/test/setup' | 'moso/test/rules' | 'moso/toml/setup' | 'moso/toml/rules' | 'moso/typescript/setup' | 'moso/typescript/rules' | 'moso/typescript/erasable-syntax' | 'moso/typescript/rules-type-aware' | 'moso/typescript/dts-overrides' | 'moso/typescript/test-overrides' | 'moso/typescript/javascript-overrides' | 'moso/vue/setup' | 'moso/vue/rules' | 'moso/tailwind' | 'moso/yaml/setup' | 'moso/yaml/rules' | 'moso/disables/allow-default-export' | 'moso/disables/bin' | 'moso/disables/cjs' | 'moso/disables/cli' | 'moso/disables/components' | 'moso/disables/config-files' | 'moso/disables/dts' | 'moso/disables/github' | 'moso/disables/node-frameworks' | 'moso/disables/node-typescript' | 'moso/disables/scripts' | 'moso/disables/tests' | 'moso/disables/typings';
|
|
21068
21470
|
//#endregion
|
|
21069
21471
|
//#region src/types.d.ts
|
|
21070
21472
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -21116,6 +21518,14 @@ type ConfigOptions = {
|
|
|
21116
21518
|
* @default true
|
|
21117
21519
|
*/
|
|
21118
21520
|
regexp?: boolean | OptionsOverrides;
|
|
21521
|
+
/**
|
|
21522
|
+
* Enable security rules.
|
|
21523
|
+
*
|
|
21524
|
+
* @see https://https://github.com/eslint-community/eslint-plugin-security
|
|
21525
|
+
*
|
|
21526
|
+
* @default true
|
|
21527
|
+
*/
|
|
21528
|
+
security?: boolean | OptionsSecurity["severity"] | (OptionsOverrides & OptionsSecurity);
|
|
21119
21529
|
/**
|
|
21120
21530
|
* Enable test support.
|
|
21121
21531
|
*
|
|
@@ -21223,7 +21633,7 @@ type LanguageOptions = {
|
|
|
21223
21633
|
/**
|
|
21224
21634
|
* Enable JSON/JSON5/JSONC support.
|
|
21225
21635
|
*
|
|
21226
|
-
* @default
|
|
21636
|
+
* @default false
|
|
21227
21637
|
*/
|
|
21228
21638
|
jsonc?: boolean | OptionsOverrides;
|
|
21229
21639
|
/**
|
|
@@ -21540,6 +21950,18 @@ type OptionsReact = OptionsOverrides & {
|
|
|
21540
21950
|
allowConstantExport?: boolean;
|
|
21541
21951
|
};
|
|
21542
21952
|
};
|
|
21953
|
+
type OptionsSecurity = OptionsOverrides & {
|
|
21954
|
+
/**
|
|
21955
|
+
* Security rule enforcement options.
|
|
21956
|
+
*
|
|
21957
|
+
* - `none`: no security rules
|
|
21958
|
+
* - `lite`: basic rules set to 'warn' (detect-object-injection, detect-non-literal-fs-filename, and detect-non-literal-regexp off)
|
|
21959
|
+
* - `moderate`: standard rules set to 'error' (detect-object-injection, detect-non-literal-fs-filename, and detect-non-literal-regexp off)
|
|
21960
|
+
* - `recommended`: alias for `moderate`
|
|
21961
|
+
* - `strict`: all security rules set to 'error' (including detect-object-injection, detect-non-literal-fs-filename, and detect-non-literal-regexp)
|
|
21962
|
+
*/
|
|
21963
|
+
severity?: "lite" | "moderate" | "none" | "recommended" | "strict";
|
|
21964
|
+
};
|
|
21543
21965
|
type OptionsStylistic = {
|
|
21544
21966
|
stylistic?: boolean | StylisticConfig;
|
|
21545
21967
|
};
|
|
@@ -21761,6 +22183,9 @@ export declare const react: (options: Readonly<OptionsLessOpinionated & OptionsR
|
|
|
21761
22183
|
//#region src/configs/regexp.d.ts
|
|
21762
22184
|
export declare const regexp: (options: Readonly<OptionsOverrides>) => Promise<TypedFlatConfigItem[]>;
|
|
21763
22185
|
//#endregion
|
|
22186
|
+
//#region src/configs/security.d.ts
|
|
22187
|
+
export declare const security: (options: Readonly<OptionsSecurity>) => Promise<TypedFlatConfigItem[]>;
|
|
22188
|
+
//#endregion
|
|
21764
22189
|
//#region src/configs/sort.d.ts
|
|
21765
22190
|
/**
|
|
21766
22191
|
* Sort package.json
|
|
@@ -21924,4 +22349,4 @@ export declare const memoize: <T extends ESLint.Plugin>(plugin: T, key: string)
|
|
|
21924
22349
|
*/
|
|
21925
22350
|
export declare const vueInlineElements: ReadonlyArray<string>;
|
|
21926
22351
|
//#endregion
|
|
21927
|
-
export { type Awaitable, type ConfigNames, type ConfigOptions, type CoreOptions, type FrameworkOptions, type LanguageOptions, type OptionsAstro, type OptionsBaseline, type OptionsComponentExts, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFunctional, type OptionsHasDOM, type OptionsHasTypeScript, type OptionsIgnores, type OptionsIsInEditor, type OptionsJSDoc, type OptionsJSX, type OptionsLessOpinionated, type OptionsMode, type OptionsNextJS, type OptionsNode, type OptionsOverrides, type OptionsPerfectionist, type OptionsProjectRoot, type OptionsReact, type OptionsStylistic, type OptionsTailwind, type OptionsTypeScript, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsVue, type ProjectMode, type RequiredOptionsStylistic, type RequiredOptionsTailwind, type ResolvedOptions, type RuleOptions as Rules, type StyleOptions, type StylisticConfig, type TypedFlatConfigItem, moso as default };
|
|
22352
|
+
export { type Awaitable, type ConfigNames, type ConfigOptions, type CoreOptions, type FrameworkOptions, type LanguageOptions, type OptionsAstro, type OptionsBaseline, type OptionsComponentExts, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFunctional, type OptionsHasDOM, type OptionsHasTypeScript, type OptionsIgnores, type OptionsIsInEditor, type OptionsJSDoc, type OptionsJSX, type OptionsLessOpinionated, type OptionsMode, type OptionsNextJS, type OptionsNode, type OptionsOverrides, type OptionsPerfectionist, type OptionsProjectRoot, type OptionsReact, type OptionsSecurity, type OptionsStylistic, type OptionsTailwind, type OptionsTypeScript, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsVue, type ProjectMode, type RequiredOptionsStylistic, type RequiredOptionsTailwind, type ResolvedOptions, type RuleOptions as Rules, type StyleOptions, type StylisticConfig, type TypedFlatConfigItem, moso as default };
|