@infernodesign/eslint-config 2.13.2 → 2.14.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/README.md +69 -69
- package/dist/cli.js +5 -5
- package/dist/index.d.ts +565 -403
- package/dist/index.js +12 -76
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -919,7 +919,7 @@ interface RuleOptions {
|
|
|
919
919
|
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
|
|
920
920
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header
|
|
921
921
|
*/
|
|
922
|
-
'jsdoc/check-syntax'?: Linter.RuleEntry<
|
|
922
|
+
'jsdoc/check-syntax'?: Linter.RuleEntry<JsdocCheckSyntax>;
|
|
923
923
|
/**
|
|
924
924
|
* Reports invalid block tag names.
|
|
925
925
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header
|
|
@@ -7522,1841 +7522,1992 @@ interface RuleOptions {
|
|
|
7522
7522
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7523
7523
|
/**
|
|
7524
7524
|
* Prefer better DOM traversal APIs.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/better-dom-traversing.md
|
|
7526
7526
|
*/
|
|
7527
7527
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7528
7528
|
/**
|
|
7529
7529
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7531
7531
|
* @deprecated
|
|
7532
7532
|
*/
|
|
7533
7533
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7534
7534
|
/**
|
|
7535
7535
|
* Enforce a specific parameter name in catch clauses.
|
|
7536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/catch-error-name.md
|
|
7537
7537
|
*/
|
|
7538
7538
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7539
7539
|
/**
|
|
7540
7540
|
* Enforce consistent class references in static methods.
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7542
7542
|
*/
|
|
7543
7543
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7544
|
+
/**
|
|
7545
|
+
* Enforce consistent spacing before and after commas in JSON.
|
|
7546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comma-spacing.md
|
|
7547
|
+
*/
|
|
7548
|
+
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
7544
7549
|
/**
|
|
7545
7550
|
* Enforce better comment content.
|
|
7546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comment-content.md
|
|
7547
7552
|
*/
|
|
7548
7553
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7549
7554
|
/**
|
|
7550
7555
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
7551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-arrow-return-style.md
|
|
7552
7557
|
*/
|
|
7553
7558
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
7554
7559
|
/**
|
|
7555
7560
|
* Enforce consistent assertion style with `node:assert`.
|
|
7556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-assert.md
|
|
7557
7562
|
*/
|
|
7558
7563
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7559
7564
|
/**
|
|
7560
7565
|
* Enforce consistent naming for boolean names.
|
|
7561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-boolean-name.md
|
|
7562
7567
|
*/
|
|
7563
7568
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7564
7569
|
/**
|
|
7565
7570
|
* Enforce consistent class member order.
|
|
7566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-class-member-order.md
|
|
7567
7572
|
*/
|
|
7568
7573
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7569
7574
|
/**
|
|
7570
7575
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-compound-words.md
|
|
7572
7577
|
*/
|
|
7573
7578
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7574
7579
|
/**
|
|
7575
7580
|
* Enforce consistent conditional object spread style.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7577
7582
|
*/
|
|
7578
7583
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7579
7584
|
/**
|
|
7580
7585
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-date-clone.md
|
|
7582
7587
|
*/
|
|
7583
7588
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7584
7589
|
/**
|
|
7585
7590
|
* Use destructured variables over properties.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-destructuring.md
|
|
7587
7592
|
*/
|
|
7588
7593
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7589
7594
|
/**
|
|
7590
7595
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7592
7597
|
*/
|
|
7593
7598
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7594
7599
|
/**
|
|
7595
7600
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-existence-index-check.md
|
|
7597
7602
|
*/
|
|
7598
7603
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7599
7604
|
/**
|
|
7600
7605
|
* Enforce consistent decorator position on exported classes.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7602
7607
|
*/
|
|
7603
7608
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7604
7609
|
/**
|
|
7605
7610
|
* Move function definitions to the highest possible scope.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-scoping.md
|
|
7607
7612
|
*/
|
|
7608
7613
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7609
7614
|
/**
|
|
7610
7615
|
* Enforce function syntax by role.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-style.md
|
|
7612
7617
|
*/
|
|
7613
7618
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7614
7619
|
/**
|
|
7615
7620
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-json-file-read.md
|
|
7617
7622
|
*/
|
|
7618
7623
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7619
7624
|
/**
|
|
7620
7625
|
* Enforce consistent optional chaining for same-base member access.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-optional-chaining.md
|
|
7622
7627
|
*/
|
|
7623
7628
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7624
7629
|
/**
|
|
7625
7630
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7627
7632
|
*/
|
|
7628
7633
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7629
7634
|
/**
|
|
7630
7635
|
* Enforce consistent labels on tuple type elements.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-tuple-labels.md
|
|
7632
7637
|
*/
|
|
7633
7638
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7634
7639
|
/**
|
|
7635
7640
|
* Enforce correct `Error` subclassing.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/custom-error-definition.md
|
|
7637
7642
|
*/
|
|
7638
7643
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7639
7644
|
/**
|
|
7640
7645
|
* Enforce consistent default export declarations.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/default-export-style.md
|
|
7642
7647
|
*/
|
|
7643
7648
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7644
7649
|
/**
|
|
7645
7650
|
* Enforce consistent style for DOM element dataset access.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/dom-node-dataset.md
|
|
7647
7652
|
*/
|
|
7648
7653
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7649
7654
|
/**
|
|
7650
7655
|
* Enforce no spaces between braces.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/empty-brace-spaces.md
|
|
7652
7657
|
*/
|
|
7653
7658
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7654
7659
|
/**
|
|
7655
7660
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/error-message.md
|
|
7657
7662
|
*/
|
|
7658
7663
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7659
7664
|
/**
|
|
7660
7665
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/escape-case.md
|
|
7662
7667
|
*/
|
|
7663
7668
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7664
7669
|
/**
|
|
7665
7670
|
* Add expiration conditions to TODO comments.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/expiring-todo-comments.md
|
|
7667
7672
|
*/
|
|
7668
7673
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7669
7674
|
/**
|
|
7670
7675
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-length-check.md
|
|
7672
7677
|
*/
|
|
7673
7678
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7674
7679
|
/**
|
|
7675
7680
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-timer-delay.md
|
|
7677
7682
|
*/
|
|
7678
7683
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7679
7684
|
/**
|
|
7680
7685
|
* Enforce a case style for filenames and directory names.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/filename-case.md
|
|
7682
7687
|
*/
|
|
7683
7688
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7684
7689
|
/**
|
|
7685
7690
|
* Require identifiers to match a specified regular expression.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/id-match.md
|
|
7687
7692
|
*/
|
|
7688
7693
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7689
7694
|
/**
|
|
7690
7695
|
* Enforce specific import styles per module.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/import-style.md
|
|
7692
7697
|
*/
|
|
7693
7698
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7699
|
+
/**
|
|
7700
|
+
* Enforce consistent indentation in JSON and CSS.
|
|
7701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/indent.md
|
|
7702
|
+
*/
|
|
7703
|
+
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
7694
7704
|
/**
|
|
7695
7705
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/isolated-functions.md
|
|
7697
7707
|
*/
|
|
7698
7708
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7699
7709
|
/**
|
|
7700
7710
|
* Enforce a consistent style for optional loop sources.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/iteration-fallback-style.md
|
|
7702
7712
|
*/
|
|
7703
7713
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
7714
|
+
/**
|
|
7715
|
+
* Enforce a case style for data keys.
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/key-name-casing.md
|
|
7717
|
+
*/
|
|
7718
|
+
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
7704
7719
|
/**
|
|
7705
7720
|
* Require or disallow logical assignment operator shorthand
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/logical-assignment-operators.md
|
|
7707
7722
|
*/
|
|
7708
7723
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7709
7724
|
/**
|
|
7710
7725
|
* Limit the depth of nested calls.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/max-nested-calls.md
|
|
7712
7727
|
*/
|
|
7713
7728
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7714
7729
|
/**
|
|
7715
7730
|
* Enforce replacements for variable, property, and filenames.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/name-replacements.md
|
|
7717
7732
|
*/
|
|
7718
7733
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7719
7734
|
/**
|
|
7720
7735
|
* Enforce correct use of `new` for builtin constructors.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/new-for-builtins.md
|
|
7722
7737
|
*/
|
|
7723
7738
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7724
7739
|
/**
|
|
7725
7740
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7727
7742
|
*/
|
|
7728
7743
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7729
7744
|
/**
|
|
7730
7745
|
* Disallow recursive access to `this` within getters and setters.
|
|
7731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accessor-recursion.md
|
|
7732
7747
|
*/
|
|
7733
7748
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7734
7749
|
/**
|
|
7735
7750
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7737
7752
|
*/
|
|
7738
7753
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7739
7754
|
/**
|
|
7740
7755
|
* Disallow anonymous functions and classes as the default export.
|
|
7741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-anonymous-default-export.md
|
|
7742
7757
|
*/
|
|
7743
7758
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7744
7759
|
/**
|
|
7745
7760
|
* Prevent passing a function reference directly to iterator methods.
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-callback-reference.md
|
|
7747
7762
|
*/
|
|
7748
7763
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7749
7764
|
/**
|
|
7750
7765
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7752
7767
|
*/
|
|
7753
7768
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7754
7769
|
/**
|
|
7755
7770
|
* Disallow using reference values as `Array#fill()` values.
|
|
7756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7757
7772
|
*/
|
|
7758
7773
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7759
7774
|
/**
|
|
7760
7775
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-from-fill.md
|
|
7762
7777
|
*/
|
|
7763
7778
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7764
7779
|
/**
|
|
7765
7780
|
* Disallow front-of-array mutation.
|
|
7766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-front-mutation.md
|
|
7767
7782
|
*/
|
|
7768
7783
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7769
7784
|
/**
|
|
7770
7785
|
* Disallow using the `this` argument in array methods.
|
|
7771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-method-this-argument.md
|
|
7772
7787
|
*/
|
|
7773
7788
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7774
7789
|
/**
|
|
7775
7790
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7777
7792
|
* @deprecated
|
|
7778
7793
|
*/
|
|
7779
7794
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7780
7795
|
/**
|
|
7781
7796
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reduce.md
|
|
7783
7798
|
*/
|
|
7784
7799
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7785
7800
|
/**
|
|
7786
7801
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reverse.md
|
|
7788
7803
|
*/
|
|
7789
7804
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7790
7805
|
/**
|
|
7791
7806
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort.md
|
|
7793
7808
|
*/
|
|
7794
7809
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7795
7810
|
/**
|
|
7796
7811
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7798
7813
|
*/
|
|
7799
7814
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7800
7815
|
/**
|
|
7801
7816
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-splice.md
|
|
7803
7818
|
*/
|
|
7804
7819
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7805
7820
|
/**
|
|
7806
|
-
* Disallow asterisk prefixes in
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7821
|
+
* Disallow asterisk prefixes in multiline comments.
|
|
7822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7808
7823
|
*/
|
|
7809
7824
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7810
7825
|
/**
|
|
7811
7826
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-iterator-callback.md
|
|
7813
7828
|
*/
|
|
7814
7829
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
7815
7830
|
/**
|
|
7816
7831
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-promise-finally.md
|
|
7818
7833
|
*/
|
|
7819
7834
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7820
7835
|
/**
|
|
7821
7836
|
* Disallow member access from await expression.
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-expression-member.md
|
|
7823
7838
|
*/
|
|
7824
7839
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7825
7840
|
/**
|
|
7826
7841
|
* Disallow using `await` in `Promise` method parameters.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7828
7843
|
*/
|
|
7829
7844
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7830
7845
|
/**
|
|
7831
7846
|
* Disallow barrel files.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-barrel-files.md
|
|
7833
7848
|
*/
|
|
7834
7849
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
7835
7850
|
/**
|
|
7836
7851
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-blob-to-file.md
|
|
7838
7853
|
*/
|
|
7839
7854
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7840
7855
|
/**
|
|
7841
7856
|
* Disallow boolean-returning sort comparators.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7843
7858
|
*/
|
|
7844
7859
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7845
7860
|
/**
|
|
7846
7861
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7848
7863
|
*/
|
|
7849
7864
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
7850
7865
|
/**
|
|
7851
7866
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-canvas-to-image.md
|
|
7853
7868
|
*/
|
|
7854
7869
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7855
7870
|
/**
|
|
7856
7871
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-chained-comparison.md
|
|
7858
7873
|
*/
|
|
7859
7874
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7860
7875
|
/**
|
|
7861
7876
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-collection-bracket-access.md
|
|
7863
7878
|
*/
|
|
7864
7879
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7865
7880
|
/**
|
|
7866
7881
|
* Disallow dynamic object property existence checks.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7868
7883
|
*/
|
|
7869
7884
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7885
|
+
/**
|
|
7886
|
+
* Disallow conflicting CSS query and HTML form constraints.
|
|
7887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-conflicting-constraints.md
|
|
7888
|
+
*/
|
|
7889
|
+
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
7870
7890
|
/**
|
|
7871
7891
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-splice.md
|
|
7873
7893
|
*/
|
|
7874
7894
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7875
7895
|
/**
|
|
7876
7896
|
* Disallow confusing uses of `Array#with()`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-with.md
|
|
7878
7898
|
*/
|
|
7879
7899
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7880
7900
|
/**
|
|
7881
7901
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-console-spaces.md
|
|
7883
7903
|
*/
|
|
7884
7904
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7885
7905
|
/**
|
|
7886
7906
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-constant-zero-expression.md
|
|
7888
7908
|
*/
|
|
7889
7909
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7890
7910
|
/**
|
|
7891
7911
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7893
7913
|
*/
|
|
7894
7914
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7895
7915
|
/**
|
|
7896
|
-
*
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
7917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
7918
|
+
* @deprecated
|
|
7898
7919
|
*/
|
|
7899
|
-
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<
|
|
7920
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
7900
7921
|
/**
|
|
7901
7922
|
* Do not use `document.cookie` directly.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-document-cookie.md
|
|
7903
7924
|
*/
|
|
7904
7925
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7905
7926
|
/**
|
|
7906
7927
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-double-comparison.md
|
|
7908
7929
|
*/
|
|
7909
7930
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7910
7931
|
/**
|
|
7911
|
-
*
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7932
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
7933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
7934
|
+
* @deprecated
|
|
7913
7935
|
*/
|
|
7914
7936
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
7915
7937
|
/**
|
|
7916
|
-
*
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7938
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
7939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
7940
|
+
* @deprecated
|
|
7918
7941
|
*/
|
|
7919
7942
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
7920
7943
|
/**
|
|
7921
7944
|
* Disallow duplicate adjacent branches in if chains.
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7923
7946
|
*/
|
|
7924
7947
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7925
7948
|
/**
|
|
7926
7949
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7928
7951
|
*/
|
|
7929
7952
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7930
7953
|
/**
|
|
7931
7954
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-loops.md
|
|
7933
7956
|
*/
|
|
7934
7957
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7935
7958
|
/**
|
|
7936
7959
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-set-values.md
|
|
7938
7961
|
*/
|
|
7939
7962
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7940
7963
|
/**
|
|
7941
7964
|
* Disallow empty files.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-file.md
|
|
7943
7966
|
*/
|
|
7944
7967
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7968
|
+
/**
|
|
7969
|
+
* Disallow empty link text in Markdown.
|
|
7970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-link-text.md
|
|
7971
|
+
*/
|
|
7972
|
+
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
7945
7973
|
/**
|
|
7946
7974
|
* Disallow assigning to built-in error properties.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-error-property-assignment.md
|
|
7948
7976
|
*/
|
|
7949
7977
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7950
7978
|
/**
|
|
7951
7979
|
* Disallow exports in scripts.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-exports-in-scripts.md
|
|
7953
7981
|
*/
|
|
7954
7982
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7955
7983
|
/**
|
|
7956
7984
|
* Prefer `for…of` over the `forEach` method.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-each.md
|
|
7958
7986
|
*/
|
|
7959
7987
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7960
7988
|
/**
|
|
7961
7989
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-loop.md
|
|
7963
7991
|
*/
|
|
7964
7992
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7965
7993
|
/**
|
|
7966
7994
|
* Disallow assigning properties on the global object.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7968
7996
|
*/
|
|
7969
7997
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7970
7998
|
/**
|
|
7971
|
-
* Replaced by `unicorn/prefer-unicode-code-point-escapes
|
|
7972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7999
|
+
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
8000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7973
8001
|
* @deprecated
|
|
7974
8002
|
*/
|
|
7975
8003
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7976
8004
|
/**
|
|
7977
8005
|
* Disallow immediate mutation after variable assignment.
|
|
7978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-immediate-mutation.md
|
|
7979
8007
|
*/
|
|
7980
8008
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
7981
8009
|
/**
|
|
7982
8010
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7984
8012
|
*/
|
|
7985
8013
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
8014
|
+
/**
|
|
8015
|
+
* Disallow class accessors that hide an inherited getter or setter.
|
|
8016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
8017
|
+
*/
|
|
8018
|
+
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
7986
8019
|
/**
|
|
7987
8020
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7989
8022
|
*/
|
|
7990
8023
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7991
8024
|
/**
|
|
7992
8025
|
* Disallow incorrect template literal interpolation syntax.
|
|
7993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7994
8027
|
*/
|
|
7995
8028
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
8029
|
+
/**
|
|
8030
|
+
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
8031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
8032
|
+
*/
|
|
8033
|
+
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
7996
8034
|
/**
|
|
7997
8035
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7999
8037
|
* @deprecated
|
|
8000
8038
|
*/
|
|
8001
8039
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
8002
8040
|
/**
|
|
8003
8041
|
* Disallow `instanceof` with built-in objects
|
|
8004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-instanceof-builtins.md
|
|
8005
8043
|
*/
|
|
8006
8044
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
8007
8045
|
/**
|
|
8008
8046
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
8009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-argument-count.md
|
|
8010
8048
|
*/
|
|
8011
8049
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
8050
|
+
/**
|
|
8051
|
+
* Disallow invalid values for HTML boolean attributes.
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
8053
|
+
*/
|
|
8054
|
+
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
8012
8055
|
/**
|
|
8013
8056
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
8014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-character-comparison.md
|
|
8015
8058
|
*/
|
|
8016
8059
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
8060
|
+
/**
|
|
8061
|
+
* Disallow invalid DOM tokens.
|
|
8062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-dom-token.md
|
|
8063
|
+
*/
|
|
8064
|
+
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
8017
8065
|
/**
|
|
8018
8066
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
8019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-fetch-options.md
|
|
8020
8068
|
*/
|
|
8021
8069
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8022
8070
|
/**
|
|
8023
8071
|
* Disallow invalid `accept` values on file inputs.
|
|
8024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
8025
8073
|
*/
|
|
8026
8074
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
8027
8075
|
/**
|
|
8028
|
-
* Disallow
|
|
8029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8076
|
+
* Disallow invalid subresource integrity metadata.
|
|
8077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-integrity.md
|
|
8078
|
+
*/
|
|
8079
|
+
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
8080
|
+
/**
|
|
8081
|
+
* Disallow invalid or ignored Intl options.
|
|
8082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-intl-options.md
|
|
8083
|
+
*/
|
|
8084
|
+
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
8085
|
+
/**
|
|
8086
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
8087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
8088
|
+
* @deprecated
|
|
8030
8089
|
*/
|
|
8031
8090
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
8091
|
+
/**
|
|
8092
|
+
* Disallow invalid property descriptors.
|
|
8093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
8094
|
+
*/
|
|
8095
|
+
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
8032
8096
|
/**
|
|
8033
8097
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
8034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
8035
8099
|
*/
|
|
8036
8100
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
8101
|
+
/**
|
|
8102
|
+
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
8103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-response-options.md
|
|
8104
|
+
*/
|
|
8105
|
+
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
8106
|
+
/**
|
|
8107
|
+
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
8108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-style-set-property.md
|
|
8109
|
+
*/
|
|
8110
|
+
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
8111
|
+
/**
|
|
8112
|
+
* Disallow statically known invalid Temporal arithmetic.
|
|
8113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
8114
|
+
*/
|
|
8115
|
+
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
8116
|
+
/**
|
|
8117
|
+
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
8118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
8119
|
+
*/
|
|
8120
|
+
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
8037
8121
|
/**
|
|
8038
8122
|
* Disallow invalid implementations of well-known symbol methods.
|
|
8039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
8040
8124
|
*/
|
|
8041
8125
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
8126
|
+
/**
|
|
8127
|
+
* Disallow `javascript:` URLs in Markdown.
|
|
8128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-javascript-url.md
|
|
8129
|
+
*/
|
|
8130
|
+
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
8042
8131
|
/**
|
|
8043
8132
|
* Disallow identifiers starting with `new` or `class`.
|
|
8044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-keyword-prefix.md
|
|
8045
8134
|
*/
|
|
8046
8135
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
8047
8136
|
/**
|
|
8048
8137
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
8049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-current-target-access.md
|
|
8050
8139
|
*/
|
|
8051
8140
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
8052
8141
|
/**
|
|
8053
8142
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
8054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-event-control.md
|
|
8055
8144
|
*/
|
|
8056
8145
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
8146
|
+
/**
|
|
8147
|
+
* Disallow empty lines at the beginning of a file.
|
|
8148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-leading-empty-lines.md
|
|
8149
|
+
*/
|
|
8150
|
+
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
8057
8151
|
/**
|
|
8058
8152
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
8059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
8060
8154
|
* @deprecated
|
|
8061
8155
|
*/
|
|
8062
8156
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
8063
8157
|
/**
|
|
8064
8158
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
8065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-lonely-if.md
|
|
8066
8160
|
*/
|
|
8067
8161
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
8068
8162
|
/**
|
|
8069
8163
|
* Disallow mutating a loop iterable during iteration.
|
|
8070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
8071
8165
|
*/
|
|
8072
8166
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
8167
|
+
/**
|
|
8168
|
+
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
8169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loss-of-precision.md
|
|
8170
|
+
*/
|
|
8171
|
+
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
8073
8172
|
/**
|
|
8074
8173
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
8075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
8076
8175
|
*/
|
|
8077
8176
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8078
8177
|
/**
|
|
8079
8178
|
* Disallow manually wrapped comments.
|
|
8080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
8081
8180
|
*/
|
|
8082
8181
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
8083
8182
|
/**
|
|
8084
8183
|
* Disallow checking a Map key before accessing a different key.
|
|
8085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-mismatched-map-key.md
|
|
8086
8185
|
*/
|
|
8087
8186
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
8088
8187
|
/**
|
|
8089
8188
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
8090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-misrefactored-assignment.md
|
|
8091
8190
|
*/
|
|
8092
8191
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
8093
8192
|
/**
|
|
8094
8193
|
* Disallow references to missing local resources.
|
|
8095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-missing-local-resource.md
|
|
8096
8195
|
*/
|
|
8097
8196
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
8098
8197
|
/**
|
|
8099
8198
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
8100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
8101
8200
|
*/
|
|
8102
8201
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
8103
8202
|
/**
|
|
8104
8203
|
* Disallow named usage of default import and export.
|
|
8105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-named-default.md
|
|
8106
8205
|
*/
|
|
8107
8206
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
8108
8207
|
/**
|
|
8109
8208
|
* Disallow negated array predicate calls.
|
|
8110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-array-predicate.md
|
|
8111
8210
|
*/
|
|
8112
8211
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8113
8212
|
/**
|
|
8114
8213
|
* Disallow negated comparisons.
|
|
8115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-comparison.md
|
|
8116
8215
|
*/
|
|
8117
8216
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
8118
8217
|
/**
|
|
8119
8218
|
* Disallow negated conditions.
|
|
8120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-condition.md
|
|
8121
8220
|
*/
|
|
8122
8221
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
8123
8222
|
/**
|
|
8124
8223
|
* Disallow negated expression in equality check.
|
|
8125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negation-in-equality-check.md
|
|
8126
8225
|
*/
|
|
8127
8226
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
8128
8227
|
/**
|
|
8129
8228
|
* Disallow nested ternary expressions.
|
|
8130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nested-ternary.md
|
|
8131
8230
|
*/
|
|
8132
8231
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8133
8232
|
/**
|
|
8134
|
-
*
|
|
8135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
8234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
8235
|
+
* @deprecated
|
|
8136
8236
|
*/
|
|
8137
8237
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
8138
8238
|
/**
|
|
8139
8239
|
* Disallow `new Array()`.
|
|
8140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-array.md
|
|
8141
8241
|
*/
|
|
8142
8242
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
8143
8243
|
/**
|
|
8144
8244
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
8145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-buffer.md
|
|
8146
8246
|
*/
|
|
8147
8247
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
8148
8248
|
/**
|
|
8149
8249
|
* Disallow non-function values with function-style verb prefixes.
|
|
8150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
8151
8251
|
*/
|
|
8152
8252
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
8153
8253
|
/**
|
|
8154
8254
|
* Disallow non-standard properties on built-in objects.
|
|
8155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
8156
8256
|
*/
|
|
8157
8257
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
8158
8258
|
/**
|
|
8159
8259
|
* Disallow the use of the `null` literal.
|
|
8160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-null.md
|
|
8161
8261
|
*/
|
|
8162
8262
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
8163
8263
|
/**
|
|
8164
8264
|
* Disallow the use of objects as default parameters.
|
|
8165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-as-default-parameter.md
|
|
8166
8266
|
*/
|
|
8167
8267
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
8168
8268
|
/**
|
|
8169
8269
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
8170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-methods-with-collections.md
|
|
8171
8271
|
*/
|
|
8172
8272
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
8173
8273
|
/**
|
|
8174
8274
|
* Disallow optional chaining on undeclared variables.
|
|
8175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
8176
8276
|
*/
|
|
8177
8277
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
8278
|
+
/**
|
|
8279
|
+
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
8280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
8281
|
+
*/
|
|
8282
|
+
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
8178
8283
|
/**
|
|
8179
8284
|
* Disallow `process.exit()`.
|
|
8180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-process-exit.md
|
|
8181
8286
|
*/
|
|
8182
8287
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
8183
8288
|
/**
|
|
8184
8289
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
8185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-redundant-comparison.md
|
|
8186
8291
|
*/
|
|
8187
8292
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
8188
8293
|
/**
|
|
8189
|
-
*
|
|
8190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8294
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
8295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
8296
|
+
* @deprecated
|
|
8191
8297
|
*/
|
|
8192
8298
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
8193
8299
|
/**
|
|
8194
8300
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
8195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-return-array-push.md
|
|
8196
8302
|
*/
|
|
8197
8303
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
8198
8304
|
/**
|
|
8199
8305
|
* Disallow selector syntax in DOM names.
|
|
8200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-selector-as-dom-name.md
|
|
8201
8307
|
*/
|
|
8202
8308
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
8203
8309
|
/**
|
|
8204
8310
|
* Disallow shorthand properties that override related longhand properties.
|
|
8205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
8206
8312
|
*/
|
|
8207
8313
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
8208
8314
|
/**
|
|
8209
8315
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
8210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
8211
8317
|
*/
|
|
8212
8318
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8213
8319
|
/**
|
|
8214
8320
|
* Disallow classes that only have static members.
|
|
8215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-static-only-class.md
|
|
8216
8322
|
*/
|
|
8217
8323
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
8218
8324
|
/**
|
|
8219
8325
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
8220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-subtraction-comparison.md
|
|
8221
8327
|
*/
|
|
8222
8328
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
8223
8329
|
/**
|
|
8224
8330
|
* Disallow `then` property.
|
|
8225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-thenable.md
|
|
8226
8332
|
*/
|
|
8227
8333
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
8228
8334
|
/**
|
|
8229
8335
|
* Disallow assigning `this` to a variable.
|
|
8230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-assignment.md
|
|
8231
8337
|
*/
|
|
8232
8338
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
8233
8339
|
/**
|
|
8234
8340
|
* Disallow `this` outside of classes.
|
|
8235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-outside-of-class.md
|
|
8236
8342
|
*/
|
|
8237
8343
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8238
8344
|
/**
|
|
8239
8345
|
* Disallow assigning to top-level variables from inside functions.
|
|
8240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8241
8347
|
*/
|
|
8242
8348
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8243
8349
|
/**
|
|
8244
8350
|
* Disallow top-level side effects in exported modules.
|
|
8245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-side-effects.md
|
|
8246
8352
|
*/
|
|
8247
8353
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
8248
8354
|
/**
|
|
8249
8355
|
* Disallow `all` as a transition property.
|
|
8250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-transition-all.md
|
|
8251
8357
|
*/
|
|
8252
8358
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
8253
8359
|
/**
|
|
8254
8360
|
* Disallow comparing `undefined` using `typeof`.
|
|
8255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-typeof-undefined.md
|
|
8256
8362
|
*/
|
|
8257
8363
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8258
8364
|
/**
|
|
8259
8365
|
* Disallow referencing methods without calling them.
|
|
8260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-uncalled-method.md
|
|
8261
8367
|
*/
|
|
8262
8368
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8263
8369
|
/**
|
|
8264
8370
|
* Require class members to be declared.
|
|
8265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-undeclared-class-members.md
|
|
8266
8372
|
*/
|
|
8267
8373
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8268
8374
|
/**
|
|
8269
|
-
*
|
|
8270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8375
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
8376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
8377
|
+
* @deprecated
|
|
8271
8378
|
*/
|
|
8272
8379
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
8273
8380
|
/**
|
|
8274
|
-
*
|
|
8275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8381
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
8382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
8383
|
+
* @deprecated
|
|
8276
8384
|
*/
|
|
8277
|
-
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<
|
|
8385
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
8278
8386
|
/**
|
|
8279
8387
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8281
8389
|
*/
|
|
8282
8390
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8283
8391
|
/**
|
|
8284
|
-
* Disallow `Array#flatMap()
|
|
8285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8392
|
+
* Disallow unnecessary use of `Array#flatMap()`.
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8286
8394
|
*/
|
|
8287
8395
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8288
8396
|
/**
|
|
8289
8397
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8291
8399
|
*/
|
|
8292
8400
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8293
8401
|
/**
|
|
8294
8402
|
* Disallow awaiting non-promise values.
|
|
8295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-await.md
|
|
8296
8404
|
*/
|
|
8297
8405
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8298
8406
|
/**
|
|
8299
8407
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8301
8409
|
*/
|
|
8302
8410
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8303
8411
|
/**
|
|
8304
8412
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8306
8414
|
*/
|
|
8307
8415
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8308
8416
|
/**
|
|
8309
8417
|
* Disallow unnecessary `globalThis` references.
|
|
8310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-global-this.md
|
|
8311
8419
|
*/
|
|
8312
8420
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8313
8421
|
/**
|
|
8314
8422
|
* Disallow unnecessary nested ternary expressions.
|
|
8315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8316
8424
|
*/
|
|
8317
8425
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8426
|
+
/**
|
|
8427
|
+
* Disallow parameters that receive the same value at every call.
|
|
8428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-parameters.md
|
|
8429
|
+
*/
|
|
8430
|
+
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
8318
8431
|
/**
|
|
8319
8432
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
8321
8434
|
*/
|
|
8322
8435
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8323
8436
|
/**
|
|
8324
8437
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
8326
8439
|
*/
|
|
8327
8440
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8328
8441
|
/**
|
|
8329
8442
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-splice.md
|
|
8331
8444
|
*/
|
|
8332
8445
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8333
8446
|
/**
|
|
8334
8447
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
8335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
8336
8449
|
*/
|
|
8337
8450
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
8338
8451
|
/**
|
|
8339
8452
|
* Disallow unreadable array destructuring.
|
|
8340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8341
8454
|
*/
|
|
8342
8455
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8343
8456
|
/**
|
|
8344
8457
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8346
8459
|
*/
|
|
8347
8460
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8348
8461
|
/**
|
|
8349
8462
|
* Disallow unreadable IIFEs.
|
|
8350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-iife.md
|
|
8351
8464
|
*/
|
|
8352
8465
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8353
8466
|
/**
|
|
8354
8467
|
* Disallow unreadable `new` expressions.
|
|
8355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-new-expression.md
|
|
8356
8469
|
*/
|
|
8357
8470
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8358
8471
|
/**
|
|
8359
8472
|
* Disallow unreadable object destructuring.
|
|
8360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8361
8474
|
*/
|
|
8362
8475
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8363
8476
|
/**
|
|
8364
8477
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8366
8479
|
*/
|
|
8367
8480
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8368
8481
|
/**
|
|
8369
8482
|
* Disallow unsafe DOM HTML APIs.
|
|
8370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-dom-html.md
|
|
8371
8484
|
*/
|
|
8372
8485
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8486
|
+
/**
|
|
8487
|
+
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
8488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
8489
|
+
*/
|
|
8490
|
+
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
8373
8491
|
/**
|
|
8374
8492
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8376
8494
|
*/
|
|
8377
8495
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8378
8496
|
/**
|
|
8379
8497
|
* Disallow unsafe values as property keys.
|
|
8380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-property-key.md
|
|
8381
8499
|
*/
|
|
8382
8500
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8383
8501
|
/**
|
|
8384
8502
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
8385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
8386
8504
|
*/
|
|
8387
8505
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
8388
8506
|
/**
|
|
8389
8507
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
8391
8509
|
*/
|
|
8392
8510
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8393
8511
|
/**
|
|
8394
|
-
*
|
|
8395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8512
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
8513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
8514
|
+
* @deprecated
|
|
8396
8515
|
*/
|
|
8397
|
-
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<
|
|
8516
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
8398
8517
|
/**
|
|
8399
8518
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
8400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
8401
8520
|
* @deprecated
|
|
8402
8521
|
*/
|
|
8403
8522
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8404
8523
|
/**
|
|
8405
8524
|
* Disallow ignoring the return value of selected built-in methods.
|
|
8406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
8407
8526
|
*/
|
|
8408
8527
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
8409
8528
|
/**
|
|
8410
8529
|
* Disallow discarding lazy iterator helpers.
|
|
8411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-iterator-helper.md
|
|
8412
8531
|
*/
|
|
8413
8532
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
8414
8533
|
/**
|
|
8415
8534
|
* Disallow unused object properties.
|
|
8416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-properties.md
|
|
8417
8536
|
*/
|
|
8418
8537
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8538
|
+
/**
|
|
8539
|
+
* Disallow passing full URLs to `URLSearchParams`.
|
|
8540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-url-in-search-params.md
|
|
8541
|
+
*/
|
|
8542
|
+
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
8419
8543
|
/**
|
|
8420
8544
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8422
8546
|
*/
|
|
8423
8547
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8424
8548
|
/**
|
|
8425
8549
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-coercion.md
|
|
8427
8551
|
*/
|
|
8428
8552
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8429
8553
|
/**
|
|
8430
8554
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-collection-argument.md
|
|
8432
8556
|
*/
|
|
8433
8557
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8434
8558
|
/**
|
|
8435
8559
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8437
8561
|
*/
|
|
8438
8562
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8439
8563
|
/**
|
|
8440
8564
|
* Disallow useless concatenation of literals.
|
|
8441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-concat.md
|
|
8442
8566
|
*/
|
|
8443
8567
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8444
8568
|
/**
|
|
8445
8569
|
* Disallow useless `continue` statements.
|
|
8446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-continue.md
|
|
8447
8571
|
*/
|
|
8448
8572
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8449
8573
|
/**
|
|
8450
8574
|
* Disallow unnecessary existence checks before deletion.
|
|
8451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-delete-check.md
|
|
8452
8576
|
*/
|
|
8453
8577
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8454
8578
|
/**
|
|
8455
8579
|
* Disallow `else` after a statement that exits.
|
|
8456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-else.md
|
|
8457
8581
|
*/
|
|
8458
8582
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8459
8583
|
/**
|
|
8460
8584
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8462
8586
|
*/
|
|
8463
8587
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8464
8588
|
/**
|
|
8465
8589
|
* Disallow useless fallback when spreading in object literals.
|
|
8466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8467
8591
|
*/
|
|
8468
8592
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8469
8593
|
/**
|
|
8470
8594
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
8472
8596
|
*/
|
|
8473
8597
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8474
8598
|
/**
|
|
8475
8599
|
* Disallow useless array length check.
|
|
8476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-length-check.md
|
|
8477
8601
|
*/
|
|
8478
8602
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8479
8603
|
/**
|
|
8480
8604
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-logical-operand.md
|
|
8482
8606
|
*/
|
|
8483
8607
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8484
8608
|
/**
|
|
8485
8609
|
* Disallow useless overrides of class methods.
|
|
8486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-override.md
|
|
8487
8611
|
*/
|
|
8488
8612
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8489
8613
|
/**
|
|
8490
8614
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8492
8616
|
*/
|
|
8493
8617
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8494
8618
|
/**
|
|
8495
8619
|
* Disallow redundant re-exports.
|
|
8496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-re-export.md
|
|
8497
8621
|
*/
|
|
8498
8622
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
8499
8623
|
/**
|
|
8500
8624
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-recursion.md
|
|
8502
8626
|
*/
|
|
8503
8627
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8504
8628
|
/**
|
|
8505
8629
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
8506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-set-construction.md
|
|
8507
8631
|
*/
|
|
8508
8632
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
8509
8633
|
/**
|
|
8510
8634
|
* Disallow unnecessary spread.
|
|
8511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-spread.md
|
|
8512
8636
|
*/
|
|
8513
8637
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8514
8638
|
/**
|
|
8515
8639
|
* Disallow useless case in switch statements.
|
|
8516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-switch-case.md
|
|
8517
8641
|
*/
|
|
8518
8642
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8519
8643
|
/**
|
|
8520
8644
|
* Disallow useless template literal expressions.
|
|
8521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-template-literals.md
|
|
8522
8646
|
*/
|
|
8523
8647
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8524
8648
|
/**
|
|
8525
8649
|
* Disallow useless `undefined`.
|
|
8526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-undefined.md
|
|
8527
8651
|
*/
|
|
8528
8652
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8529
8653
|
/**
|
|
8530
8654
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
8531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-using-resource-escape.md
|
|
8532
8656
|
*/
|
|
8533
8657
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
8534
8658
|
/**
|
|
8535
8659
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8537
8661
|
*/
|
|
8538
8662
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8539
8663
|
/**
|
|
8540
|
-
*
|
|
8541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8664
|
+
* Require consistent decimal numbers without redundant zeros.
|
|
8665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-zero-fractions.md
|
|
8542
8666
|
*/
|
|
8543
8667
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8544
8668
|
/**
|
|
8545
8669
|
* Enforce proper case for numeric literals.
|
|
8546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/number-literal-case.md
|
|
8547
8671
|
*/
|
|
8548
8672
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8549
8673
|
/**
|
|
8550
8674
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/numeric-separators-style.md
|
|
8552
8676
|
*/
|
|
8553
8677
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8554
8678
|
/**
|
|
8555
8679
|
* Require assignment operator shorthand where possible.
|
|
8556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/operator-assignment.md
|
|
8557
8681
|
*/
|
|
8558
8682
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8559
8683
|
/**
|
|
8560
8684
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-any.md
|
|
8562
8686
|
*/
|
|
8563
8687
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8564
8688
|
/**
|
|
8565
8689
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8567
8691
|
*/
|
|
8568
8692
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8569
8693
|
/**
|
|
8570
8694
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener.md
|
|
8572
8696
|
*/
|
|
8573
8697
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8574
8698
|
/**
|
|
8575
8699
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8577
8701
|
*/
|
|
8578
8702
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8579
8703
|
/**
|
|
8580
8704
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-aggregate-error.md
|
|
8582
8706
|
*/
|
|
8583
8707
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8584
8708
|
/**
|
|
8585
8709
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-find.md
|
|
8587
8711
|
*/
|
|
8588
8712
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8589
8713
|
/**
|
|
8590
8714
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat.md
|
|
8592
8716
|
*/
|
|
8593
8717
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8594
8718
|
/**
|
|
8595
8719
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat-map.md
|
|
8597
8721
|
*/
|
|
8598
8722
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8599
8723
|
/**
|
|
8600
8724
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
8601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-async.md
|
|
8602
8726
|
*/
|
|
8603
8727
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8604
8728
|
/**
|
|
8605
8729
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-map.md
|
|
8607
8731
|
*/
|
|
8608
8732
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8609
8733
|
/**
|
|
8610
8734
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-range.md
|
|
8612
8736
|
*/
|
|
8613
8737
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8614
8738
|
/**
|
|
8615
8739
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-index-of.md
|
|
8617
8741
|
*/
|
|
8618
8742
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8619
8743
|
/**
|
|
8620
8744
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8622
8746
|
*/
|
|
8623
8747
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8624
8748
|
/**
|
|
8625
8749
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-last-methods.md
|
|
8627
8751
|
*/
|
|
8628
8752
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8629
8753
|
/**
|
|
8630
8754
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-slice.md
|
|
8632
8756
|
*/
|
|
8633
8757
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8634
8758
|
/**
|
|
8635
8759
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-some.md
|
|
8637
8761
|
*/
|
|
8638
8762
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8639
8763
|
/**
|
|
8640
8764
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-at.md
|
|
8642
8766
|
*/
|
|
8643
8767
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8644
8768
|
/**
|
|
8645
8769
|
* Prefer `await` over promise chaining.
|
|
8646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-await.md
|
|
8647
8771
|
*/
|
|
8648
8772
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8649
8773
|
/**
|
|
8650
8774
|
* Prefer `BigInt` literals over the constructor.
|
|
8651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-bigint-literals.md
|
|
8652
8776
|
*/
|
|
8653
8777
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8654
8778
|
/**
|
|
8655
8779
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
8657
8781
|
*/
|
|
8658
8782
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8659
8783
|
/**
|
|
8660
8784
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8662
8786
|
*/
|
|
8663
8787
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8664
8788
|
/**
|
|
8665
8789
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-boolean-return.md
|
|
8667
8791
|
*/
|
|
8668
8792
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8669
8793
|
/**
|
|
8670
8794
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-class-fields.md
|
|
8672
8796
|
*/
|
|
8673
8797
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8674
8798
|
/**
|
|
8675
8799
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-classlist-toggle.md
|
|
8677
8801
|
*/
|
|
8678
8802
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8679
8803
|
/**
|
|
8680
8804
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-code-point.md
|
|
8682
8806
|
*/
|
|
8683
8807
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8684
8808
|
/**
|
|
8685
8809
|
* Prefer combining consecutive guards with identical exit statements.
|
|
8686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-combined-guards.md
|
|
8687
8811
|
*/
|
|
8688
8812
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
8689
8813
|
/**
|
|
8690
8814
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
8691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-continue.md
|
|
8692
8816
|
*/
|
|
8693
8817
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8694
8818
|
/**
|
|
8695
8819
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-date-now.md
|
|
8697
8821
|
*/
|
|
8698
8822
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8699
8823
|
/**
|
|
8700
|
-
* Prefer default parameters over reassignment.
|
|
8701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8824
|
+
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
8825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-default-parameters.md
|
|
8702
8826
|
*/
|
|
8703
8827
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8704
8828
|
/**
|
|
8705
8829
|
* Prefer direct iteration over default iterator method calls.
|
|
8706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-direct-iteration.md
|
|
8707
8831
|
*/
|
|
8708
8832
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8709
8833
|
/**
|
|
8710
8834
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dispose.md
|
|
8712
8836
|
*/
|
|
8713
8837
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8714
8838
|
/**
|
|
8715
8839
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-append.md
|
|
8717
8841
|
*/
|
|
8718
8842
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8719
8843
|
/**
|
|
8720
8844
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8722
8846
|
* @deprecated
|
|
8723
8847
|
*/
|
|
8724
8848
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8725
8849
|
/**
|
|
8726
8850
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8728
8852
|
*/
|
|
8729
8853
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
8730
8854
|
/**
|
|
8731
8855
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-remove.md
|
|
8733
8857
|
*/
|
|
8734
8858
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8735
8859
|
/**
|
|
8736
8860
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
8737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8738
8862
|
*/
|
|
8739
8863
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8740
8864
|
/**
|
|
8741
8865
|
* Prefer `.textContent` over `.innerText`.
|
|
8742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
8743
8867
|
*/
|
|
8744
8868
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8745
8869
|
/**
|
|
8746
8870
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
8747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-early-return.md
|
|
8748
8872
|
*/
|
|
8749
8873
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8750
8874
|
/**
|
|
8751
8875
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-else-if.md
|
|
8753
8877
|
*/
|
|
8754
8878
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8755
8879
|
/**
|
|
8756
8880
|
* Prefer `Error.isError()` when checking for errors.
|
|
8757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-error-is-error.md
|
|
8758
8882
|
*/
|
|
8759
8883
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8884
|
+
/**
|
|
8885
|
+
* Prefer escape sequences for irregular whitespace characters.
|
|
8886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
8887
|
+
*/
|
|
8888
|
+
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
8760
8889
|
/**
|
|
8761
8890
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-event-target.md
|
|
8763
8892
|
*/
|
|
8764
8893
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8765
8894
|
/**
|
|
8766
|
-
*
|
|
8767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8895
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
8896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
8897
|
+
* @deprecated
|
|
8768
8898
|
*/
|
|
8769
|
-
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<
|
|
8899
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
8770
8900
|
/**
|
|
8771
8901
|
* Prefer `export…from` when re-exporting.
|
|
8772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-export-from.md
|
|
8773
8903
|
*/
|
|
8774
8904
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8775
8905
|
/**
|
|
8776
8906
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8778
8908
|
*/
|
|
8779
8909
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8780
8910
|
/**
|
|
8781
8911
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8783
8913
|
*/
|
|
8784
8914
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8785
8915
|
/**
|
|
8786
8916
|
* Prefer global numeric constants over `Number` static properties.
|
|
8787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-number-constants.md
|
|
8788
8918
|
*/
|
|
8789
8919
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8790
8920
|
/**
|
|
8791
8921
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-this.md
|
|
8793
8923
|
*/
|
|
8794
8924
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8795
8925
|
/**
|
|
8796
8926
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
8797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-group-by.md
|
|
8798
8928
|
*/
|
|
8799
8929
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8800
8930
|
/**
|
|
8801
8931
|
* Prefer `.has()` when checking existence.
|
|
8802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-has-check.md
|
|
8803
8933
|
*/
|
|
8804
8934
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8805
8935
|
/**
|
|
8806
8936
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8808
8938
|
*/
|
|
8809
8939
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8810
8940
|
/**
|
|
8811
8941
|
* Prefer HTTPS over HTTP.
|
|
8812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-https.md
|
|
8813
8943
|
*/
|
|
8814
8944
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
8815
8945
|
/**
|
|
8816
8946
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8818
8948
|
*/
|
|
8819
8949
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8820
8950
|
/**
|
|
8821
8951
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-import-meta-properties.md
|
|
8823
8953
|
*/
|
|
8824
8954
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8825
8955
|
/**
|
|
8826
8956
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes.md
|
|
8828
8958
|
*/
|
|
8829
8959
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8830
8960
|
/**
|
|
8831
8961
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8833
8963
|
*/
|
|
8834
8964
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8835
8965
|
/**
|
|
8836
8966
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8838
8968
|
*/
|
|
8839
8969
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8840
8970
|
/**
|
|
8841
8971
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-concat.md
|
|
8843
8973
|
*/
|
|
8844
8974
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8845
8975
|
/**
|
|
8846
8976
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-helpers.md
|
|
8848
8978
|
*/
|
|
8849
8979
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8850
8980
|
/**
|
|
8851
8981
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8853
8983
|
*/
|
|
8854
8984
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8855
8985
|
/**
|
|
8856
8986
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8858
8988
|
*/
|
|
8859
8989
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8860
8990
|
/**
|
|
8861
8991
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
8862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-zip.md
|
|
8863
8993
|
*/
|
|
8864
8994
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
8865
8995
|
/**
|
|
8866
8996
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
8867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-json-import.md
|
|
8868
8998
|
*/
|
|
8869
8999
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
8870
9000
|
/**
|
|
8871
9001
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8873
9003
|
* @deprecated
|
|
8874
9004
|
*/
|
|
8875
9005
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8876
9006
|
/**
|
|
8877
9007
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8879
9009
|
*/
|
|
8880
9010
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
9011
|
+
/**
|
|
9012
|
+
* Prefer literal printable ASCII characters over escape sequences.
|
|
9013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-literal-ascii.md
|
|
9014
|
+
*/
|
|
9015
|
+
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
8881
9016
|
/**
|
|
8882
9017
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-location-assign.md
|
|
8884
9019
|
*/
|
|
8885
9020
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8886
9021
|
/**
|
|
8887
9022
|
* Prefer using a logical operator over a ternary.
|
|
8888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8889
9024
|
*/
|
|
8890
9025
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8891
9026
|
/**
|
|
8892
9027
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-map-from-entries.md
|
|
8894
9029
|
*/
|
|
8895
9030
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8896
9031
|
/**
|
|
8897
9032
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-abs.md
|
|
8899
9034
|
*/
|
|
8900
9035
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8901
9036
|
/**
|
|
8902
9037
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-constants.md
|
|
8904
9039
|
*/
|
|
8905
9040
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8906
9041
|
/**
|
|
8907
9042
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-min-max.md
|
|
8909
9044
|
*/
|
|
8910
9045
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8911
9046
|
/**
|
|
8912
9047
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-trunc.md
|
|
8914
9049
|
*/
|
|
8915
9050
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8916
9051
|
/**
|
|
8917
|
-
*
|
|
8918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9052
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
9053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
9054
|
+
* @deprecated
|
|
8919
9055
|
*/
|
|
8920
9056
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
8921
9057
|
/**
|
|
8922
9058
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8924
9060
|
*/
|
|
8925
9061
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8926
9062
|
/**
|
|
8927
9063
|
* Prefer modern DOM APIs.
|
|
8928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8929
9065
|
*/
|
|
8930
9066
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8931
9067
|
/**
|
|
8932
9068
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8934
9070
|
*/
|
|
8935
9071
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8936
9072
|
/**
|
|
8937
9073
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-module.md
|
|
8939
9075
|
*/
|
|
8940
9076
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8941
9077
|
/**
|
|
8942
9078
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8944
9080
|
*/
|
|
8945
9081
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8946
9082
|
/**
|
|
8947
9083
|
* Prefer negative index over `.length - index` when possible.
|
|
8948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-negative-index.md
|
|
8949
9085
|
*/
|
|
8950
9086
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8951
9087
|
/**
|
|
8952
9088
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-node-protocol.md
|
|
8954
9090
|
*/
|
|
8955
9091
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8956
9092
|
/**
|
|
8957
9093
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-coercion.md
|
|
8959
9095
|
*/
|
|
8960
9096
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8961
9097
|
/**
|
|
8962
9098
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8964
9100
|
*/
|
|
8965
9101
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8966
9102
|
/**
|
|
8967
9103
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-properties.md
|
|
8969
9105
|
*/
|
|
8970
9106
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8971
9107
|
/**
|
|
8972
9108
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-define-properties.md
|
|
8974
9110
|
*/
|
|
8975
9111
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8976
9112
|
/**
|
|
8977
9113
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8979
9115
|
*/
|
|
8980
9116
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8981
9117
|
/**
|
|
8982
9118
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-from-entries.md
|
|
8984
9120
|
*/
|
|
8985
9121
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8986
9122
|
/**
|
|
8987
9123
|
* Prefer the most specific `Object` iterable method.
|
|
8988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8989
9125
|
*/
|
|
8990
9126
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8991
9127
|
/**
|
|
8992
9128
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-observer-apis.md
|
|
8994
9130
|
*/
|
|
8995
9131
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8996
9132
|
/**
|
|
8997
9133
|
* Prefer omitting the `catch` binding parameter.
|
|
8998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8999
9135
|
*/
|
|
9000
9136
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
9001
9137
|
/**
|
|
9002
9138
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
9003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-path2d.md
|
|
9004
9140
|
*/
|
|
9005
9141
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
9006
9142
|
/**
|
|
9007
9143
|
* Prefer private class fields over the underscore-prefix convention.
|
|
9008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-private-class-fields.md
|
|
9009
9145
|
*/
|
|
9010
9146
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
9147
|
+
/**
|
|
9148
|
+
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
9149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-static-methods.md
|
|
9150
|
+
*/
|
|
9151
|
+
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
9011
9152
|
/**
|
|
9012
9153
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
9013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-try.md
|
|
9014
9155
|
*/
|
|
9015
9156
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
9016
9157
|
/**
|
|
9017
9158
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
9018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
9019
9160
|
*/
|
|
9020
9161
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
9021
9162
|
/**
|
|
9022
9163
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
9023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-prototype-methods.md
|
|
9024
9165
|
*/
|
|
9025
9166
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
9026
9167
|
/**
|
|
9027
9168
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
9028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-query-selector.md
|
|
9029
9170
|
*/
|
|
9030
9171
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
9031
9172
|
/**
|
|
9032
9173
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
9033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-queue-microtask.md
|
|
9034
9175
|
*/
|
|
9035
9176
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
9036
9177
|
/**
|
|
9037
9178
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
9038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-reflect-apply.md
|
|
9039
9180
|
*/
|
|
9040
9181
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
9041
9182
|
/**
|
|
9042
9183
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
9043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-escape.md
|
|
9044
9185
|
*/
|
|
9045
9186
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
9046
9187
|
/**
|
|
9047
9188
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
9048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-test.md
|
|
9049
9190
|
*/
|
|
9050
9191
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
9051
9192
|
/**
|
|
9052
9193
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
9053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-response-static-json.md
|
|
9054
9195
|
*/
|
|
9055
9196
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
9056
9197
|
/**
|
|
9057
9198
|
* Prefer `:scope` when using element query selector methods.
|
|
9058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-scoped-selector.md
|
|
9059
9200
|
*/
|
|
9060
9201
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
9061
9202
|
/**
|
|
9062
9203
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
9063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-has.md
|
|
9064
9205
|
*/
|
|
9065
9206
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
9066
9207
|
/**
|
|
9067
9208
|
* Prefer `Set` methods for Set operations.
|
|
9068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-methods.md
|
|
9069
9210
|
*/
|
|
9070
9211
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
9071
9212
|
/**
|
|
9072
9213
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
9073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-size.md
|
|
9074
9215
|
*/
|
|
9075
9216
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
9076
9217
|
/**
|
|
9077
9218
|
* Prefer arrow function properties over methods with a single return.
|
|
9078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-arrow-method.md
|
|
9079
9220
|
*/
|
|
9080
9221
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
9222
|
+
/**
|
|
9223
|
+
* Prefer shorter alternatives to Unicode escape sequences.
|
|
9224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
9225
|
+
*/
|
|
9226
|
+
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
9081
9227
|
/**
|
|
9082
9228
|
* Prefer simple conditions first in logical expressions.
|
|
9083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-condition-first.md
|
|
9084
9230
|
*/
|
|
9085
9231
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
9086
9232
|
/**
|
|
9087
9233
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
9088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
9089
9235
|
*/
|
|
9090
9236
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9091
9237
|
/**
|
|
9092
9238
|
* Prefer simplified conditions.
|
|
9093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simplified-conditions.md
|
|
9094
9240
|
*/
|
|
9095
|
-
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<
|
|
9241
|
+
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
9096
9242
|
/**
|
|
9097
9243
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
9098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-array-predicate.md
|
|
9099
9245
|
*/
|
|
9100
9246
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9101
9247
|
/**
|
|
9102
9248
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
9103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-call.md
|
|
9104
9250
|
*/
|
|
9105
9251
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
9106
9252
|
/**
|
|
9107
9253
|
* Prefer a single object destructuring declaration per local const source.
|
|
9108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
9109
9255
|
*/
|
|
9110
9256
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
9111
9257
|
/**
|
|
9112
9258
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
9113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-replace.md
|
|
9114
9260
|
*/
|
|
9115
9261
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
9116
9262
|
/**
|
|
9117
9263
|
* Prefer declaring variables in the smallest possible scope.
|
|
9118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-smaller-scope.md
|
|
9119
9265
|
*/
|
|
9120
9266
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
9121
9267
|
/**
|
|
9122
9268
|
* Prefer `String#split()` with a limit.
|
|
9123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-split-limit.md
|
|
9124
9270
|
*/
|
|
9125
9271
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
9126
9272
|
/**
|
|
9127
9273
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
9128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-spread.md
|
|
9129
9275
|
*/
|
|
9130
9276
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
9131
9277
|
/**
|
|
9132
9278
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
9133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-match-all.md
|
|
9134
9280
|
*/
|
|
9135
9281
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
9136
9282
|
/**
|
|
9137
9283
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
9138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
9139
9285
|
*/
|
|
9140
9286
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
9141
9287
|
/**
|
|
9142
9288
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
9143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-raw.md
|
|
9144
9290
|
*/
|
|
9145
9291
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
9146
9292
|
/**
|
|
9147
9293
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
9148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-repeat.md
|
|
9149
9295
|
*/
|
|
9150
9296
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
9151
9297
|
/**
|
|
9152
9298
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
9153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-replace-all.md
|
|
9154
9300
|
*/
|
|
9155
9301
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
9156
9302
|
/**
|
|
9157
9303
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
9158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-slice.md
|
|
9159
9305
|
*/
|
|
9160
9306
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
9161
9307
|
/**
|
|
9162
9308
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
9163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
9164
9310
|
*/
|
|
9165
9311
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
9166
9312
|
/**
|
|
9167
9313
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
9168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
9169
9315
|
*/
|
|
9170
9316
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
9171
9317
|
/**
|
|
9172
9318
|
* Prefer using `structuredClone` to create a deep clone.
|
|
9173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-structured-clone.md
|
|
9174
9320
|
*/
|
|
9175
9321
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
9176
9322
|
/**
|
|
9177
9323
|
* Prefer `switch` over multiple `else-if`.
|
|
9178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-switch.md
|
|
9179
9325
|
*/
|
|
9180
9326
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
9181
9327
|
/**
|
|
9182
9328
|
* Prefer `Temporal` over `Date`.
|
|
9183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal.md
|
|
9184
9330
|
*/
|
|
9185
9331
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
9186
9332
|
/**
|
|
9187
9333
|
* Prefer direct Temporal conversion methods.
|
|
9188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal-conversion.md
|
|
9189
9335
|
*/
|
|
9190
9336
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
9191
9337
|
/**
|
|
9192
9338
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
9193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-ternary.md
|
|
9194
9340
|
*/
|
|
9195
9341
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
9196
9342
|
/**
|
|
9197
9343
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
9198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-then-catch.md
|
|
9199
9345
|
*/
|
|
9200
9346
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
9201
9347
|
/**
|
|
9202
9348
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
9203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-toggle-attribute.md
|
|
9204
9350
|
*/
|
|
9205
9351
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
9206
9352
|
/**
|
|
9207
9353
|
* Prefer top-level await over top-level promises and async function calls.
|
|
9208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-top-level-await.md
|
|
9209
9355
|
*/
|
|
9210
9356
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
9211
9357
|
/**
|
|
9212
9358
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
9213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-error.md
|
|
9214
9360
|
*/
|
|
9215
9361
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
9216
9362
|
/**
|
|
9217
9363
|
* Require type literals to be last in union types.
|
|
9218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-literal-last.md
|
|
9219
9365
|
*/
|
|
9220
9366
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
9221
9367
|
/**
|
|
9222
9368
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
9223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-base64.md
|
|
9224
9370
|
*/
|
|
9225
9371
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
9226
9372
|
/**
|
|
9227
9373
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
9228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-hex.md
|
|
9229
9375
|
*/
|
|
9230
9376
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
9231
9377
|
/**
|
|
9232
9378
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
9233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unary-minus.md
|
|
9234
9380
|
*/
|
|
9235
9381
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
9236
9382
|
/**
|
|
9237
9383
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
9238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
9239
9385
|
*/
|
|
9240
9386
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
9241
9387
|
/**
|
|
9242
9388
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
9243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-can-parse.md
|
|
9244
9390
|
*/
|
|
9245
9391
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
9246
9392
|
/**
|
|
9247
9393
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
9248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-href.md
|
|
9249
9395
|
*/
|
|
9250
9396
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
9251
9397
|
/**
|
|
9252
9398
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
9253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-search-parameters.md
|
|
9254
9400
|
*/
|
|
9255
9401
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
9256
9402
|
/**
|
|
9257
9403
|
* Prefer putting the condition in the while statement.
|
|
9258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-while-loop-condition.md
|
|
9259
9405
|
*/
|
|
9260
9406
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
9261
9407
|
/**
|
|
9262
9408
|
* Renamed to `unicorn/name-replacements`.
|
|
9263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
9264
9410
|
* @deprecated
|
|
9265
9411
|
*/
|
|
9266
9412
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
9267
9413
|
/**
|
|
9268
9414
|
* Enforce consistent relative URL style.
|
|
9269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/relative-url-style.md
|
|
9270
9416
|
*/
|
|
9271
9417
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
9272
9418
|
/**
|
|
9273
9419
|
* Enforce using the separator argument with `Array#join()`.
|
|
9274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-join-separator.md
|
|
9275
9421
|
*/
|
|
9276
9422
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
9277
9423
|
/**
|
|
9278
9424
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
9279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-sort-compare.md
|
|
9280
9426
|
*/
|
|
9281
9427
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
9282
9428
|
/**
|
|
9283
9429
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
9284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-css-escape.md
|
|
9285
9431
|
*/
|
|
9286
9432
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
9287
9433
|
/**
|
|
9288
9434
|
* Require configured YAML frontmatter fields.
|
|
9289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-frontmatter-fields.md
|
|
9290
9436
|
*/
|
|
9291
9437
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
9292
9438
|
/**
|
|
9293
9439
|
* Require non-empty module attributes for imports and exports
|
|
9294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-attributes.md
|
|
9295
9441
|
*/
|
|
9296
9442
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
9297
9443
|
/**
|
|
9298
9444
|
* Require non-empty specifier list in import and export statements.
|
|
9299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-specifiers.md
|
|
9300
9446
|
*/
|
|
9301
9447
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9302
9448
|
/**
|
|
9303
9449
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9305
9451
|
*/
|
|
9306
9452
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9307
9453
|
/**
|
|
9308
9454
|
* Require passive event listeners for high-frequency events.
|
|
9309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-passive-events.md
|
|
9310
9456
|
*/
|
|
9311
9457
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9312
9458
|
/**
|
|
9313
9459
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-post-message-target-origin.md
|
|
9315
9461
|
*/
|
|
9316
9462
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9317
9463
|
/**
|
|
9318
9464
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9320
9466
|
*/
|
|
9321
9467
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9468
|
+
/**
|
|
9469
|
+
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
9470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-text-decoder-streaming.md
|
|
9471
|
+
*/
|
|
9472
|
+
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
9322
9473
|
/**
|
|
9323
9474
|
* Enforce a consistent style for single-line block comments.
|
|
9324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/single-line-block-comment-style.md
|
|
9325
9476
|
*/
|
|
9326
9477
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
9327
9478
|
/**
|
|
9328
9479
|
* Enforce better string content.
|
|
9329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/string-content.md
|
|
9330
9481
|
*/
|
|
9331
9482
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9332
9483
|
/**
|
|
9333
9484
|
* Enforce consistent brace style for `case` clauses.
|
|
9334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-braces.md
|
|
9335
9486
|
*/
|
|
9336
9487
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9337
9488
|
/**
|
|
9338
9489
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-break-position.md
|
|
9340
9491
|
*/
|
|
9341
9492
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9342
9493
|
/**
|
|
9343
9494
|
* Fix whitespace-insensitive template indentation.
|
|
9344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/template-indent.md
|
|
9345
9496
|
*/
|
|
9346
9497
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9347
9498
|
/**
|
|
9348
9499
|
* Enforce consistent case for text encoding identifiers.
|
|
9349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/text-encoding-identifier-case.md
|
|
9350
9501
|
*/
|
|
9351
9502
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9352
9503
|
/**
|
|
9353
9504
|
* Require `new` when creating an error.
|
|
9354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/throw-new-error.md
|
|
9355
9506
|
*/
|
|
9356
9507
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9357
9508
|
/**
|
|
9358
9509
|
* Limit the complexity of `try` blocks.
|
|
9359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/try-complexity.md
|
|
9360
9511
|
*/
|
|
9361
9512
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9362
9513
|
/**
|
|
@@ -11588,6 +11739,10 @@ type JsdocCheckParamNames = [] | [{
|
|
|
11588
11739
|
type JsdocCheckPropertyNames = [] | [{
|
|
11589
11740
|
enableFixer?: boolean;
|
|
11590
11741
|
}];
|
|
11742
|
+
// ----- jsdoc/check-syntax -----
|
|
11743
|
+
type JsdocCheckSyntax = [] | [{
|
|
11744
|
+
enableFixer?: boolean;
|
|
11745
|
+
}];
|
|
11591
11746
|
// ----- jsdoc/check-tag-names -----
|
|
11592
11747
|
type JsdocCheckTagNames = [] | [{
|
|
11593
11748
|
definedTags?: string[];
|
|
@@ -20004,6 +20159,11 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
20004
20159
|
interface _UnicornImportStyle_BooleanObject {
|
|
20005
20160
|
[k: string]: boolean | undefined;
|
|
20006
20161
|
}
|
|
20162
|
+
// ----- unicorn/indent -----
|
|
20163
|
+
type UnicornIndent = [] | [{
|
|
20164
|
+
indent?: ("tab" | number);
|
|
20165
|
+
tabWidth?: number;
|
|
20166
|
+
}];
|
|
20007
20167
|
// ----- unicorn/isolated-functions -----
|
|
20008
20168
|
type UnicornIsolatedFunctions = [] | [{
|
|
20009
20169
|
overrideGlobals?: {
|
|
@@ -20015,6 +20175,15 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
20015
20175
|
}];
|
|
20016
20176
|
// ----- unicorn/iteration-fallback-style -----
|
|
20017
20177
|
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
20178
|
+
// ----- unicorn/key-name-casing -----
|
|
20179
|
+
type UnicornKeyNameCasing = [] | [{
|
|
20180
|
+
camelCase?: boolean;
|
|
20181
|
+
PascalCase?: boolean;
|
|
20182
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
20183
|
+
"kebab-case"?: boolean;
|
|
20184
|
+
snake_case?: boolean;
|
|
20185
|
+
ignore?: string[];
|
|
20186
|
+
}];
|
|
20018
20187
|
// ----- unicorn/logical-assignment-operators -----
|
|
20019
20188
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
20020
20189
|
enforceForIfStatements?: boolean;
|
|
@@ -20069,10 +20238,6 @@ type UnicornNoArraySort = [] | [{
|
|
|
20069
20238
|
type UnicornNoBreakInNestedLoop = [] | [{
|
|
20070
20239
|
checkContinue?: boolean;
|
|
20071
20240
|
}];
|
|
20072
|
-
// ----- unicorn/no-deprecated-css-features -----
|
|
20073
|
-
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
20074
|
-
allow?: string[];
|
|
20075
|
-
}];
|
|
20076
20241
|
// ----- unicorn/no-empty-file -----
|
|
20077
20242
|
type UnicornNoEmptyFile = [] | [{
|
|
20078
20243
|
allowComments?: boolean;
|
|
@@ -20121,9 +20286,9 @@ type UnicornNoNull = [] | [{
|
|
|
20121
20286
|
type UnicornNoTypeofUndefined = [] | [{
|
|
20122
20287
|
checkGlobalVariables?: boolean;
|
|
20123
20288
|
}];
|
|
20124
|
-
// ----- unicorn/no-
|
|
20125
|
-
type
|
|
20126
|
-
|
|
20289
|
+
// ----- unicorn/no-unnecessary-parameters -----
|
|
20290
|
+
type UnicornNoUnnecessaryParameters = [] | [{
|
|
20291
|
+
minimumCallCount?: number;
|
|
20127
20292
|
}];
|
|
20128
20293
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
20129
20294
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
@@ -20135,10 +20300,6 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
20135
20300
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
20136
20301
|
maximumIgnoredElements?: number;
|
|
20137
20302
|
}];
|
|
20138
|
-
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
20139
|
-
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
20140
|
-
scopingRootAtRules?: string[];
|
|
20141
|
-
}];
|
|
20142
20303
|
// ----- unicorn/no-useless-undefined -----
|
|
20143
20304
|
type UnicornNoUselessUndefined = [] | [{
|
|
20144
20305
|
checkArguments?: boolean;
|
|
@@ -20195,6 +20356,7 @@ type UnicornPreferAt = [] | [{
|
|
|
20195
20356
|
// ----- unicorn/prefer-combined-guards -----
|
|
20196
20357
|
type UnicornPreferCombinedGuards = [] | [{
|
|
20197
20358
|
checkCompoundConditions?: boolean;
|
|
20359
|
+
checkMultiStatementBodies?: boolean;
|
|
20198
20360
|
}];
|
|
20199
20361
|
// ----- unicorn/prefer-continue -----
|
|
20200
20362
|
type UnicornPreferContinue = [] | [{
|
|
@@ -20211,10 +20373,6 @@ type UnicornPreferEarlyReturn = [] | [{
|
|
|
20211
20373
|
maximumStatements?: number;
|
|
20212
20374
|
checkShortBodies?: boolean;
|
|
20213
20375
|
}];
|
|
20214
|
-
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
20215
|
-
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
20216
|
-
unit?: ("dvh" | "svh" | "lvh");
|
|
20217
|
-
}];
|
|
20218
20376
|
// ----- unicorn/prefer-export-from -----
|
|
20219
20377
|
type UnicornPreferExportFrom = [] | [{
|
|
20220
20378
|
checkUsedVariables?: boolean;
|
|
@@ -20258,6 +20416,10 @@ type UnicornPreferSetHas = [] | [{
|
|
|
20258
20416
|
}];
|
|
20259
20417
|
// ----- unicorn/prefer-short-arrow-method -----
|
|
20260
20418
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
20419
|
+
// ----- unicorn/prefer-simplified-conditions -----
|
|
20420
|
+
type UnicornPreferSimplifiedConditions = [] | [{
|
|
20421
|
+
negatedConditions?: ("simplify" | "expand");
|
|
20422
|
+
}];
|
|
20261
20423
|
// ----- unicorn/prefer-single-call -----
|
|
20262
20424
|
type UnicornPreferSingleCall = [] | [{
|
|
20263
20425
|
ignore?: string[];
|