@infernodesign/eslint-config 2.15.2 → 2.16.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/cli.js +17 -26
- package/dist/{constants-BxEizS7D.js → constants-JlDUTs3Q.js} +1 -2
- package/dist/index.d.ts +414 -484
- package/dist/index.js +41 -81
- package/package.json +21 -21
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
|
4
4
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
5
5
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
6
6
|
import { Options } from "eslint-processor-vue-blocks";
|
|
7
|
-
//#region src/typegen.d.ts
|
|
8
7
|
interface RuleOptions {
|
|
9
8
|
/**
|
|
10
9
|
* Enforce getter and setter pairs in objects and classes
|
|
@@ -61,6 +60,11 @@ interface RuleOptions {
|
|
|
61
60
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
|
|
62
61
|
*/
|
|
63
62
|
'antfu/no-ts-export-equal'?: Linter.RuleEntry<[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Enforce multiline objects, arrays and ternaries when they are complex
|
|
65
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/reasonable-newline.md
|
|
66
|
+
*/
|
|
67
|
+
'antfu/reasonable-newline'?: Linter.RuleEntry<AntfuReasonableNewline>;
|
|
64
68
|
/**
|
|
65
69
|
* Enforce top-level functions to be declared with function keyword
|
|
66
70
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
|
|
@@ -3833,7 +3837,7 @@ interface RuleOptions {
|
|
|
3833
3837
|
*/
|
|
3834
3838
|
'react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3835
3839
|
/**
|
|
3836
|
-
* Disallows 'target="_blank"' without 'rel="noreferrer
|
|
3840
|
+
* Disallows 'target="_blank"' without 'rel="noreferrer"'.
|
|
3837
3841
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
3838
3842
|
*/
|
|
3839
3843
|
'react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<ReactDomNoUnsafeTargetBlank>;
|
|
@@ -7557,2002 +7561,2002 @@ interface RuleOptions {
|
|
|
7557
7561
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7558
7562
|
/**
|
|
7559
7563
|
* Prefer better DOM traversal APIs.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/better-dom-traversing.md
|
|
7561
7565
|
*/
|
|
7562
7566
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7563
7567
|
/**
|
|
7564
7568
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7566
7570
|
* @deprecated
|
|
7567
7571
|
*/
|
|
7568
7572
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7569
7573
|
/**
|
|
7570
7574
|
* Enforce a specific parameter name in catch clauses.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/catch-error-name.md
|
|
7572
7576
|
*/
|
|
7573
7577
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7574
7578
|
/**
|
|
7575
7579
|
* Enforce consistent class references in static methods.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7577
7581
|
*/
|
|
7578
7582
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7579
7583
|
/**
|
|
7580
7584
|
* Enforce consistent spacing before and after commas in JSON and SOML.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comma-spacing.md
|
|
7582
7586
|
*/
|
|
7583
7587
|
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
7584
7588
|
/**
|
|
7585
7589
|
* Enforce better comment content.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comment-content.md
|
|
7587
7591
|
*/
|
|
7588
7592
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7589
7593
|
/**
|
|
7590
7594
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7592
7596
|
*/
|
|
7593
7597
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7594
7598
|
/**
|
|
7595
7599
|
* Enforce consistent assertion style with `node:assert`.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-assert.md
|
|
7597
7601
|
*/
|
|
7598
7602
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7599
7603
|
/**
|
|
7600
7604
|
* Enforce consistent naming for boolean names.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-boolean-name.md
|
|
7602
7606
|
*/
|
|
7603
7607
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7604
7608
|
/**
|
|
7605
7609
|
* Enforce consistent class member order.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-class-member-order.md
|
|
7607
7611
|
*/
|
|
7608
7612
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7609
7613
|
/**
|
|
7610
7614
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-compound-words.md
|
|
7612
7616
|
*/
|
|
7613
7617
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7614
7618
|
/**
|
|
7615
7619
|
* Enforce consistent conditional object spread style.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7617
7621
|
*/
|
|
7618
7622
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7619
7623
|
/**
|
|
7620
7624
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-date-clone.md
|
|
7622
7626
|
*/
|
|
7623
7627
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7624
7628
|
/**
|
|
7625
7629
|
* Use destructured variables over properties.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-destructuring.md
|
|
7627
7631
|
*/
|
|
7628
7632
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7629
7633
|
/**
|
|
7630
7634
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7632
7636
|
*/
|
|
7633
7637
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7634
7638
|
/**
|
|
7635
7639
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-existence-index-check.md
|
|
7637
7641
|
*/
|
|
7638
7642
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7639
7643
|
/**
|
|
7640
7644
|
* Enforce consistent decorator position on exported classes.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7642
7646
|
*/
|
|
7643
7647
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7644
7648
|
/**
|
|
7645
7649
|
* Move function definitions to the highest possible scope.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-scoping.md
|
|
7647
7651
|
*/
|
|
7648
7652
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7649
7653
|
/**
|
|
7650
7654
|
* Enforce function syntax by role.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-style.md
|
|
7652
7656
|
*/
|
|
7653
7657
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7654
7658
|
/**
|
|
7655
7659
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-json-file-read.md
|
|
7657
7661
|
*/
|
|
7658
7662
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7659
7663
|
/**
|
|
7660
7664
|
* Enforce consistent optional chaining for same-base member access.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-optional-chaining.md
|
|
7662
7666
|
*/
|
|
7663
7667
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7664
7668
|
/**
|
|
7665
7669
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7667
7671
|
*/
|
|
7668
7672
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7669
7673
|
/**
|
|
7670
7674
|
* Enforce consistent labels on tuple type elements.
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-tuple-labels.md
|
|
7672
7676
|
*/
|
|
7673
7677
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7674
7678
|
/**
|
|
7675
7679
|
* Enforce correct `Error` subclassing.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/custom-error-definition.md
|
|
7677
7681
|
*/
|
|
7678
7682
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7679
7683
|
/**
|
|
7680
7684
|
* Enforce consistent default export declarations.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/default-export-style.md
|
|
7682
7686
|
*/
|
|
7683
7687
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7684
7688
|
/**
|
|
7685
7689
|
* Enforce consistent style for DOM element dataset access.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/dom-node-dataset.md
|
|
7687
7691
|
*/
|
|
7688
7692
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7689
7693
|
/**
|
|
7690
7694
|
* Enforce no spaces between braces.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/empty-brace-spaces.md
|
|
7692
7696
|
*/
|
|
7693
7697
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7694
7698
|
/**
|
|
7695
7699
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/error-message.md
|
|
7697
7701
|
*/
|
|
7698
7702
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7699
7703
|
/**
|
|
7700
7704
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/escape-case.md
|
|
7702
7706
|
*/
|
|
7703
7707
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7704
7708
|
/**
|
|
7705
7709
|
* Add expiration conditions to TODO comments.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/expiring-todo-comments.md
|
|
7707
7711
|
*/
|
|
7708
7712
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7709
7713
|
/**
|
|
7710
7714
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-length-check.md
|
|
7712
7716
|
*/
|
|
7713
7717
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7714
7718
|
/**
|
|
7715
7719
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-timer-delay.md
|
|
7717
7721
|
*/
|
|
7718
7722
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7719
7723
|
/**
|
|
7720
7724
|
* Enforce a case style for filenames and directory names.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/filename-case.md
|
|
7722
7726
|
*/
|
|
7723
7727
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7724
7728
|
/**
|
|
7725
7729
|
* Require identifiers to match a specified regular expression.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/id-match.md
|
|
7727
7731
|
*/
|
|
7728
7732
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7729
7733
|
/**
|
|
7730
7734
|
* Enforce specific import styles per module.
|
|
7731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/import-style.md
|
|
7732
7736
|
*/
|
|
7733
7737
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7734
7738
|
/**
|
|
7735
7739
|
* Enforce consistent indentation in JSON and CSS.
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/indent.md
|
|
7737
7741
|
*/
|
|
7738
7742
|
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
7739
7743
|
/**
|
|
7740
7744
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/isolated-functions.md
|
|
7742
7746
|
*/
|
|
7743
7747
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7744
7748
|
/**
|
|
7745
7749
|
* Enforce a consistent style for optional loop sources.
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/iteration-fallback-style.md
|
|
7747
7751
|
*/
|
|
7748
7752
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7749
7753
|
/**
|
|
7750
7754
|
* Enforce a case style for data keys.
|
|
7751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/key-name-casing.md
|
|
7752
7756
|
*/
|
|
7753
7757
|
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
7754
7758
|
/**
|
|
7755
7759
|
* Require or disallow logical assignment operator shorthand
|
|
7756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/logical-assignment-operators.md
|
|
7757
7761
|
*/
|
|
7758
7762
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7759
7763
|
/**
|
|
7760
7764
|
* Limit the depth of nested calls.
|
|
7761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/max-nested-calls.md
|
|
7762
7766
|
*/
|
|
7763
7767
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7764
7768
|
/**
|
|
7765
7769
|
* Enforce replacements for variable, property, and filenames.
|
|
7766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/name-replacements.md
|
|
7767
7771
|
*/
|
|
7768
7772
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7769
7773
|
/**
|
|
7770
7774
|
* Enforce correct use of `new` for builtin constructors.
|
|
7771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/new-for-builtins.md
|
|
7772
7776
|
*/
|
|
7773
7777
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7774
7778
|
/**
|
|
7775
7779
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7777
7781
|
*/
|
|
7778
7782
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7779
7783
|
/**
|
|
7780
7784
|
* Disallow recursive access to `this` within getters and setters.
|
|
7781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accessor-recursion.md
|
|
7782
7786
|
*/
|
|
7783
7787
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7784
7788
|
/**
|
|
7785
7789
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7787
7791
|
*/
|
|
7788
7792
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7789
7793
|
/**
|
|
7790
7794
|
* Disallow anonymous functions and classes as the default export.
|
|
7791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-anonymous-default-export.md
|
|
7792
7796
|
*/
|
|
7793
7797
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7794
7798
|
/**
|
|
7795
7799
|
* Prevent passing a function reference directly to iterator methods.
|
|
7796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-callback-reference.md
|
|
7797
7801
|
*/
|
|
7798
7802
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7799
7803
|
/**
|
|
7800
7804
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7802
7806
|
*/
|
|
7803
7807
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7804
7808
|
/**
|
|
7805
7809
|
* Disallow using reference values as `Array#fill()` values.
|
|
7806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7807
7811
|
*/
|
|
7808
7812
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7809
7813
|
/**
|
|
7810
7814
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-from-fill.md
|
|
7812
7816
|
*/
|
|
7813
7817
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7814
7818
|
/**
|
|
7815
7819
|
* Disallow front-of-array mutation.
|
|
7816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-front-mutation.md
|
|
7817
7821
|
*/
|
|
7818
7822
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7819
7823
|
/**
|
|
7820
7824
|
* Disallow using the `this` argument in array methods.
|
|
7821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-method-this-argument.md
|
|
7822
7826
|
*/
|
|
7823
7827
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7824
7828
|
/**
|
|
7825
7829
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7827
7831
|
* @deprecated
|
|
7828
7832
|
*/
|
|
7829
7833
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7830
7834
|
/**
|
|
7831
7835
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reduce.md
|
|
7833
7837
|
*/
|
|
7834
7838
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7835
7839
|
/**
|
|
7836
7840
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reverse.md
|
|
7838
7842
|
*/
|
|
7839
7843
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7840
7844
|
/**
|
|
7841
7845
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort.md
|
|
7843
7847
|
*/
|
|
7844
7848
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7845
7849
|
/**
|
|
7846
7850
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7848
7852
|
*/
|
|
7849
7853
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7850
7854
|
/**
|
|
7851
7855
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-splice.md
|
|
7853
7857
|
*/
|
|
7854
7858
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7855
7859
|
/**
|
|
7856
7860
|
* Disallow asterisk prefixes and shared indentation in multiline comments.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7858
7862
|
*/
|
|
7859
7863
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7860
7864
|
/**
|
|
7861
7865
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-iterator-callback.md
|
|
7863
7867
|
*/
|
|
7864
7868
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
7865
7869
|
/**
|
|
7866
7870
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-promise-finally.md
|
|
7868
7872
|
*/
|
|
7869
7873
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7870
7874
|
/**
|
|
7871
7875
|
* Disallow member access from await expression.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-expression-member.md
|
|
7873
7877
|
*/
|
|
7874
7878
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7875
7879
|
/**
|
|
7876
7880
|
* Disallow using `await` in `Promise` method parameters.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7878
7882
|
*/
|
|
7879
7883
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7880
7884
|
/**
|
|
7881
7885
|
* Disallow barrel files.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-barrel-files.md
|
|
7883
7887
|
*/
|
|
7884
7888
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7885
7889
|
/**
|
|
7886
7890
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-blob-to-file.md
|
|
7888
7892
|
*/
|
|
7889
7893
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7890
7894
|
/**
|
|
7891
7895
|
* Disallow boolean-returning sort comparators.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7893
7897
|
*/
|
|
7894
7898
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7895
7899
|
/**
|
|
7896
7900
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7898
7902
|
*/
|
|
7899
7903
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
7900
7904
|
/**
|
|
7901
7905
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-canvas-to-image.md
|
|
7903
7907
|
*/
|
|
7904
7908
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7905
7909
|
/**
|
|
7906
7910
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-chained-comparison.md
|
|
7908
7912
|
*/
|
|
7909
7913
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7910
7914
|
/**
|
|
7911
7915
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-collection-bracket-access.md
|
|
7913
7917
|
*/
|
|
7914
7918
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7915
7919
|
/**
|
|
7916
7920
|
* Disallow dynamic object property existence checks.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7918
7922
|
*/
|
|
7919
7923
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7920
7924
|
/**
|
|
7921
7925
|
* Disallow conflicting CSS query and HTML form constraints.
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-conflicting-constraints.md
|
|
7923
7927
|
*/
|
|
7924
7928
|
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
7925
7929
|
/**
|
|
7926
7930
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-splice.md
|
|
7928
7932
|
*/
|
|
7929
7933
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7930
7934
|
/**
|
|
7931
7935
|
* Disallow confusing uses of `Array#with()`.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-with.md
|
|
7933
7937
|
*/
|
|
7934
7938
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7935
7939
|
/**
|
|
7936
7940
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-console-spaces.md
|
|
7938
7942
|
*/
|
|
7939
7943
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7940
7944
|
/**
|
|
7941
7945
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-constant-zero-expression.md
|
|
7943
7947
|
*/
|
|
7944
7948
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7945
7949
|
/**
|
|
7946
7950
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7948
7952
|
*/
|
|
7949
7953
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7950
7954
|
/**
|
|
7951
7955
|
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
7953
7957
|
* @deprecated
|
|
7954
7958
|
*/
|
|
7955
7959
|
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
7956
7960
|
/**
|
|
7957
7961
|
* Do not use `document.cookie` directly.
|
|
7958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-document-cookie.md
|
|
7959
7963
|
*/
|
|
7960
7964
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7961
7965
|
/**
|
|
7962
7966
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-double-comparison.md
|
|
7964
7968
|
*/
|
|
7965
7969
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7966
7970
|
/**
|
|
7967
7971
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
7968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
7969
7973
|
* @deprecated
|
|
7970
7974
|
*/
|
|
7971
7975
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
7972
7976
|
/**
|
|
7973
7977
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
7974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
7975
7979
|
* @deprecated
|
|
7976
7980
|
*/
|
|
7977
7981
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
7978
7982
|
/**
|
|
7979
7983
|
* Disallow duplicate adjacent branches in if chains.
|
|
7980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7981
7985
|
*/
|
|
7982
7986
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7983
7987
|
/**
|
|
7984
7988
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7986
7990
|
*/
|
|
7987
7991
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7988
7992
|
/**
|
|
7989
7993
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-loops.md
|
|
7991
7995
|
*/
|
|
7992
7996
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7993
7997
|
/**
|
|
7994
7998
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-set-values.md
|
|
7996
8000
|
*/
|
|
7997
8001
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7998
8002
|
/**
|
|
7999
8003
|
* Disallow empty files.
|
|
8000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-file.md
|
|
8001
8005
|
*/
|
|
8002
8006
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
8003
8007
|
/**
|
|
8004
8008
|
* Disallow empty link text in Markdown.
|
|
8005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-link-text.md
|
|
8006
8010
|
*/
|
|
8007
8011
|
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
8008
8012
|
/**
|
|
8009
8013
|
* Disallow assigning to built-in error properties.
|
|
8010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-error-property-assignment.md
|
|
8011
8015
|
*/
|
|
8012
8016
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
8013
8017
|
/**
|
|
8014
8018
|
* Disallow exports in scripts.
|
|
8015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-exports-in-scripts.md
|
|
8016
8020
|
*/
|
|
8017
8021
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
8018
8022
|
/**
|
|
8019
8023
|
* Prefer `for…of` over the `forEach` method.
|
|
8020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-each.md
|
|
8021
8025
|
*/
|
|
8022
8026
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
8023
8027
|
/**
|
|
8024
8028
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
8025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-loop.md
|
|
8026
8030
|
*/
|
|
8027
8031
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
8028
8032
|
/**
|
|
8029
8033
|
* Disallow assigning properties on the global object.
|
|
8030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-global-object-property-assignment.md
|
|
8031
8035
|
*/
|
|
8032
8036
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
8033
8037
|
/**
|
|
8034
8038
|
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
8035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
8036
8040
|
* @deprecated
|
|
8037
8041
|
*/
|
|
8038
8042
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
8039
8043
|
/**
|
|
8040
8044
|
* Disallow immediate mutation after assignment and initialization immediately after declaration.
|
|
8041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-immediate-mutation.md
|
|
8042
8046
|
*/
|
|
8043
8047
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
8044
8048
|
/**
|
|
8045
8049
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
8046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-impossible-length-comparison.md
|
|
8047
8051
|
*/
|
|
8048
8052
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
8049
8053
|
/**
|
|
8050
8054
|
* Disallow class accessors that hide an inherited getter or setter.
|
|
8051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
8052
8056
|
*/
|
|
8053
8057
|
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
8054
8058
|
/**
|
|
8055
8059
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
8056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-query-selector.md
|
|
8057
8061
|
*/
|
|
8058
8062
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
8059
8063
|
/**
|
|
8060
8064
|
* Disallow incorrect template literal interpolation syntax.
|
|
8061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
8062
8066
|
*/
|
|
8063
8067
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
8064
8068
|
/**
|
|
8065
8069
|
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
8066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
8067
8071
|
*/
|
|
8068
8072
|
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
8069
8073
|
/**
|
|
8070
8074
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
8071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
8072
8076
|
* @deprecated
|
|
8073
8077
|
*/
|
|
8074
8078
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
8075
8079
|
/**
|
|
8076
8080
|
* Disallow `instanceof` with built-in objects
|
|
8077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-instanceof-builtins.md
|
|
8078
8082
|
*/
|
|
8079
8083
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
8080
8084
|
/**
|
|
8081
8085
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
8082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-argument-count.md
|
|
8083
8087
|
*/
|
|
8084
8088
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
8085
8089
|
/**
|
|
8086
8090
|
* Disallow invalid values for HTML boolean attributes.
|
|
8087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
8088
8092
|
*/
|
|
8089
8093
|
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
8090
8094
|
/**
|
|
8091
8095
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
8092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-character-comparison.md
|
|
8093
8097
|
*/
|
|
8094
8098
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
8095
8099
|
/**
|
|
8096
8100
|
* Disallow invalid DOM tokens.
|
|
8097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-dom-token.md
|
|
8098
8102
|
*/
|
|
8099
8103
|
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
8100
8104
|
/**
|
|
8101
8105
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
8102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-fetch-options.md
|
|
8103
8107
|
*/
|
|
8104
8108
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8105
8109
|
/**
|
|
8106
8110
|
* Disallow invalid `accept` values on file inputs.
|
|
8107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
8108
8112
|
*/
|
|
8109
8113
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
8110
8114
|
/**
|
|
8111
8115
|
* Disallow invalid subresource integrity metadata.
|
|
8112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-integrity.md
|
|
8113
8117
|
*/
|
|
8114
8118
|
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
8115
8119
|
/**
|
|
8116
8120
|
* Disallow invalid or ignored Intl options.
|
|
8117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-intl-options.md
|
|
8118
8122
|
*/
|
|
8119
8123
|
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
8120
8124
|
/**
|
|
8121
8125
|
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
8122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
8123
8127
|
* @deprecated
|
|
8124
8128
|
*/
|
|
8125
8129
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
8126
8130
|
/**
|
|
8127
8131
|
* Disallow invalid property descriptors.
|
|
8128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
8129
8133
|
*/
|
|
8130
8134
|
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
8131
8135
|
/**
|
|
8132
8136
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
8133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
8134
8138
|
*/
|
|
8135
8139
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
8136
8140
|
/**
|
|
8137
8141
|
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
8138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-response-options.md
|
|
8139
8143
|
*/
|
|
8140
8144
|
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
8141
8145
|
/**
|
|
8142
8146
|
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
8143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-style-set-property.md
|
|
8144
8148
|
*/
|
|
8145
8149
|
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
8146
8150
|
/**
|
|
8147
8151
|
* Disallow statically known invalid Temporal arithmetic.
|
|
8148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
8149
8153
|
*/
|
|
8150
8154
|
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
8151
8155
|
/**
|
|
8152
8156
|
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
8153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
8154
8158
|
*/
|
|
8155
8159
|
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
8156
8160
|
/**
|
|
8157
8161
|
* Disallow invalid implementations of well-known symbol methods.
|
|
8158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
8159
8163
|
*/
|
|
8160
8164
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
8161
8165
|
/**
|
|
8162
8166
|
* Disallow `javascript:` URLs in Markdown.
|
|
8163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-javascript-url.md
|
|
8164
8168
|
*/
|
|
8165
8169
|
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
8166
8170
|
/**
|
|
8167
8171
|
* Disallow identifiers starting with `new` or `class`.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-keyword-prefix.md
|
|
8169
8173
|
*/
|
|
8170
8174
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
8171
8175
|
/**
|
|
8172
8176
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-current-target-access.md
|
|
8174
8178
|
*/
|
|
8175
8179
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
8176
8180
|
/**
|
|
8177
8181
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-event-control.md
|
|
8179
8183
|
*/
|
|
8180
8184
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
8181
8185
|
/**
|
|
8182
8186
|
* Disallow empty lines at the beginning of a file.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-leading-empty-lines.md
|
|
8184
8188
|
*/
|
|
8185
8189
|
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
8186
8190
|
/**
|
|
8187
8191
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
8189
8193
|
* @deprecated
|
|
8190
8194
|
*/
|
|
8191
8195
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
8192
8196
|
/**
|
|
8193
8197
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
8194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-lonely-if.md
|
|
8195
8199
|
*/
|
|
8196
8200
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
8197
8201
|
/**
|
|
8198
8202
|
* Disallow mutating a loop iterable during iteration.
|
|
8199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
8200
8204
|
*/
|
|
8201
8205
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
8202
8206
|
/**
|
|
8203
8207
|
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
8204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loss-of-precision.md
|
|
8205
8209
|
*/
|
|
8206
8210
|
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
8207
8211
|
/**
|
|
8208
8212
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
8209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
8210
8214
|
*/
|
|
8211
8215
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8212
8216
|
/**
|
|
8213
8217
|
* Disallow manually wrapped comments.
|
|
8214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
8215
8219
|
*/
|
|
8216
8220
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
8217
8221
|
/**
|
|
8218
8222
|
* Disallow checking a Map key before accessing a different key.
|
|
8219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-mismatched-map-key.md
|
|
8220
8224
|
*/
|
|
8221
8225
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
8222
8226
|
/**
|
|
8223
8227
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
8224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-misrefactored-assignment.md
|
|
8225
8229
|
*/
|
|
8226
8230
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
8227
8231
|
/**
|
|
8228
8232
|
* Disallow references to missing local resources.
|
|
8229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-missing-local-resource.md
|
|
8230
8234
|
*/
|
|
8231
8235
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
8232
8236
|
/**
|
|
8233
8237
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
8234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
8235
8239
|
*/
|
|
8236
8240
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
8237
8241
|
/**
|
|
8238
8242
|
* Disallow named usage of default import and export.
|
|
8239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-named-default.md
|
|
8240
8244
|
*/
|
|
8241
8245
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
8242
8246
|
/**
|
|
8243
8247
|
* Disallow negated array predicate calls.
|
|
8244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-array-predicate.md
|
|
8245
8249
|
*/
|
|
8246
8250
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8247
8251
|
/**
|
|
8248
8252
|
* Disallow negated comparisons.
|
|
8249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-comparison.md
|
|
8250
8254
|
*/
|
|
8251
8255
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
8252
8256
|
/**
|
|
8253
8257
|
* Disallow negated conditions.
|
|
8254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-condition.md
|
|
8255
8259
|
*/
|
|
8256
8260
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
8257
8261
|
/**
|
|
8258
8262
|
* Disallow negated expression in equality check.
|
|
8259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negation-in-equality-check.md
|
|
8260
8264
|
*/
|
|
8261
8265
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
8262
8266
|
/**
|
|
8263
8267
|
* Disallow nested ternary expressions.
|
|
8264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nested-ternary.md
|
|
8265
8269
|
*/
|
|
8266
8270
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8267
8271
|
/**
|
|
8268
8272
|
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
8269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
8270
8274
|
* @deprecated
|
|
8271
8275
|
*/
|
|
8272
8276
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
8273
8277
|
/**
|
|
8274
8278
|
* Disallow `new Array()`.
|
|
8275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-array.md
|
|
8276
8280
|
*/
|
|
8277
8281
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
8278
8282
|
/**
|
|
8279
8283
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
8280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-buffer.md
|
|
8281
8285
|
*/
|
|
8282
8286
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
8283
8287
|
/**
|
|
8284
8288
|
* Disallow non-function values with function-style verb prefixes.
|
|
8285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
8286
8290
|
*/
|
|
8287
8291
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
8288
8292
|
/**
|
|
8289
8293
|
* Disallow non-standard properties on built-in objects.
|
|
8290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
8291
8295
|
*/
|
|
8292
8296
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
8293
8297
|
/**
|
|
8294
8298
|
* Disallow the use of the `null` literal.
|
|
8295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-null.md
|
|
8296
8300
|
*/
|
|
8297
8301
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
8298
8302
|
/**
|
|
8299
8303
|
* Disallow the use of objects as default parameters.
|
|
8300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-as-default-parameter.md
|
|
8301
8305
|
*/
|
|
8302
8306
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
8303
8307
|
/**
|
|
8304
8308
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
8305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-methods-with-collections.md
|
|
8306
8310
|
*/
|
|
8307
8311
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
8308
8312
|
/**
|
|
8309
8313
|
* Disallow optional chaining on undeclared variables.
|
|
8310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
8311
8315
|
*/
|
|
8312
8316
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
8313
8317
|
/**
|
|
8314
8318
|
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
8315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
8316
8320
|
*/
|
|
8317
8321
|
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
8318
8322
|
/**
|
|
8319
8323
|
* Disallow `process.exit()`.
|
|
8320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-process-exit.md
|
|
8321
8325
|
*/
|
|
8322
8326
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
8323
8327
|
/**
|
|
8324
8328
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
8325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-redundant-comparison.md
|
|
8326
8330
|
*/
|
|
8327
8331
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
8328
8332
|
/**
|
|
8329
8333
|
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
8330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
8331
8335
|
* @deprecated
|
|
8332
8336
|
*/
|
|
8333
8337
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
8334
8338
|
/**
|
|
8335
8339
|
* Disallow repeating the same wrapper at every call to a function.
|
|
8336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-repeated-call-wrappers.md
|
|
8337
8341
|
*/
|
|
8338
8342
|
'unicorn/no-repeated-call-wrappers'?: Linter.RuleEntry<[]>;
|
|
8339
8343
|
/**
|
|
8340
8344
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
8341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-return-array-push.md
|
|
8342
8346
|
*/
|
|
8343
8347
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
8344
8348
|
/**
|
|
8345
8349
|
* Disallow selector syntax in DOM names.
|
|
8346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-selector-as-dom-name.md
|
|
8347
8351
|
*/
|
|
8348
8352
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
8349
8353
|
/**
|
|
8350
8354
|
* Disallow shorthand properties that override related longhand properties.
|
|
8351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
8352
8356
|
*/
|
|
8353
8357
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
8354
8358
|
/**
|
|
8355
8359
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
8356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
8357
8361
|
*/
|
|
8358
8362
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8359
8363
|
/**
|
|
8360
8364
|
* Disallow classes that only have static members.
|
|
8361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-static-only-class.md
|
|
8362
8366
|
*/
|
|
8363
8367
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
8364
8368
|
/**
|
|
8365
8369
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
8366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-subtraction-comparison.md
|
|
8367
8371
|
*/
|
|
8368
8372
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
8369
8373
|
/**
|
|
8370
8374
|
* Disallow `then` property.
|
|
8371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-thenable.md
|
|
8372
8376
|
*/
|
|
8373
8377
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
8374
8378
|
/**
|
|
8375
8379
|
* Disallow assigning `this` to a variable.
|
|
8376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-assignment.md
|
|
8377
8381
|
*/
|
|
8378
8382
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
8379
8383
|
/**
|
|
8380
8384
|
* Disallow `this` outside of classes.
|
|
8381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-outside-of-class.md
|
|
8382
8386
|
*/
|
|
8383
8387
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8384
8388
|
/**
|
|
8385
8389
|
* Disallow assigning to top-level variables from inside functions.
|
|
8386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8387
8391
|
*/
|
|
8388
8392
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8389
8393
|
/**
|
|
8390
8394
|
* Disallow top-level side effects in exported modules.
|
|
8391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-side-effects.md
|
|
8392
8396
|
*/
|
|
8393
8397
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<UnicornNoTopLevelSideEffects>;
|
|
8394
8398
|
/**
|
|
8395
8399
|
* Disallow `all` as a transition property.
|
|
8396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-transition-all.md
|
|
8397
8401
|
*/
|
|
8398
8402
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
8399
8403
|
/**
|
|
8400
8404
|
* Disallow comparing `undefined` using `typeof`.
|
|
8401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-typeof-undefined.md
|
|
8402
8406
|
*/
|
|
8403
8407
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8404
8408
|
/**
|
|
8405
8409
|
* Disallow referencing methods without calling them.
|
|
8406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-uncalled-method.md
|
|
8407
8411
|
*/
|
|
8408
8412
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8409
8413
|
/**
|
|
8410
8414
|
* Require class members to be declared.
|
|
8411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-undeclared-class-members.md
|
|
8412
8416
|
*/
|
|
8413
8417
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8414
8418
|
/**
|
|
8415
8419
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
8416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
8417
8421
|
* @deprecated
|
|
8418
8422
|
*/
|
|
8419
8423
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
8420
8424
|
/**
|
|
8421
8425
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
8422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
8423
8427
|
* @deprecated
|
|
8424
8428
|
*/
|
|
8425
8429
|
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
8426
8430
|
/**
|
|
8427
8431
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8429
8433
|
*/
|
|
8430
8434
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8431
8435
|
/**
|
|
8432
8436
|
* Disallow unnecessary use of `Array#flatMap()`.
|
|
8433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8434
8438
|
*/
|
|
8435
8439
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8436
8440
|
/**
|
|
8437
8441
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8439
8443
|
*/
|
|
8440
8444
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8441
8445
|
/**
|
|
8442
8446
|
* Disallow awaiting non-promise values.
|
|
8443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-await.md
|
|
8444
8448
|
*/
|
|
8445
8449
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8446
8450
|
/**
|
|
8447
8451
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8449
8453
|
*/
|
|
8450
8454
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8451
8455
|
/**
|
|
8452
8456
|
* Disallow arguments that match their parameter defaults.
|
|
8453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-default-arguments.md
|
|
8454
8458
|
*/
|
|
8455
8459
|
'unicorn/no-unnecessary-default-arguments'?: Linter.RuleEntry<[]>;
|
|
8456
8460
|
/**
|
|
8457
8461
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8459
8463
|
*/
|
|
8460
8464
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8461
8465
|
/**
|
|
8462
8466
|
* Disallow unnecessary `globalThis` references.
|
|
8463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8464
8468
|
*/
|
|
8465
8469
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8466
8470
|
/**
|
|
8467
8471
|
* Disallow unnecessary nested ternary expressions.
|
|
8468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8469
8473
|
*/
|
|
8470
8474
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8471
8475
|
/**
|
|
8472
8476
|
* Disallow parameters that receive the same value at every call.
|
|
8473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-parameters.md
|
|
8474
8478
|
*/
|
|
8475
8479
|
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
8476
8480
|
/**
|
|
8477
8481
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8479
8483
|
*/
|
|
8480
8484
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8481
8485
|
/**
|
|
8482
8486
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8484
8488
|
*/
|
|
8485
8489
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8486
8490
|
/**
|
|
8487
8491
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-splice.md
|
|
8489
8493
|
*/
|
|
8490
8494
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8491
8495
|
/**
|
|
8492
8496
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8494
8498
|
*/
|
|
8495
8499
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8496
8500
|
/**
|
|
8497
8501
|
* Disallow unreadable array destructuring.
|
|
8498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8499
8503
|
*/
|
|
8500
8504
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8501
8505
|
/**
|
|
8502
8506
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8504
8508
|
*/
|
|
8505
8509
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8506
8510
|
/**
|
|
8507
8511
|
* Disallow unreadable IIFEs.
|
|
8508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-iife.md
|
|
8509
8513
|
*/
|
|
8510
8514
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8511
8515
|
/**
|
|
8512
8516
|
* Disallow unreadable `new` expressions.
|
|
8513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8514
8518
|
*/
|
|
8515
8519
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8516
8520
|
/**
|
|
8517
8521
|
* Disallow unreadable object destructuring.
|
|
8518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8519
8523
|
*/
|
|
8520
8524
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8521
8525
|
/**
|
|
8522
8526
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8524
8528
|
*/
|
|
8525
8529
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8526
8530
|
/**
|
|
8527
8531
|
* Disallow unsafe DOM HTML APIs.
|
|
8528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8529
8533
|
*/
|
|
8530
8534
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8531
8535
|
/**
|
|
8532
8536
|
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
8533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
8534
8538
|
*/
|
|
8535
8539
|
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
8536
8540
|
/**
|
|
8537
8541
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8539
8543
|
*/
|
|
8540
8544
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8541
8545
|
/**
|
|
8542
8546
|
* Disallow unsafe values as property keys.
|
|
8543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-property-key.md
|
|
8544
8548
|
*/
|
|
8545
8549
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8546
8550
|
/**
|
|
8547
8551
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8549
8553
|
*/
|
|
8550
8554
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8551
8555
|
/**
|
|
8552
8556
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8554
8558
|
*/
|
|
8555
8559
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8556
8560
|
/**
|
|
8557
8561
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
8558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
8559
8563
|
* @deprecated
|
|
8560
8564
|
*/
|
|
8561
8565
|
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
8562
8566
|
/**
|
|
8563
8567
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
8564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
8565
8569
|
* @deprecated
|
|
8566
8570
|
*/
|
|
8567
8571
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8568
8572
|
/**
|
|
8569
8573
|
* Disallow ignoring the return value of selected built-in methods.
|
|
8570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
8571
8575
|
*/
|
|
8572
8576
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
8573
8577
|
/**
|
|
8574
8578
|
* Disallow discarding lazy iterator helpers.
|
|
8575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-iterator-helper.md
|
|
8576
8580
|
*/
|
|
8577
8581
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
8578
8582
|
/**
|
|
8579
8583
|
* Disallow unused object properties.
|
|
8580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-properties.md
|
|
8581
8585
|
*/
|
|
8582
8586
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8583
8587
|
/**
|
|
8584
8588
|
* Disallow passing full URLs to `URLSearchParams`.
|
|
8585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-url-in-search-params.md
|
|
8586
8590
|
*/
|
|
8587
8591
|
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
8588
8592
|
/**
|
|
8589
8593
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8591
8595
|
*/
|
|
8592
8596
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8593
8597
|
/**
|
|
8594
8598
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-coercion.md
|
|
8596
8600
|
*/
|
|
8597
8601
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8598
8602
|
/**
|
|
8599
8603
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-collection-argument.md
|
|
8601
8605
|
*/
|
|
8602
8606
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8603
8607
|
/**
|
|
8604
8608
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8606
8610
|
*/
|
|
8607
8611
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8608
8612
|
/**
|
|
8609
8613
|
* Disallow useless concatenation of literals.
|
|
8610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-concat.md
|
|
8611
8615
|
*/
|
|
8612
8616
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8613
8617
|
/**
|
|
8614
8618
|
* Disallow useless `continue` statements.
|
|
8615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-continue.md
|
|
8616
8620
|
*/
|
|
8617
8621
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8618
8622
|
/**
|
|
8619
8623
|
* Disallow unnecessary existence checks before deletion.
|
|
8620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-delete-check.md
|
|
8621
8625
|
*/
|
|
8622
8626
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8623
8627
|
/**
|
|
8624
8628
|
* Disallow `else` after a statement that exits.
|
|
8625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-else.md
|
|
8626
8630
|
*/
|
|
8627
8631
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8628
8632
|
/**
|
|
8629
8633
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8631
8635
|
*/
|
|
8632
8636
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8633
8637
|
/**
|
|
8634
8638
|
* Disallow useless fallback when spreading in object literals.
|
|
8635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8636
8640
|
*/
|
|
8637
8641
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8638
8642
|
/**
|
|
8639
8643
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8641
8645
|
*/
|
|
8642
8646
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8643
8647
|
/**
|
|
8644
8648
|
* Disallow useless array length check.
|
|
8645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-length-check.md
|
|
8646
8650
|
*/
|
|
8647
8651
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8648
8652
|
/**
|
|
8649
8653
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-logical-operand.md
|
|
8651
8655
|
*/
|
|
8652
8656
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8653
8657
|
/**
|
|
8654
8658
|
* Disallow useless overrides of class methods.
|
|
8655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-override.md
|
|
8656
8660
|
*/
|
|
8657
8661
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8658
8662
|
/**
|
|
8659
8663
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8661
8665
|
*/
|
|
8662
8666
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8663
8667
|
/**
|
|
8664
8668
|
* Disallow redundant re-exports.
|
|
8665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-re-export.md
|
|
8666
8670
|
*/
|
|
8667
8671
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8668
8672
|
/**
|
|
8669
8673
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-recursion.md
|
|
8671
8675
|
*/
|
|
8672
8676
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8673
8677
|
/**
|
|
8674
8678
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
8675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-set-construction.md
|
|
8676
8680
|
*/
|
|
8677
8681
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
8678
8682
|
/**
|
|
8679
8683
|
* Disallow unnecessary spread.
|
|
8680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-spread.md
|
|
8681
8685
|
*/
|
|
8682
8686
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8683
8687
|
/**
|
|
8684
8688
|
* Disallow useless case in switch statements.
|
|
8685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-switch-case.md
|
|
8686
8690
|
*/
|
|
8687
8691
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8688
8692
|
/**
|
|
8689
8693
|
* Disallow useless template literal expressions.
|
|
8690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-template-literals.md
|
|
8691
8695
|
*/
|
|
8692
8696
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8693
8697
|
/**
|
|
8694
8698
|
* Disallow useless `undefined`.
|
|
8695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-undefined.md
|
|
8696
8700
|
*/
|
|
8697
8701
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8698
8702
|
/**
|
|
8699
8703
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
8700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-using-resource-escape.md
|
|
8701
8705
|
*/
|
|
8702
8706
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
8703
8707
|
/**
|
|
8704
8708
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8706
8710
|
*/
|
|
8707
8711
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8708
8712
|
/**
|
|
8709
8713
|
* Require consistent decimal numbers without redundant zeros.
|
|
8710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-zero-fractions.md
|
|
8711
8715
|
*/
|
|
8712
8716
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8713
8717
|
/**
|
|
8714
8718
|
* Enforce proper case for numeric literals.
|
|
8715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/number-literal-case.md
|
|
8716
8720
|
*/
|
|
8717
8721
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8718
8722
|
/**
|
|
8719
8723
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/numeric-separators-style.md
|
|
8721
8725
|
*/
|
|
8722
8726
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8723
8727
|
/**
|
|
8724
8728
|
* Require assignment operator shorthand where possible.
|
|
8725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/operator-assignment.md
|
|
8726
8730
|
*/
|
|
8727
8731
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8728
8732
|
/**
|
|
8729
8733
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8731
8735
|
*/
|
|
8732
8736
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8733
8737
|
/**
|
|
8734
8738
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8736
8740
|
*/
|
|
8737
8741
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8738
8742
|
/**
|
|
8739
8743
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener.md
|
|
8741
8745
|
*/
|
|
8742
8746
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8743
8747
|
/**
|
|
8744
8748
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8746
8750
|
*/
|
|
8747
8751
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8748
8752
|
/**
|
|
8749
8753
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-aggregate-error.md
|
|
8751
8755
|
*/
|
|
8752
8756
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8753
8757
|
/**
|
|
8754
8758
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-find.md
|
|
8756
8760
|
*/
|
|
8757
8761
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8758
8762
|
/**
|
|
8759
8763
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat.md
|
|
8761
8765
|
*/
|
|
8762
8766
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8763
8767
|
/**
|
|
8764
8768
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat-map.md
|
|
8766
8770
|
*/
|
|
8767
8771
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8768
8772
|
/**
|
|
8769
8773
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
8770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-async.md
|
|
8771
8775
|
*/
|
|
8772
8776
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8773
8777
|
/**
|
|
8774
8778
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-map.md
|
|
8776
8780
|
*/
|
|
8777
8781
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8778
8782
|
/**
|
|
8779
8783
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-range.md
|
|
8781
8785
|
*/
|
|
8782
8786
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8783
8787
|
/**
|
|
8784
8788
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-index-of.md
|
|
8786
8790
|
*/
|
|
8787
8791
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8788
8792
|
/**
|
|
8789
8793
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8791
8795
|
*/
|
|
8792
8796
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8793
8797
|
/**
|
|
8794
8798
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-last-methods.md
|
|
8796
8800
|
*/
|
|
8797
8801
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8798
8802
|
/**
|
|
8799
8803
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-slice.md
|
|
8801
8805
|
*/
|
|
8802
8806
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8803
8807
|
/**
|
|
8804
8808
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-some.md
|
|
8806
8810
|
*/
|
|
8807
8811
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8808
8812
|
/**
|
|
8809
8813
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-at.md
|
|
8811
8815
|
*/
|
|
8812
8816
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8813
8817
|
/**
|
|
8814
8818
|
* Prefer `await` over promise chaining.
|
|
8815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-await.md
|
|
8816
8820
|
*/
|
|
8817
8821
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8818
8822
|
/**
|
|
8819
8823
|
* Prefer `BigInt` literals over the constructor.
|
|
8820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-bigint-literals.md
|
|
8821
8825
|
*/
|
|
8822
8826
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8823
8827
|
/**
|
|
8824
8828
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8826
8830
|
*/
|
|
8827
8831
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8828
8832
|
/**
|
|
8829
8833
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8831
8835
|
*/
|
|
8832
8836
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8833
8837
|
/**
|
|
8834
8838
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-boolean-return.md
|
|
8836
8840
|
*/
|
|
8837
8841
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8838
8842
|
/**
|
|
8839
8843
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-class-fields.md
|
|
8841
8845
|
*/
|
|
8842
8846
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8843
8847
|
/**
|
|
8844
8848
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8846
8850
|
*/
|
|
8847
8851
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8848
8852
|
/**
|
|
8849
8853
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-code-point.md
|
|
8851
8855
|
*/
|
|
8852
8856
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8853
8857
|
/**
|
|
8854
8858
|
* Prefer combining consecutive guards with identical exit statements.
|
|
8855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-combined-guards.md
|
|
8856
8860
|
*/
|
|
8857
8861
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
8858
8862
|
/**
|
|
8859
8863
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
8860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-continue.md
|
|
8861
8865
|
*/
|
|
8862
8866
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8863
8867
|
/**
|
|
8864
8868
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-date-now.md
|
|
8866
8870
|
*/
|
|
8867
8871
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8868
8872
|
/**
|
|
8869
8873
|
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
8870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-default-parameters.md
|
|
8871
8875
|
*/
|
|
8872
8876
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<UnicornPreferDefaultParameters>;
|
|
8873
8877
|
/**
|
|
8874
8878
|
* Prefer direct iteration over default iterator method calls.
|
|
8875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-direct-iteration.md
|
|
8876
8880
|
*/
|
|
8877
8881
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8878
8882
|
/**
|
|
8879
8883
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dispose.md
|
|
8881
8885
|
*/
|
|
8882
8886
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8883
8887
|
/**
|
|
8884
8888
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-append.md
|
|
8886
8890
|
*/
|
|
8887
8891
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8888
8892
|
/**
|
|
8889
8893
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8891
8895
|
* @deprecated
|
|
8892
8896
|
*/
|
|
8893
8897
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8894
8898
|
/**
|
|
8895
8899
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8897
8901
|
*/
|
|
8898
8902
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8899
8903
|
/**
|
|
8900
8904
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8902
8906
|
*/
|
|
8903
8907
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8904
8908
|
/**
|
|
8905
8909
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
8906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8907
8911
|
*/
|
|
8908
8912
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8909
8913
|
/**
|
|
8910
8914
|
* Prefer `.textContent` over `.innerText`.
|
|
8911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8912
8916
|
*/
|
|
8913
8917
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8914
8918
|
/**
|
|
8915
8919
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
8916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-early-return.md
|
|
8917
8921
|
*/
|
|
8918
8922
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8919
8923
|
/**
|
|
8920
8924
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-else-if.md
|
|
8922
8926
|
*/
|
|
8923
8927
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8924
8928
|
/**
|
|
8925
8929
|
* Prefer `Error.isError()` when checking for errors.
|
|
8926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-error-is-error.md
|
|
8927
8931
|
*/
|
|
8928
8932
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8929
8933
|
/**
|
|
8930
8934
|
* Prefer escape sequences for irregular whitespace characters.
|
|
8931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
8932
8936
|
*/
|
|
8933
8937
|
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
8934
8938
|
/**
|
|
8935
8939
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-event-target.md
|
|
8937
8941
|
*/
|
|
8938
8942
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8939
8943
|
/**
|
|
8940
8944
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
8941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
8942
8946
|
* @deprecated
|
|
8943
8947
|
*/
|
|
8944
8948
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
8945
8949
|
/**
|
|
8946
8950
|
* Prefer `export…from` when re-exporting.
|
|
8947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-export-from.md
|
|
8948
8952
|
*/
|
|
8949
8953
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8950
8954
|
/**
|
|
8951
8955
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8953
8957
|
*/
|
|
8954
8958
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8955
8959
|
/**
|
|
8956
8960
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8958
8962
|
*/
|
|
8959
8963
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8960
8964
|
/**
|
|
8961
8965
|
* Prefer global numeric constants over `Number` static properties.
|
|
8962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-number-constants.md
|
|
8963
8967
|
*/
|
|
8964
8968
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8965
8969
|
/**
|
|
8966
8970
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-this.md
|
|
8968
8972
|
*/
|
|
8969
8973
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8970
8974
|
/**
|
|
8971
8975
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
8972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-group-by.md
|
|
8973
8977
|
*/
|
|
8974
8978
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8975
8979
|
/**
|
|
8976
8980
|
* Prefer `.has()` when checking existence.
|
|
8977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-has-check.md
|
|
8978
8982
|
*/
|
|
8979
8983
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8980
8984
|
/**
|
|
8981
8985
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8983
8987
|
*/
|
|
8984
8988
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8985
8989
|
/**
|
|
8986
8990
|
* Prefer HTTPS over HTTP.
|
|
8987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-https.md
|
|
8988
8992
|
*/
|
|
8989
8993
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8990
8994
|
/**
|
|
8991
8995
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8993
8997
|
*/
|
|
8994
8998
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8995
8999
|
/**
|
|
8996
9000
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8998
9002
|
*/
|
|
8999
9003
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
9000
9004
|
/**
|
|
9001
9005
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
9002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes.md
|
|
9003
9007
|
*/
|
|
9004
9008
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
9005
9009
|
/**
|
|
9006
9010
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
9007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
9008
9012
|
*/
|
|
9009
9013
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
9010
9014
|
/**
|
|
9011
9015
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
9012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
9013
9017
|
*/
|
|
9014
9018
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
9015
9019
|
/**
|
|
9016
9020
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
9017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-concat.md
|
|
9018
9022
|
*/
|
|
9019
9023
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
9020
9024
|
/**
|
|
9021
9025
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
9022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-helpers.md
|
|
9023
9027
|
*/
|
|
9024
9028
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
9025
9029
|
/**
|
|
9026
9030
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
9027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array.md
|
|
9028
9032
|
*/
|
|
9029
9033
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
9030
9034
|
/**
|
|
9031
9035
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
9032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
9033
9037
|
*/
|
|
9034
9038
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
9035
9039
|
/**
|
|
9036
9040
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
9037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-zip.md
|
|
9038
9042
|
*/
|
|
9039
9043
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
9040
9044
|
/**
|
|
9041
9045
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
9042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-json-import.md
|
|
9043
9047
|
*/
|
|
9044
9048
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
9045
9049
|
/**
|
|
9046
9050
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
9047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
9048
9052
|
* @deprecated
|
|
9049
9053
|
*/
|
|
9050
9054
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
9051
9055
|
/**
|
|
9052
9056
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
9053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
9054
9058
|
*/
|
|
9055
9059
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
9056
9060
|
/**
|
|
9057
9061
|
* Prefer literal printable ASCII characters over escape sequences.
|
|
9058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-literal-ascii.md
|
|
9059
9063
|
*/
|
|
9060
9064
|
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
9061
9065
|
/**
|
|
9062
9066
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
9063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-location-assign.md
|
|
9064
9068
|
*/
|
|
9065
9069
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
9066
9070
|
/**
|
|
9067
9071
|
* Prefer using a logical operator over a ternary.
|
|
9068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
9069
9073
|
*/
|
|
9070
9074
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
9071
9075
|
/**
|
|
9072
9076
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
9073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-map-from-entries.md
|
|
9074
9078
|
*/
|
|
9075
9079
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
9076
9080
|
/**
|
|
9077
9081
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
9078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-abs.md
|
|
9079
9083
|
*/
|
|
9080
9084
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
9081
9085
|
/**
|
|
9082
9086
|
* Prefer `Math` constants over their approximate numeric values.
|
|
9083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-constants.md
|
|
9084
9088
|
*/
|
|
9085
9089
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
9086
9090
|
/**
|
|
9087
9091
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
9088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-min-max.md
|
|
9089
9093
|
*/
|
|
9090
9094
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
9091
9095
|
/**
|
|
9092
9096
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
9093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-trunc.md
|
|
9094
9098
|
*/
|
|
9095
9099
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
9096
9100
|
/**
|
|
9097
9101
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
9098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
9099
9103
|
* @deprecated
|
|
9100
9104
|
*/
|
|
9101
9105
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
9102
9106
|
/**
|
|
9103
9107
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
9104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-minimal-ternary.md
|
|
9105
9109
|
*/
|
|
9106
9110
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
9107
9111
|
/**
|
|
9108
9112
|
* Prefer modern DOM APIs.
|
|
9109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
9110
9114
|
*/
|
|
9111
9115
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
9112
9116
|
/**
|
|
9113
9117
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
9114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-math-apis.md
|
|
9115
9119
|
*/
|
|
9116
9120
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
9117
9121
|
/**
|
|
9118
9122
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
9119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-module.md
|
|
9120
9124
|
*/
|
|
9121
9125
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
9122
9126
|
/**
|
|
9123
9127
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
9124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
9125
9129
|
*/
|
|
9126
9130
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
9127
9131
|
/**
|
|
9128
9132
|
* Prefer negative index over `.length - index` when possible.
|
|
9129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-negative-index.md
|
|
9130
9134
|
*/
|
|
9131
9135
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
9132
9136
|
/**
|
|
9133
9137
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
9134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-node-protocol.md
|
|
9135
9139
|
*/
|
|
9136
9140
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
9137
9141
|
/**
|
|
9138
9142
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
9139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-coercion.md
|
|
9140
9144
|
*/
|
|
9141
9145
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
9142
9146
|
/**
|
|
9143
9147
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
9144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
9145
9149
|
*/
|
|
9146
9150
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
9147
9151
|
/**
|
|
9148
9152
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
9149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-properties.md
|
|
9150
9154
|
*/
|
|
9151
9155
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
9152
9156
|
/**
|
|
9153
9157
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
9154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-define-properties.md
|
|
9155
9159
|
*/
|
|
9156
9160
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
9157
9161
|
/**
|
|
9158
9162
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
9159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
9160
9164
|
*/
|
|
9161
9165
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
9162
9166
|
/**
|
|
9163
9167
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
9164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-from-entries.md
|
|
9165
9169
|
*/
|
|
9166
9170
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
9167
9171
|
/**
|
|
9168
9172
|
* Prefer the most specific `Object` iterable method.
|
|
9169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
9170
9174
|
*/
|
|
9171
9175
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
9172
9176
|
/**
|
|
9173
9177
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
9174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-observer-apis.md
|
|
9175
9179
|
*/
|
|
9176
9180
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
9177
9181
|
/**
|
|
9178
9182
|
* Prefer omitting the `catch` binding parameter.
|
|
9179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
9180
9184
|
*/
|
|
9181
9185
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
9182
9186
|
/**
|
|
9183
9187
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
9184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-path2d.md
|
|
9185
9189
|
*/
|
|
9186
9190
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
9187
9191
|
/**
|
|
9188
9192
|
* Prefer private class fields over the underscore-prefix convention.
|
|
9189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-private-class-fields.md
|
|
9190
9194
|
*/
|
|
9191
9195
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
9192
9196
|
/**
|
|
9193
9197
|
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
9194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-static-methods.md
|
|
9195
9199
|
*/
|
|
9196
9200
|
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
9197
9201
|
/**
|
|
9198
9202
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
9199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-try.md
|
|
9200
9204
|
*/
|
|
9201
9205
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
9202
9206
|
/**
|
|
9203
9207
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
9204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
9205
9209
|
*/
|
|
9206
9210
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
9207
9211
|
/**
|
|
9208
9212
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
9209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-prototype-methods.md
|
|
9210
9214
|
*/
|
|
9211
9215
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
9212
9216
|
/**
|
|
9213
9217
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
9214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-query-selector.md
|
|
9215
9219
|
*/
|
|
9216
9220
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
9217
9221
|
/**
|
|
9218
9222
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
9219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-queue-microtask.md
|
|
9220
9224
|
*/
|
|
9221
9225
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
9222
9226
|
/**
|
|
9223
9227
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
9224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-reflect-apply.md
|
|
9225
9229
|
*/
|
|
9226
9230
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
9227
9231
|
/**
|
|
9228
9232
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
9229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-escape.md
|
|
9230
9234
|
*/
|
|
9231
9235
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
9232
9236
|
/**
|
|
9233
9237
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
9234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-test.md
|
|
9235
9239
|
*/
|
|
9236
9240
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
9237
9241
|
/**
|
|
9238
9242
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
9239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-response-static-json.md
|
|
9240
9244
|
*/
|
|
9241
9245
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
9242
9246
|
/**
|
|
9243
9247
|
* Prefer `:scope` when using element query selector methods.
|
|
9244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-scoped-selector.md
|
|
9245
9249
|
*/
|
|
9246
9250
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
9247
9251
|
/**
|
|
9248
9252
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
9249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-has.md
|
|
9250
9254
|
*/
|
|
9251
9255
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
9252
9256
|
/**
|
|
9253
9257
|
* Prefer `Set` methods for Set operations.
|
|
9254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-methods.md
|
|
9255
9259
|
*/
|
|
9256
9260
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
9257
9261
|
/**
|
|
9258
9262
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
9259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-size.md
|
|
9260
9264
|
*/
|
|
9261
9265
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
9262
9266
|
/**
|
|
9263
9267
|
* Prefer arrow function properties over methods with a single return.
|
|
9264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-arrow-method.md
|
|
9265
9269
|
*/
|
|
9266
9270
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
9267
9271
|
/**
|
|
9268
9272
|
* Prefer shorter alternatives to Unicode escape sequences.
|
|
9269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
9270
9274
|
*/
|
|
9271
9275
|
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
9272
9276
|
/**
|
|
9273
9277
|
* Prefer simple conditions first in logical expressions.
|
|
9274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-condition-first.md
|
|
9275
9279
|
*/
|
|
9276
9280
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
9277
9281
|
/**
|
|
9278
9282
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
9279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
9280
9284
|
*/
|
|
9281
9285
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9282
9286
|
/**
|
|
9283
9287
|
* Prefer simplified conditions.
|
|
9284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simplified-conditions.md
|
|
9285
9289
|
*/
|
|
9286
9290
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
9287
9291
|
/**
|
|
9288
9292
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
9289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-array-predicate.md
|
|
9290
9294
|
*/
|
|
9291
9295
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9292
9296
|
/**
|
|
9293
9297
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
9294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-call.md
|
|
9295
9299
|
*/
|
|
9296
9300
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
9297
9301
|
/**
|
|
9298
9302
|
* Prefer a single object destructuring declaration per local const source.
|
|
9299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
9300
9304
|
*/
|
|
9301
9305
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
9302
9306
|
/**
|
|
9303
9307
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
9304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-replace.md
|
|
9305
9309
|
*/
|
|
9306
9310
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
9307
9311
|
/**
|
|
9308
|
-
* Prefer declaring variables in the smallest possible scope.
|
|
9309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9312
|
+
* Prefer declaring variables and type aliases in the smallest possible scope.
|
|
9313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-smaller-scope.md
|
|
9310
9314
|
*/
|
|
9311
9315
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
9312
9316
|
/**
|
|
9313
9317
|
* Prefer `String#split()` with a limit.
|
|
9314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-split-limit.md
|
|
9315
9319
|
*/
|
|
9316
9320
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
9317
9321
|
/**
|
|
9318
9322
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
9319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-spread.md
|
|
9320
9324
|
*/
|
|
9321
9325
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
9322
9326
|
/**
|
|
9323
9327
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
9324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-match-all.md
|
|
9325
9329
|
*/
|
|
9326
9330
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
9327
9331
|
/**
|
|
9328
9332
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
9329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
9330
9334
|
*/
|
|
9331
9335
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
9332
9336
|
/**
|
|
9333
9337
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
9334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-raw.md
|
|
9335
9339
|
*/
|
|
9336
9340
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
9337
9341
|
/**
|
|
9338
9342
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-repeat.md
|
|
9340
9344
|
*/
|
|
9341
9345
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
9342
9346
|
/**
|
|
9343
9347
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
9344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-replace-all.md
|
|
9345
9349
|
*/
|
|
9346
9350
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
9347
9351
|
/**
|
|
9348
9352
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
9349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-slice.md
|
|
9350
9354
|
*/
|
|
9351
9355
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
9352
9356
|
/**
|
|
9353
9357
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
9354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
9355
9359
|
*/
|
|
9356
9360
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
9357
9361
|
/**
|
|
9358
9362
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
9359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
9360
9364
|
*/
|
|
9361
9365
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
9362
9366
|
/**
|
|
9363
9367
|
* Prefer using `structuredClone` to create a deep clone.
|
|
9364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-structured-clone.md
|
|
9365
9369
|
*/
|
|
9366
9370
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
9367
9371
|
/**
|
|
9368
9372
|
* Prefer `switch` over multiple `else-if`.
|
|
9369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-switch.md
|
|
9370
9374
|
*/
|
|
9371
9375
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
9372
9376
|
/**
|
|
9373
9377
|
* Prefer `Temporal` over `Date`.
|
|
9374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal.md
|
|
9375
9379
|
*/
|
|
9376
9380
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
9377
9381
|
/**
|
|
9378
9382
|
* Prefer direct Temporal conversion methods.
|
|
9379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal-conversion.md
|
|
9380
9384
|
*/
|
|
9381
9385
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
9382
9386
|
/**
|
|
9383
9387
|
* Prefer ternary expressions over simple `if` statements.
|
|
9384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-ternary.md
|
|
9385
9389
|
*/
|
|
9386
9390
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
9387
9391
|
/**
|
|
9388
9392
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
9389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-then-catch.md
|
|
9390
9394
|
*/
|
|
9391
9395
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
9392
9396
|
/**
|
|
9393
9397
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
9394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-toggle-attribute.md
|
|
9395
9399
|
*/
|
|
9396
9400
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
9397
9401
|
/**
|
|
9398
9402
|
* Prefer top-level await over top-level promises and async function calls.
|
|
9399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-top-level-await.md
|
|
9400
9404
|
*/
|
|
9401
9405
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
9402
9406
|
/**
|
|
9403
9407
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
9404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-error.md
|
|
9405
9409
|
*/
|
|
9406
9410
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
9407
9411
|
/**
|
|
9408
9412
|
* Require type literals to be last in union types.
|
|
9409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-literal-last.md
|
|
9410
9414
|
*/
|
|
9411
9415
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
9412
9416
|
/**
|
|
9413
9417
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
9414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-base64.md
|
|
9415
9419
|
*/
|
|
9416
9420
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
9417
9421
|
/**
|
|
9418
9422
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
9419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-hex.md
|
|
9420
9424
|
*/
|
|
9421
9425
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
9422
9426
|
/**
|
|
9423
9427
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
9424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unary-minus.md
|
|
9425
9429
|
*/
|
|
9426
9430
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
9427
9431
|
/**
|
|
9428
9432
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
9429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
9430
9434
|
*/
|
|
9431
9435
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
9432
9436
|
/**
|
|
9433
9437
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
9434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-can-parse.md
|
|
9435
9439
|
*/
|
|
9436
9440
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
9437
9441
|
/**
|
|
9438
9442
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
9439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-href.md
|
|
9440
9444
|
*/
|
|
9441
9445
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
9442
9446
|
/**
|
|
9443
9447
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
9444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-search-parameters.md
|
|
9445
9449
|
*/
|
|
9446
9450
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
9447
9451
|
/**
|
|
9448
9452
|
* Prefer putting the condition in the while statement.
|
|
9449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-while-loop-condition.md
|
|
9450
9454
|
*/
|
|
9451
9455
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
9452
9456
|
/**
|
|
9453
9457
|
* Renamed to `unicorn/name-replacements`.
|
|
9454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
9455
9459
|
* @deprecated
|
|
9456
9460
|
*/
|
|
9457
9461
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
9458
9462
|
/**
|
|
9459
9463
|
* Enforce consistent relative URL style.
|
|
9460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/relative-url-style.md
|
|
9461
9465
|
*/
|
|
9462
9466
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
9463
9467
|
/**
|
|
9464
9468
|
* Enforce using the separator argument with `Array#join()`.
|
|
9465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-join-separator.md
|
|
9466
9470
|
*/
|
|
9467
9471
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
9468
9472
|
/**
|
|
9469
9473
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
9470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-sort-compare.md
|
|
9471
9475
|
*/
|
|
9472
9476
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
9473
9477
|
/**
|
|
9474
9478
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
9475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-css-escape.md
|
|
9476
9480
|
*/
|
|
9477
9481
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
9478
9482
|
/**
|
|
9479
9483
|
* Require configured YAML frontmatter fields.
|
|
9480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-frontmatter-fields.md
|
|
9481
9485
|
*/
|
|
9482
9486
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
9483
9487
|
/**
|
|
9484
9488
|
* Require non-empty module attributes for imports and exports
|
|
9485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-attributes.md
|
|
9486
9490
|
*/
|
|
9487
9491
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
9488
9492
|
/**
|
|
9489
9493
|
* Require non-empty specifier list in import and export statements.
|
|
9490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-specifiers.md
|
|
9491
9495
|
*/
|
|
9492
9496
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9493
9497
|
/**
|
|
9494
9498
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9496
9500
|
*/
|
|
9497
9501
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9498
9502
|
/**
|
|
9499
9503
|
* Require passive event listeners for high-frequency events.
|
|
9500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-passive-events.md
|
|
9501
9505
|
*/
|
|
9502
9506
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9503
9507
|
/**
|
|
9504
9508
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-post-message-target-origin.md
|
|
9506
9510
|
*/
|
|
9507
9511
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9508
9512
|
/**
|
|
9509
9513
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9511
9515
|
*/
|
|
9512
9516
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9513
9517
|
/**
|
|
9514
9518
|
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
9515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-text-decoder-streaming.md
|
|
9516
9520
|
*/
|
|
9517
9521
|
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
9518
9522
|
/**
|
|
9519
9523
|
* Enforce a consistent style for single-line block comments.
|
|
9520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/single-line-block-comment-style.md
|
|
9521
9525
|
*/
|
|
9522
9526
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
9523
9527
|
/**
|
|
9524
9528
|
* Enforce better string content.
|
|
9525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/string-content.md
|
|
9526
9530
|
*/
|
|
9527
9531
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9528
9532
|
/**
|
|
9529
9533
|
* Enforce consistent brace style for `case` clauses.
|
|
9530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-braces.md
|
|
9531
9535
|
*/
|
|
9532
9536
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9533
9537
|
/**
|
|
9534
9538
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-break-position.md
|
|
9536
9540
|
*/
|
|
9537
9541
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9538
9542
|
/**
|
|
9539
9543
|
* Fix whitespace-insensitive template indentation.
|
|
9540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/template-indent.md
|
|
9541
9545
|
*/
|
|
9542
9546
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9543
9547
|
/**
|
|
9544
9548
|
* Enforce consistent case for text encoding identifiers.
|
|
9545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9546
9550
|
*/
|
|
9547
9551
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9548
9552
|
/**
|
|
9549
9553
|
* Require `new` when creating an error.
|
|
9550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/throw-new-error.md
|
|
9551
9555
|
*/
|
|
9552
9556
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9553
9557
|
/**
|
|
9554
9558
|
* Limit the complexity of `try` blocks.
|
|
9555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/try-complexity.md
|
|
9556
9560
|
*/
|
|
9557
9561
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9558
9562
|
/**
|
|
@@ -11177,6 +11181,13 @@ type AntfuIndentUnindent = [] | [{
|
|
|
11177
11181
|
indent?: number;
|
|
11178
11182
|
tags?: string[];
|
|
11179
11183
|
}];
|
|
11184
|
+
// ----- antfu/reasonable-newline -----
|
|
11185
|
+
type AntfuReasonableNewline = [] | [{
|
|
11186
|
+
minObjectProperties?: number;
|
|
11187
|
+
objectLineLength?: number;
|
|
11188
|
+
minArrayItems?: number;
|
|
11189
|
+
arrayLineLength?: number;
|
|
11190
|
+
}];
|
|
11180
11191
|
// ----- array-bracket-newline -----
|
|
11181
11192
|
type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
11182
11193
|
multiline?: boolean;
|
|
@@ -20432,6 +20443,9 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
20432
20443
|
}];
|
|
20433
20444
|
// ----- unicorn/comment-content -----
|
|
20434
20445
|
type UnicornCommentContent = [] | [{
|
|
20446
|
+
ignore?: (string | {
|
|
20447
|
+
[k: string]: unknown | undefined;
|
|
20448
|
+
})[];
|
|
20435
20449
|
checkUniformCase?: boolean;
|
|
20436
20450
|
extendDefaultReplacements?: boolean;
|
|
20437
20451
|
replacements?: {
|
|
@@ -20704,6 +20718,7 @@ type UnicornNoNull = [] | [{
|
|
|
20704
20718
|
}];
|
|
20705
20719
|
// ----- unicorn/no-top-level-side-effects -----
|
|
20706
20720
|
type UnicornNoTopLevelSideEffects = [] | [{
|
|
20721
|
+
checkUnknownCalls?: boolean;
|
|
20707
20722
|
allow?: {
|
|
20708
20723
|
[k: string]: string[] | undefined;
|
|
20709
20724
|
};
|
|
@@ -22563,8 +22578,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
22563
22578
|
}];
|
|
22564
22579
|
// Names of all the configs
|
|
22565
22580
|
type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/e18e/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/medusa/strict/0' | 'config/medusa/strict/1' | 'config/medusa/strict/2' | 'config/medusa/strict/3' | 'config/medusa/strict/4' | 'config/medusa/strict/5' | 'config/medusa/strict/6' | 'config/medusa/strict/7' | 'config/medusa/strict/8' | 'config/medusa/strict/9' | 'config/medusa/strict/10' | 'config/medusa/strict/11' | 'config/medusa/strict/12' | 'config/medusa/strict/13' | 'config/medusa/strict/14' | 'config/medusa/strict/15' | 'config/medusa/strict/16' | 'config/medusa/strict/17' | 'config/medusa/strict/18' | 'config/medusa/strict/19' | 'config/medusa/strict/20' | 'config/medusa/strict/21' | 'config/medusa/strict/22' | 'config/medusa/strict/23' | 'config/sanity/setup' | 'config/sanity/rules' | 'config/shadcn/setup' | 'config/shadcn/rules' | 'config/shadcn/components' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
|
|
22566
|
-
//#endregion
|
|
22567
|
-
//#region src/vendor/prettier-types.d.ts
|
|
22568
22581
|
/**
|
|
22569
22582
|
* Vendor types from Prettier so we don't rely on the dependency.
|
|
22570
22583
|
*/
|
|
@@ -22686,8 +22699,6 @@ interface VendoredPrettierOptionsRequired {
|
|
|
22686
22699
|
*/
|
|
22687
22700
|
xmlWhitespaceSensitivity: 'ignore' | 'strict' | 'preserve';
|
|
22688
22701
|
}
|
|
22689
|
-
//#endregion
|
|
22690
|
-
//#region src/types.d.ts
|
|
22691
22702
|
/**
|
|
22692
22703
|
* A value that may be returned directly or wrapped in a `Promise`.
|
|
22693
22704
|
*/
|
|
@@ -23746,8 +23757,6 @@ export type TypedFlatConfigItem = {
|
|
|
23746
23757
|
*/
|
|
23747
23758
|
rules?: Rules;
|
|
23748
23759
|
} & Omit<ConfigWithExtends, 'plugins' | 'rules'>;
|
|
23749
|
-
//#endregion
|
|
23750
|
-
//#region src/factory.d.ts
|
|
23751
23760
|
export declare const defaultPluginRenaming: {
|
|
23752
23761
|
'@eslint-react': string;
|
|
23753
23762
|
'@eslint-react/dom': string;
|
|
@@ -23776,39 +23785,17 @@ export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
|
23776
23785
|
export declare function config(options?: OptionsConfig & Omit<TypedFlatConfigItem, 'files' | 'ignores'>, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
23777
23786
|
export declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
23778
23787
|
export declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
23779
|
-
//#endregion
|
|
23780
|
-
//#region src/config-presets.d.ts
|
|
23781
23788
|
export declare const CONFIG_PRESET_FULL_ON: OptionsConfig;
|
|
23782
23789
|
export declare const CONFIG_PRESET_FULL_OFF: OptionsConfig;
|
|
23783
|
-
//#endregion
|
|
23784
|
-
//#region src/configs/astro.d.ts
|
|
23785
23790
|
export declare function astro(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23786
|
-
//#endregion
|
|
23787
|
-
//#region src/configs/command.d.ts
|
|
23788
23791
|
export declare function command(): Promise<TypedFlatConfigItem[]>;
|
|
23789
|
-
//#endregion
|
|
23790
|
-
//#region src/configs/comments.d.ts
|
|
23791
23792
|
export declare function comments(): Promise<TypedFlatConfigItem[]>;
|
|
23792
|
-
//#endregion
|
|
23793
|
-
//#region src/configs/disables.d.ts
|
|
23794
23793
|
export declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
23795
|
-
//#endregion
|
|
23796
|
-
//#region src/configs/e18e.d.ts
|
|
23797
23794
|
export declare function e18e(options?: OptionsE18e & OptionsProjectType & OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
23798
|
-
//#endregion
|
|
23799
|
-
//#region src/configs/formatters.d.ts
|
|
23800
23795
|
export declare function formatters(options?: true | OptionsFormatters, stylistic?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
|
|
23801
|
-
//#endregion
|
|
23802
|
-
//#region src/configs/ignores.d.ts
|
|
23803
23796
|
export declare function ignores(userIgnores?: ((originals: string[]) => string[]) | string[], ignoreTypeScript?: boolean): Promise<TypedFlatConfigItem[]>;
|
|
23804
|
-
//#endregion
|
|
23805
|
-
//#region src/configs/imports.d.ts
|
|
23806
23797
|
export declare function imports(options?: OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23807
|
-
//#endregion
|
|
23808
|
-
//#region src/configs/javascript.d.ts
|
|
23809
23798
|
export declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23810
|
-
//#endregion
|
|
23811
|
-
//#region src/configs/jsdoc.d.ts
|
|
23812
23799
|
/**
|
|
23813
23800
|
* JSDoc configuration.
|
|
23814
23801
|
*
|
|
@@ -23816,46 +23803,22 @@ export declare function javascript(options?: OptionsIsInEditor & OptionsOverride
|
|
|
23816
23803
|
* @returns {Promise<TypedFlatConfigItem[]>} The JSDoc configuration.
|
|
23817
23804
|
*/
|
|
23818
23805
|
export declare function jsdoc(options?: OptionsOverrides & OptionsProjectType & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23819
|
-
//#endregion
|
|
23820
|
-
//#region src/configs/jsonc.d.ts
|
|
23821
23806
|
export declare function jsonc(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23822
|
-
//#endregion
|
|
23823
|
-
//#region src/configs/jsx.d.ts
|
|
23824
23807
|
export declare function jsx(options?: OptionsJSX): Promise<TypedFlatConfigItem[]>;
|
|
23825
|
-
//#endregion
|
|
23826
|
-
//#region src/configs/markdown.d.ts
|
|
23827
23808
|
export declare function markdown(options?: OptionsComponentExts & OptionsFiles & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23828
|
-
//#endregion
|
|
23829
|
-
//#region src/configs/medusa.d.ts
|
|
23830
23809
|
export declare function medusa(options?: OptionsMedusa & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23831
|
-
//#endregion
|
|
23832
|
-
//#region src/configs/nextjs.d.ts
|
|
23833
23810
|
export declare function nextjs(options?: OptionsFiles & OptionsNextjs & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23834
|
-
//#endregion
|
|
23835
|
-
//#region src/configs/node.d.ts
|
|
23836
23811
|
export declare function node(): Promise<TypedFlatConfigItem[]>;
|
|
23837
|
-
//#endregion
|
|
23838
|
-
//#region src/configs/perfectionist.d.ts
|
|
23839
23812
|
/**
|
|
23840
23813
|
* Perfectionist plugin for props and items sorting.
|
|
23841
23814
|
*
|
|
23842
23815
|
* @see https://perfectionist.dev
|
|
23843
23816
|
*/
|
|
23844
23817
|
export declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
|
|
23845
|
-
//#endregion
|
|
23846
|
-
//#region src/configs/pnpm.d.ts
|
|
23847
23818
|
export declare function pnpm(options: OptionsPnpm): Promise<TypedFlatConfigItem[]>;
|
|
23848
|
-
//#endregion
|
|
23849
|
-
//#region src/configs/react.d.ts
|
|
23850
23819
|
export declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsReact & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
23851
|
-
//#endregion
|
|
23852
|
-
//#region src/configs/regexp.d.ts
|
|
23853
23820
|
export declare function regexp(options?: OptionsOverrides & OptionsRegExp): Promise<TypedFlatConfigItem[]>;
|
|
23854
|
-
//#endregion
|
|
23855
|
-
//#region src/configs/sanity.d.ts
|
|
23856
23821
|
export declare function sanity(options?: OptionsFiles & OptionsOverrides & OptionsSanity): Promise<TypedFlatConfigItem[]>;
|
|
23857
|
-
//#endregion
|
|
23858
|
-
//#region src/configs/shadcn.d.ts
|
|
23859
23822
|
/**
|
|
23860
23823
|
* Create the `@shadcn/lint` design system config.
|
|
23861
23824
|
*
|
|
@@ -23870,11 +23833,7 @@ export declare function shadcn(options?: {
|
|
|
23870
23833
|
svelte?: boolean;
|
|
23871
23834
|
vue?: boolean;
|
|
23872
23835
|
} & OptionsOverrides & OptionsShadcn): Promise<TypedFlatConfigItem[]>;
|
|
23873
|
-
//#endregion
|
|
23874
|
-
//#region src/configs/solid.d.ts
|
|
23875
23836
|
export declare function solid(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
23876
|
-
//#endregion
|
|
23877
|
-
//#region src/configs/sort.d.ts
|
|
23878
23837
|
/**
|
|
23879
23838
|
* packageSortOrder
|
|
23880
23839
|
*
|
|
@@ -23913,8 +23872,6 @@ export declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
|
|
|
23913
23872
|
* Requires `jsonc` config
|
|
23914
23873
|
*/
|
|
23915
23874
|
export declare function sortTsconfig(): TypedFlatConfigItem[];
|
|
23916
|
-
//#endregion
|
|
23917
|
-
//#region src/configs/storybook.d.ts
|
|
23918
23875
|
/**
|
|
23919
23876
|
* Storybook plugin for ESLint.
|
|
23920
23877
|
*
|
|
@@ -23924,45 +23881,21 @@ export declare function sortTsconfig(): TypedFlatConfigItem[];
|
|
|
23924
23881
|
* @returns {Promise<TypedFlatConfigItem[]>} Returns the Storybook config
|
|
23925
23882
|
*/
|
|
23926
23883
|
export declare function storybook(options?: OptionsFiles & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23927
|
-
//#endregion
|
|
23928
|
-
//#region src/configs/stylistic.d.ts
|
|
23929
23884
|
export declare const StylisticConfigDefaults: StylisticConfig;
|
|
23930
23885
|
export interface StylisticOptions extends OptionsOverrides, StylisticConfig {
|
|
23931
23886
|
lessOpinionated?: boolean;
|
|
23932
23887
|
}
|
|
23933
23888
|
export declare function stylistic(options?: StylisticOptions): Promise<TypedFlatConfigItem[]>;
|
|
23934
|
-
//#endregion
|
|
23935
|
-
//#region src/configs/svelte.d.ts
|
|
23936
23889
|
export declare function svelte(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23937
|
-
//#endregion
|
|
23938
|
-
//#region src/configs/tailwindcss.d.ts
|
|
23939
23890
|
export declare function tailwindcss(options?: OptionsFiles & OptionsOverrides & OptionsTailwindcss & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
23940
|
-
//#endregion
|
|
23941
|
-
//#region src/configs/test.d.ts
|
|
23942
23891
|
export declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
23943
|
-
//#endregion
|
|
23944
|
-
//#region src/configs/toml.d.ts
|
|
23945
23892
|
export declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23946
|
-
//#endregion
|
|
23947
|
-
//#region src/configs/typescript.d.ts
|
|
23948
23893
|
export declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType & OptionsTypeScriptErasableOnly): Promise<TypedFlatConfigItem[]>;
|
|
23949
|
-
//#endregion
|
|
23950
|
-
//#region src/configs/unicorn.d.ts
|
|
23951
23894
|
export declare function unicorn(options?: OptionsUnicorn): Promise<TypedFlatConfigItem[]>;
|
|
23952
|
-
//#endregion
|
|
23953
|
-
//#region src/configs/unocss.d.ts
|
|
23954
23895
|
export declare function unocss(options?: OptionsUnoCSS): Promise<TypedFlatConfigItem[]>;
|
|
23955
|
-
//#endregion
|
|
23956
|
-
//#region src/configs/vue.d.ts
|
|
23957
23896
|
export declare function vue(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsVue): Promise<TypedFlatConfigItem[]>;
|
|
23958
|
-
//#endregion
|
|
23959
|
-
//#region src/configs/yaml.d.ts
|
|
23960
23897
|
export declare function yaml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
23961
|
-
//#endregion
|
|
23962
|
-
//#region src/constants.d.ts
|
|
23963
23898
|
export declare const PACKAGE_NAME: "@infernodesign/eslint-config";
|
|
23964
|
-
//#endregion
|
|
23965
|
-
//#region src/globs.d.ts
|
|
23966
23899
|
export declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
23967
23900
|
export declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
23968
23901
|
export declare const GLOB_JS = "**/*.?([cm])js";
|
|
@@ -23996,8 +23929,6 @@ export declare const GLOB_TESTS: string[];
|
|
|
23996
23929
|
export declare const GLOB_ALL_SRC: string[];
|
|
23997
23930
|
export declare const GLOB_EXCLUDE: string[];
|
|
23998
23931
|
export declare const GLOB_SEARCH_EXCLUDE: Set<string>;
|
|
23999
|
-
//#endregion
|
|
24000
|
-
//#region src/utils.d.ts
|
|
24001
23932
|
/**
|
|
24002
23933
|
* Plain parser.
|
|
24003
23934
|
*
|
|
@@ -24113,5 +24044,4 @@ export declare function renameRules(rules: Record<string, any>, map: Record<stri
|
|
|
24113
24044
|
* @returns {T[]} The value as array.
|
|
24114
24045
|
*/
|
|
24115
24046
|
export declare function toArray<T>(value: T | T[]): T[];
|
|
24116
|
-
//#endregion
|
|
24117
24047
|
export type { ConfigNames };
|