@ntnyq/eslint-config 7.0.0-beta.22 → 7.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +598 -404
- package/dist/index.mjs +13 -0
- package/package.json +17 -17
package/dist/index.d.mts
CHANGED
|
@@ -1687,6 +1687,11 @@ interface RuleOptions {
|
|
|
1687
1687
|
* @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging
|
|
1688
1688
|
*/
|
|
1689
1689
|
'@typescript-eslint/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]>;
|
|
1690
|
+
/**
|
|
1691
|
+
* Disallow assigning non-enum values to enum typed locations
|
|
1692
|
+
* @see https://typescript-eslint.io/rules/no-unsafe-enum-assignment
|
|
1693
|
+
*/
|
|
1694
|
+
'@typescript-eslint/no-unsafe-enum-assignment'?: Linter.RuleEntry<[]>;
|
|
1690
1695
|
/**
|
|
1691
1696
|
* Disallow comparing an enum value with a non-enum value
|
|
1692
1697
|
* @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
|
|
@@ -3162,7 +3167,7 @@ interface RuleOptions {
|
|
|
3162
3167
|
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
|
|
3163
3168
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header
|
|
3164
3169
|
*/
|
|
3165
|
-
'jsdoc/check-syntax'?: Linter.RuleEntry<
|
|
3170
|
+
'jsdoc/check-syntax'?: Linter.RuleEntry<JsdocCheckSyntax>;
|
|
3166
3171
|
/**
|
|
3167
3172
|
* Reports invalid block tag names.
|
|
3168
3173
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header
|
|
@@ -6516,1841 +6521,1992 @@ interface RuleOptions {
|
|
|
6516
6521
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6517
6522
|
/**
|
|
6518
6523
|
* Prefer better DOM traversal APIs.
|
|
6519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/better-dom-traversing.md
|
|
6520
6525
|
*/
|
|
6521
6526
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6522
6527
|
/**
|
|
6523
6528
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6525
6530
|
* @deprecated
|
|
6526
6531
|
*/
|
|
6527
6532
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6528
6533
|
/**
|
|
6529
6534
|
* Enforce a specific parameter name in catch clauses.
|
|
6530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/catch-error-name.md
|
|
6531
6536
|
*/
|
|
6532
6537
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6533
6538
|
/**
|
|
6534
6539
|
* Enforce consistent class references in static methods.
|
|
6535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6536
6541
|
*/
|
|
6537
6542
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6543
|
+
/**
|
|
6544
|
+
* Enforce consistent spacing before and after commas in JSON.
|
|
6545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comma-spacing.md
|
|
6546
|
+
*/
|
|
6547
|
+
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
6538
6548
|
/**
|
|
6539
6549
|
* Enforce better comment content.
|
|
6540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/comment-content.md
|
|
6541
6551
|
*/
|
|
6542
6552
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6543
6553
|
/**
|
|
6544
6554
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
6545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-arrow-return-style.md
|
|
6546
6556
|
*/
|
|
6547
6557
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
6548
6558
|
/**
|
|
6549
6559
|
* Enforce consistent assertion style with `node:assert`.
|
|
6550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-assert.md
|
|
6551
6561
|
*/
|
|
6552
6562
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6553
6563
|
/**
|
|
6554
6564
|
* Enforce consistent naming for boolean names.
|
|
6555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-boolean-name.md
|
|
6556
6566
|
*/
|
|
6557
6567
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6558
6568
|
/**
|
|
6559
6569
|
* Enforce consistent class member order.
|
|
6560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-class-member-order.md
|
|
6561
6571
|
*/
|
|
6562
6572
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6563
6573
|
/**
|
|
6564
6574
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-compound-words.md
|
|
6566
6576
|
*/
|
|
6567
6577
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6568
6578
|
/**
|
|
6569
6579
|
* Enforce consistent conditional object spread style.
|
|
6570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6571
6581
|
*/
|
|
6572
6582
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6573
6583
|
/**
|
|
6574
6584
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-date-clone.md
|
|
6576
6586
|
*/
|
|
6577
6587
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6578
6588
|
/**
|
|
6579
6589
|
* Use destructured variables over properties.
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-destructuring.md
|
|
6581
6591
|
*/
|
|
6582
6592
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6583
6593
|
/**
|
|
6584
6594
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6586
6596
|
*/
|
|
6587
6597
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6588
6598
|
/**
|
|
6589
6599
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-existence-index-check.md
|
|
6591
6601
|
*/
|
|
6592
6602
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6593
6603
|
/**
|
|
6594
6604
|
* Enforce consistent decorator position on exported classes.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6596
6606
|
*/
|
|
6597
6607
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6598
6608
|
/**
|
|
6599
6609
|
* Move function definitions to the highest possible scope.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-scoping.md
|
|
6601
6611
|
*/
|
|
6602
6612
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6603
6613
|
/**
|
|
6604
6614
|
* Enforce function syntax by role.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-function-style.md
|
|
6606
6616
|
*/
|
|
6607
6617
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6608
6618
|
/**
|
|
6609
6619
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-json-file-read.md
|
|
6611
6621
|
*/
|
|
6612
6622
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6613
6623
|
/**
|
|
6614
6624
|
* Enforce consistent optional chaining for same-base member access.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-optional-chaining.md
|
|
6616
6626
|
*/
|
|
6617
6627
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6618
6628
|
/**
|
|
6619
6629
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6621
6631
|
*/
|
|
6622
6632
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6623
6633
|
/**
|
|
6624
6634
|
* Enforce consistent labels on tuple type elements.
|
|
6625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/consistent-tuple-labels.md
|
|
6626
6636
|
*/
|
|
6627
6637
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6628
6638
|
/**
|
|
6629
6639
|
* Enforce correct `Error` subclassing.
|
|
6630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/custom-error-definition.md
|
|
6631
6641
|
*/
|
|
6632
6642
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6633
6643
|
/**
|
|
6634
6644
|
* Enforce consistent default export declarations.
|
|
6635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/default-export-style.md
|
|
6636
6646
|
*/
|
|
6637
6647
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6638
6648
|
/**
|
|
6639
6649
|
* Enforce consistent style for DOM element dataset access.
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/dom-node-dataset.md
|
|
6641
6651
|
*/
|
|
6642
6652
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6643
6653
|
/**
|
|
6644
6654
|
* Enforce no spaces between braces.
|
|
6645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/empty-brace-spaces.md
|
|
6646
6656
|
*/
|
|
6647
6657
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6648
6658
|
/**
|
|
6649
6659
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/error-message.md
|
|
6651
6661
|
*/
|
|
6652
6662
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6653
6663
|
/**
|
|
6654
6664
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/escape-case.md
|
|
6656
6666
|
*/
|
|
6657
6667
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6658
6668
|
/**
|
|
6659
6669
|
* Add expiration conditions to TODO comments.
|
|
6660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/expiring-todo-comments.md
|
|
6661
6671
|
*/
|
|
6662
6672
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6663
6673
|
/**
|
|
6664
6674
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-length-check.md
|
|
6666
6676
|
*/
|
|
6667
6677
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6668
6678
|
/**
|
|
6669
6679
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/explicit-timer-delay.md
|
|
6671
6681
|
*/
|
|
6672
6682
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6673
6683
|
/**
|
|
6674
6684
|
* Enforce a case style for filenames and directory names.
|
|
6675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/filename-case.md
|
|
6676
6686
|
*/
|
|
6677
6687
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6678
6688
|
/**
|
|
6679
6689
|
* Require identifiers to match a specified regular expression.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/id-match.md
|
|
6681
6691
|
*/
|
|
6682
6692
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6683
6693
|
/**
|
|
6684
6694
|
* Enforce specific import styles per module.
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/import-style.md
|
|
6686
6696
|
*/
|
|
6687
6697
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6698
|
+
/**
|
|
6699
|
+
* Enforce consistent indentation in JSON and CSS.
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/indent.md
|
|
6701
|
+
*/
|
|
6702
|
+
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
6688
6703
|
/**
|
|
6689
6704
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/isolated-functions.md
|
|
6691
6706
|
*/
|
|
6692
6707
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6693
6708
|
/**
|
|
6694
6709
|
* Enforce a consistent style for optional loop sources.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/iteration-fallback-style.md
|
|
6696
6711
|
*/
|
|
6697
6712
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
6713
|
+
/**
|
|
6714
|
+
* Enforce a case style for data keys.
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/key-name-casing.md
|
|
6716
|
+
*/
|
|
6717
|
+
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
6698
6718
|
/**
|
|
6699
6719
|
* Require or disallow logical assignment operator shorthand
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/logical-assignment-operators.md
|
|
6701
6721
|
*/
|
|
6702
6722
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6703
6723
|
/**
|
|
6704
6724
|
* Limit the depth of nested calls.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/max-nested-calls.md
|
|
6706
6726
|
*/
|
|
6707
6727
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6708
6728
|
/**
|
|
6709
6729
|
* Enforce replacements for variable, property, and filenames.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/name-replacements.md
|
|
6711
6731
|
*/
|
|
6712
6732
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6713
6733
|
/**
|
|
6714
6734
|
* Enforce correct use of `new` for builtin constructors.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/new-for-builtins.md
|
|
6716
6736
|
*/
|
|
6717
6737
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6718
6738
|
/**
|
|
6719
6739
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6721
6741
|
*/
|
|
6722
6742
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6723
6743
|
/**
|
|
6724
6744
|
* Disallow recursive access to `this` within getters and setters.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accessor-recursion.md
|
|
6726
6746
|
*/
|
|
6727
6747
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6728
6748
|
/**
|
|
6729
6749
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6731
6751
|
*/
|
|
6732
6752
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6733
6753
|
/**
|
|
6734
6754
|
* Disallow anonymous functions and classes as the default export.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-anonymous-default-export.md
|
|
6736
6756
|
*/
|
|
6737
6757
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6738
6758
|
/**
|
|
6739
6759
|
* Prevent passing a function reference directly to iterator methods.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-callback-reference.md
|
|
6741
6761
|
*/
|
|
6742
6762
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6743
6763
|
/**
|
|
6744
6764
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6746
6766
|
*/
|
|
6747
6767
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6748
6768
|
/**
|
|
6749
6769
|
* Disallow using reference values as `Array#fill()` values.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6751
6771
|
*/
|
|
6752
6772
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6753
6773
|
/**
|
|
6754
6774
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-from-fill.md
|
|
6756
6776
|
*/
|
|
6757
6777
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6758
6778
|
/**
|
|
6759
6779
|
* Disallow front-of-array mutation.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-front-mutation.md
|
|
6761
6781
|
*/
|
|
6762
6782
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6763
6783
|
/**
|
|
6764
6784
|
* Disallow using the `this` argument in array methods.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-method-this-argument.md
|
|
6766
6786
|
*/
|
|
6767
6787
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6768
6788
|
/**
|
|
6769
6789
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6771
6791
|
* @deprecated
|
|
6772
6792
|
*/
|
|
6773
6793
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6774
6794
|
/**
|
|
6775
6795
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reduce.md
|
|
6777
6797
|
*/
|
|
6778
6798
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6779
6799
|
/**
|
|
6780
6800
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-reverse.md
|
|
6782
6802
|
*/
|
|
6783
6803
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6784
6804
|
/**
|
|
6785
6805
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort.md
|
|
6787
6807
|
*/
|
|
6788
6808
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6789
6809
|
/**
|
|
6790
6810
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6792
6812
|
*/
|
|
6793
6813
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6794
6814
|
/**
|
|
6795
6815
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-array-splice.md
|
|
6797
6817
|
*/
|
|
6798
6818
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6799
6819
|
/**
|
|
6800
|
-
* Disallow asterisk prefixes in
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* Disallow asterisk prefixes in multiline comments.
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6802
6822
|
*/
|
|
6803
6823
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6804
6824
|
/**
|
|
6805
6825
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-iterator-callback.md
|
|
6807
6827
|
*/
|
|
6808
6828
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
6809
6829
|
/**
|
|
6810
6830
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-async-promise-finally.md
|
|
6812
6832
|
*/
|
|
6813
6833
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6814
6834
|
/**
|
|
6815
6835
|
* Disallow member access from await expression.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-expression-member.md
|
|
6817
6837
|
*/
|
|
6818
6838
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6819
6839
|
/**
|
|
6820
6840
|
* Disallow using `await` in `Promise` method parameters.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6822
6842
|
*/
|
|
6823
6843
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6824
6844
|
/**
|
|
6825
6845
|
* Disallow barrel files.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-barrel-files.md
|
|
6827
6847
|
*/
|
|
6828
6848
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
6829
6849
|
/**
|
|
6830
6850
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-blob-to-file.md
|
|
6832
6852
|
*/
|
|
6833
6853
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6834
6854
|
/**
|
|
6835
6855
|
* Disallow boolean-returning sort comparators.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6837
6857
|
*/
|
|
6838
6858
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6839
6859
|
/**
|
|
6840
6860
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6842
6862
|
*/
|
|
6843
6863
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
6844
6864
|
/**
|
|
6845
6865
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-canvas-to-image.md
|
|
6847
6867
|
*/
|
|
6848
6868
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6849
6869
|
/**
|
|
6850
6870
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-chained-comparison.md
|
|
6852
6872
|
*/
|
|
6853
6873
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6854
6874
|
/**
|
|
6855
6875
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-collection-bracket-access.md
|
|
6857
6877
|
*/
|
|
6858
6878
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6859
6879
|
/**
|
|
6860
6880
|
* Disallow dynamic object property existence checks.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6862
6882
|
*/
|
|
6863
6883
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6884
|
+
/**
|
|
6885
|
+
* Disallow conflicting CSS query and HTML form constraints.
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-conflicting-constraints.md
|
|
6887
|
+
*/
|
|
6888
|
+
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
6864
6889
|
/**
|
|
6865
6890
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-splice.md
|
|
6867
6892
|
*/
|
|
6868
6893
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6869
6894
|
/**
|
|
6870
6895
|
* Disallow confusing uses of `Array#with()`.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-confusing-array-with.md
|
|
6872
6897
|
*/
|
|
6873
6898
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6874
6899
|
/**
|
|
6875
6900
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-console-spaces.md
|
|
6877
6902
|
*/
|
|
6878
6903
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6879
6904
|
/**
|
|
6880
6905
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-constant-zero-expression.md
|
|
6882
6907
|
*/
|
|
6883
6908
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6884
6909
|
/**
|
|
6885
6910
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6887
6912
|
*/
|
|
6888
6913
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6889
6914
|
/**
|
|
6890
|
-
*
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6915
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
6917
|
+
* @deprecated
|
|
6892
6918
|
*/
|
|
6893
|
-
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<
|
|
6919
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
6894
6920
|
/**
|
|
6895
6921
|
* Do not use `document.cookie` directly.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-document-cookie.md
|
|
6897
6923
|
*/
|
|
6898
6924
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6899
6925
|
/**
|
|
6900
6926
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-double-comparison.md
|
|
6902
6928
|
*/
|
|
6903
6929
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6904
6930
|
/**
|
|
6905
|
-
*
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
6932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
6933
|
+
* @deprecated
|
|
6907
6934
|
*/
|
|
6908
6935
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
6909
6936
|
/**
|
|
6910
|
-
*
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6937
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
6938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
6939
|
+
* @deprecated
|
|
6912
6940
|
*/
|
|
6913
6941
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
6914
6942
|
/**
|
|
6915
6943
|
* Disallow duplicate adjacent branches in if chains.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6917
6945
|
*/
|
|
6918
6946
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6919
6947
|
/**
|
|
6920
6948
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6922
6950
|
*/
|
|
6923
6951
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6924
6952
|
/**
|
|
6925
6953
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-loops.md
|
|
6927
6955
|
*/
|
|
6928
6956
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6929
6957
|
/**
|
|
6930
6958
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-duplicate-set-values.md
|
|
6932
6960
|
*/
|
|
6933
6961
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6934
6962
|
/**
|
|
6935
6963
|
* Disallow empty files.
|
|
6936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-file.md
|
|
6937
6965
|
*/
|
|
6938
6966
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6967
|
+
/**
|
|
6968
|
+
* Disallow empty link text in Markdown.
|
|
6969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-empty-link-text.md
|
|
6970
|
+
*/
|
|
6971
|
+
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
6939
6972
|
/**
|
|
6940
6973
|
* Disallow assigning to built-in error properties.
|
|
6941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-error-property-assignment.md
|
|
6942
6975
|
*/
|
|
6943
6976
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6944
6977
|
/**
|
|
6945
6978
|
* Disallow exports in scripts.
|
|
6946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-exports-in-scripts.md
|
|
6947
6980
|
*/
|
|
6948
6981
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6949
6982
|
/**
|
|
6950
6983
|
* Prefer `for…of` over the `forEach` method.
|
|
6951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-each.md
|
|
6952
6985
|
*/
|
|
6953
6986
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6954
6987
|
/**
|
|
6955
6988
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-for-loop.md
|
|
6957
6990
|
*/
|
|
6958
6991
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6959
6992
|
/**
|
|
6960
6993
|
* Disallow assigning properties on the global object.
|
|
6961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6962
6995
|
*/
|
|
6963
6996
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6964
6997
|
/**
|
|
6965
|
-
* Replaced by `unicorn/prefer-unicode-code-point-escapes
|
|
6966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6998
|
+
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
6999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6967
7000
|
* @deprecated
|
|
6968
7001
|
*/
|
|
6969
7002
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6970
7003
|
/**
|
|
6971
7004
|
* Disallow immediate mutation after variable assignment.
|
|
6972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-immediate-mutation.md
|
|
6973
7006
|
*/
|
|
6974
7007
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
6975
7008
|
/**
|
|
6976
7009
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6978
7011
|
*/
|
|
6979
7012
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7013
|
+
/**
|
|
7014
|
+
* Disallow class accessors that hide an inherited getter or setter.
|
|
7015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
7016
|
+
*/
|
|
7017
|
+
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
6980
7018
|
/**
|
|
6981
7019
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6983
7021
|
*/
|
|
6984
7022
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6985
7023
|
/**
|
|
6986
7024
|
* Disallow incorrect template literal interpolation syntax.
|
|
6987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6988
7026
|
*/
|
|
6989
7027
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7028
|
+
/**
|
|
7029
|
+
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
7030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
7031
|
+
*/
|
|
7032
|
+
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
6990
7033
|
/**
|
|
6991
7034
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6993
7036
|
* @deprecated
|
|
6994
7037
|
*/
|
|
6995
7038
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6996
7039
|
/**
|
|
6997
7040
|
* Disallow `instanceof` with built-in objects
|
|
6998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-instanceof-builtins.md
|
|
6999
7042
|
*/
|
|
7000
7043
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7001
7044
|
/**
|
|
7002
7045
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-argument-count.md
|
|
7004
7047
|
*/
|
|
7005
7048
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7049
|
+
/**
|
|
7050
|
+
* Disallow invalid values for HTML boolean attributes.
|
|
7051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
7052
|
+
*/
|
|
7053
|
+
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
7006
7054
|
/**
|
|
7007
7055
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7009
7057
|
*/
|
|
7010
7058
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7059
|
+
/**
|
|
7060
|
+
* Disallow invalid DOM tokens.
|
|
7061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-dom-token.md
|
|
7062
|
+
*/
|
|
7063
|
+
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
7011
7064
|
/**
|
|
7012
7065
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7014
7067
|
*/
|
|
7015
7068
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7016
7069
|
/**
|
|
7017
7070
|
* Disallow invalid `accept` values on file inputs.
|
|
7018
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7019
7072
|
*/
|
|
7020
7073
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7021
7074
|
/**
|
|
7022
|
-
* Disallow
|
|
7023
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7075
|
+
* Disallow invalid subresource integrity metadata.
|
|
7076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-integrity.md
|
|
7077
|
+
*/
|
|
7078
|
+
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
7079
|
+
/**
|
|
7080
|
+
* Disallow invalid or ignored Intl options.
|
|
7081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-intl-options.md
|
|
7082
|
+
*/
|
|
7083
|
+
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
7084
|
+
/**
|
|
7085
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
7086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
7087
|
+
* @deprecated
|
|
7024
7088
|
*/
|
|
7025
7089
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
7090
|
+
/**
|
|
7091
|
+
* Disallow invalid property descriptors.
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
7093
|
+
*/
|
|
7094
|
+
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
7026
7095
|
/**
|
|
7027
7096
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7028
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7029
7098
|
*/
|
|
7030
7099
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7100
|
+
/**
|
|
7101
|
+
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-response-options.md
|
|
7103
|
+
*/
|
|
7104
|
+
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
7105
|
+
/**
|
|
7106
|
+
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-style-set-property.md
|
|
7108
|
+
*/
|
|
7109
|
+
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
7110
|
+
/**
|
|
7111
|
+
* Disallow statically known invalid Temporal arithmetic.
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
7113
|
+
*/
|
|
7114
|
+
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
7115
|
+
/**
|
|
7116
|
+
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
7118
|
+
*/
|
|
7119
|
+
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
7031
7120
|
/**
|
|
7032
7121
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7033
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7034
7123
|
*/
|
|
7035
7124
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7125
|
+
/**
|
|
7126
|
+
* Disallow `javascript:` URLs in Markdown.
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-javascript-url.md
|
|
7128
|
+
*/
|
|
7129
|
+
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
7036
7130
|
/**
|
|
7037
7131
|
* Disallow identifiers starting with `new` or `class`.
|
|
7038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-keyword-prefix.md
|
|
7039
7133
|
*/
|
|
7040
7134
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7041
7135
|
/**
|
|
7042
7136
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-current-target-access.md
|
|
7044
7138
|
*/
|
|
7045
7139
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7046
7140
|
/**
|
|
7047
7141
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-late-event-control.md
|
|
7049
7143
|
*/
|
|
7050
7144
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7145
|
+
/**
|
|
7146
|
+
* Disallow empty lines at the beginning of a file.
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-leading-empty-lines.md
|
|
7148
|
+
*/
|
|
7149
|
+
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
7051
7150
|
/**
|
|
7052
7151
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7054
7153
|
* @deprecated
|
|
7055
7154
|
*/
|
|
7056
7155
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7057
7156
|
/**
|
|
7058
7157
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-lonely-if.md
|
|
7060
7159
|
*/
|
|
7061
7160
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7062
7161
|
/**
|
|
7063
7162
|
* Disallow mutating a loop iterable during iteration.
|
|
7064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7065
7164
|
*/
|
|
7066
7165
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7166
|
+
/**
|
|
7167
|
+
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
7168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-loss-of-precision.md
|
|
7169
|
+
*/
|
|
7170
|
+
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
7067
7171
|
/**
|
|
7068
7172
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7070
7174
|
*/
|
|
7071
7175
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7072
7176
|
/**
|
|
7073
7177
|
* Disallow manually wrapped comments.
|
|
7074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7075
7179
|
*/
|
|
7076
7180
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7077
7181
|
/**
|
|
7078
7182
|
* Disallow checking a Map key before accessing a different key.
|
|
7079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-mismatched-map-key.md
|
|
7080
7184
|
*/
|
|
7081
7185
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7082
7186
|
/**
|
|
7083
7187
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7085
7189
|
*/
|
|
7086
7190
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7087
7191
|
/**
|
|
7088
7192
|
* Disallow references to missing local resources.
|
|
7089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-missing-local-resource.md
|
|
7090
7194
|
*/
|
|
7091
7195
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7092
7196
|
/**
|
|
7093
7197
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7095
7199
|
*/
|
|
7096
7200
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7097
7201
|
/**
|
|
7098
7202
|
* Disallow named usage of default import and export.
|
|
7099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-named-default.md
|
|
7100
7204
|
*/
|
|
7101
7205
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7102
7206
|
/**
|
|
7103
7207
|
* Disallow negated array predicate calls.
|
|
7104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-array-predicate.md
|
|
7105
7209
|
*/
|
|
7106
7210
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7107
7211
|
/**
|
|
7108
7212
|
* Disallow negated comparisons.
|
|
7109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-comparison.md
|
|
7110
7214
|
*/
|
|
7111
7215
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7112
7216
|
/**
|
|
7113
7217
|
* Disallow negated conditions.
|
|
7114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negated-condition.md
|
|
7115
7219
|
*/
|
|
7116
7220
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7117
7221
|
/**
|
|
7118
7222
|
* Disallow negated expression in equality check.
|
|
7119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7120
7224
|
*/
|
|
7121
7225
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7122
7226
|
/**
|
|
7123
7227
|
* Disallow nested ternary expressions.
|
|
7124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nested-ternary.md
|
|
7125
7229
|
*/
|
|
7126
7230
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7127
7231
|
/**
|
|
7128
|
-
*
|
|
7129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
7233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
7234
|
+
* @deprecated
|
|
7130
7235
|
*/
|
|
7131
7236
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
7132
7237
|
/**
|
|
7133
7238
|
* Disallow `new Array()`.
|
|
7134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-array.md
|
|
7135
7240
|
*/
|
|
7136
7241
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7137
7242
|
/**
|
|
7138
7243
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-new-buffer.md
|
|
7140
7245
|
*/
|
|
7141
7246
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7142
7247
|
/**
|
|
7143
7248
|
* Disallow non-function values with function-style verb prefixes.
|
|
7144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7145
7250
|
*/
|
|
7146
7251
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7147
7252
|
/**
|
|
7148
7253
|
* Disallow non-standard properties on built-in objects.
|
|
7149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7150
7255
|
*/
|
|
7151
7256
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7152
7257
|
/**
|
|
7153
7258
|
* Disallow the use of the `null` literal.
|
|
7154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-null.md
|
|
7155
7260
|
*/
|
|
7156
7261
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7157
7262
|
/**
|
|
7158
7263
|
* Disallow the use of objects as default parameters.
|
|
7159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7160
7265
|
*/
|
|
7161
7266
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7162
7267
|
/**
|
|
7163
7268
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7165
7270
|
*/
|
|
7166
7271
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7167
7272
|
/**
|
|
7168
7273
|
* Disallow optional chaining on undeclared variables.
|
|
7169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7170
7275
|
*/
|
|
7171
7276
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7277
|
+
/**
|
|
7278
|
+
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
7279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
7280
|
+
*/
|
|
7281
|
+
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
7172
7282
|
/**
|
|
7173
7283
|
* Disallow `process.exit()`.
|
|
7174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-process-exit.md
|
|
7175
7285
|
*/
|
|
7176
7286
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7177
7287
|
/**
|
|
7178
7288
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-redundant-comparison.md
|
|
7180
7290
|
*/
|
|
7181
7291
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7182
7292
|
/**
|
|
7183
|
-
*
|
|
7184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
7294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
7295
|
+
* @deprecated
|
|
7185
7296
|
*/
|
|
7186
7297
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
7187
7298
|
/**
|
|
7188
7299
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-return-array-push.md
|
|
7190
7301
|
*/
|
|
7191
7302
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7192
7303
|
/**
|
|
7193
7304
|
* Disallow selector syntax in DOM names.
|
|
7194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7195
7306
|
*/
|
|
7196
7307
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7197
7308
|
/**
|
|
7198
7309
|
* Disallow shorthand properties that override related longhand properties.
|
|
7199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7200
7311
|
*/
|
|
7201
7312
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7202
7313
|
/**
|
|
7203
7314
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7205
7316
|
*/
|
|
7206
7317
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7207
7318
|
/**
|
|
7208
7319
|
* Disallow classes that only have static members.
|
|
7209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-static-only-class.md
|
|
7210
7321
|
*/
|
|
7211
7322
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7212
7323
|
/**
|
|
7213
7324
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-subtraction-comparison.md
|
|
7215
7326
|
*/
|
|
7216
7327
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7217
7328
|
/**
|
|
7218
7329
|
* Disallow `then` property.
|
|
7219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-thenable.md
|
|
7220
7331
|
*/
|
|
7221
7332
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7222
7333
|
/**
|
|
7223
7334
|
* Disallow assigning `this` to a variable.
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-assignment.md
|
|
7225
7336
|
*/
|
|
7226
7337
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7227
7338
|
/**
|
|
7228
7339
|
* Disallow `this` outside of classes.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-this-outside-of-class.md
|
|
7230
7341
|
*/
|
|
7231
7342
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7232
7343
|
/**
|
|
7233
7344
|
* Disallow assigning to top-level variables from inside functions.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7235
7346
|
*/
|
|
7236
7347
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7237
7348
|
/**
|
|
7238
7349
|
* Disallow top-level side effects in exported modules.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-top-level-side-effects.md
|
|
7240
7351
|
*/
|
|
7241
7352
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7242
7353
|
/**
|
|
7243
7354
|
* Disallow `all` as a transition property.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-transition-all.md
|
|
7245
7356
|
*/
|
|
7246
7357
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7247
7358
|
/**
|
|
7248
7359
|
* Disallow comparing `undefined` using `typeof`.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-typeof-undefined.md
|
|
7250
7361
|
*/
|
|
7251
7362
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7252
7363
|
/**
|
|
7253
7364
|
* Disallow referencing methods without calling them.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-uncalled-method.md
|
|
7255
7366
|
*/
|
|
7256
7367
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7257
7368
|
/**
|
|
7258
7369
|
* Require class members to be declared.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-undeclared-class-members.md
|
|
7260
7371
|
*/
|
|
7261
7372
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7262
7373
|
/**
|
|
7263
|
-
*
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
7375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
7376
|
+
* @deprecated
|
|
7265
7377
|
*/
|
|
7266
7378
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
7267
7379
|
/**
|
|
7268
|
-
*
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7380
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
7382
|
+
* @deprecated
|
|
7270
7383
|
*/
|
|
7271
|
-
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<
|
|
7384
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
7272
7385
|
/**
|
|
7273
7386
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7275
7388
|
*/
|
|
7276
7389
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7277
7390
|
/**
|
|
7278
|
-
* Disallow `Array#flatMap()
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* Disallow unnecessary use of `Array#flatMap()`.
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7280
7393
|
*/
|
|
7281
7394
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7282
7395
|
/**
|
|
7283
7396
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7285
7398
|
*/
|
|
7286
7399
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7287
7400
|
/**
|
|
7288
7401
|
* Disallow awaiting non-promise values.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-await.md
|
|
7290
7403
|
*/
|
|
7291
7404
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7292
7405
|
/**
|
|
7293
7406
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7295
7408
|
*/
|
|
7296
7409
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7297
7410
|
/**
|
|
7298
7411
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7300
7413
|
*/
|
|
7301
7414
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7302
7415
|
/**
|
|
7303
7416
|
* Disallow unnecessary `globalThis` references.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7305
7418
|
*/
|
|
7306
7419
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7307
7420
|
/**
|
|
7308
7421
|
* Disallow unnecessary nested ternary expressions.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7310
7423
|
*/
|
|
7311
7424
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7425
|
+
/**
|
|
7426
|
+
* Disallow parameters that receive the same value at every call.
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-parameters.md
|
|
7428
|
+
*/
|
|
7429
|
+
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
7312
7430
|
/**
|
|
7313
7431
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7315
7433
|
*/
|
|
7316
7434
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7317
7435
|
/**
|
|
7318
7436
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7320
7438
|
*/
|
|
7321
7439
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7322
7440
|
/**
|
|
7323
7441
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-splice.md
|
|
7325
7443
|
*/
|
|
7326
7444
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7327
7445
|
/**
|
|
7328
7446
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7330
7448
|
*/
|
|
7331
7449
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7332
7450
|
/**
|
|
7333
7451
|
* Disallow unreadable array destructuring.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7335
7453
|
*/
|
|
7336
7454
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7337
7455
|
/**
|
|
7338
7456
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7340
7458
|
*/
|
|
7341
7459
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7342
7460
|
/**
|
|
7343
7461
|
* Disallow unreadable IIFEs.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-iife.md
|
|
7345
7463
|
*/
|
|
7346
7464
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7347
7465
|
/**
|
|
7348
7466
|
* Disallow unreadable `new` expressions.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7350
7468
|
*/
|
|
7351
7469
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7352
7470
|
/**
|
|
7353
7471
|
* Disallow unreadable object destructuring.
|
|
7354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7355
7473
|
*/
|
|
7356
7474
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7357
7475
|
/**
|
|
7358
7476
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7360
7478
|
*/
|
|
7361
7479
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7362
7480
|
/**
|
|
7363
7481
|
* Disallow unsafe DOM HTML APIs.
|
|
7364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7365
7483
|
*/
|
|
7366
7484
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7485
|
+
/**
|
|
7486
|
+
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
7488
|
+
*/
|
|
7489
|
+
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
7367
7490
|
/**
|
|
7368
7491
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
7369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
7370
7493
|
*/
|
|
7371
7494
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
7372
7495
|
/**
|
|
7373
7496
|
* Disallow unsafe values as property keys.
|
|
7374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-property-key.md
|
|
7375
7498
|
*/
|
|
7376
7499
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7377
7500
|
/**
|
|
7378
7501
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
7379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
7380
7503
|
*/
|
|
7381
7504
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
7382
7505
|
/**
|
|
7383
7506
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7385
7508
|
*/
|
|
7386
7509
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7387
7510
|
/**
|
|
7388
|
-
*
|
|
7389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7511
|
+
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
7513
|
+
* @deprecated
|
|
7390
7514
|
*/
|
|
7391
|
-
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<
|
|
7515
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
7392
7516
|
/**
|
|
7393
7517
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
7394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
7395
7519
|
* @deprecated
|
|
7396
7520
|
*/
|
|
7397
7521
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7398
7522
|
/**
|
|
7399
7523
|
* Disallow ignoring the return value of selected built-in methods.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
7401
7525
|
*/
|
|
7402
7526
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
7403
7527
|
/**
|
|
7404
7528
|
* Disallow discarding lazy iterator helpers.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-iterator-helper.md
|
|
7406
7530
|
*/
|
|
7407
7531
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
7408
7532
|
/**
|
|
7409
7533
|
* Disallow unused object properties.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-unused-properties.md
|
|
7411
7535
|
*/
|
|
7412
7536
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7537
|
+
/**
|
|
7538
|
+
* Disallow passing full URLs to `URLSearchParams`.
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-url-in-search-params.md
|
|
7540
|
+
*/
|
|
7541
|
+
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
7413
7542
|
/**
|
|
7414
7543
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7416
7545
|
*/
|
|
7417
7546
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7418
7547
|
/**
|
|
7419
7548
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-coercion.md
|
|
7421
7550
|
*/
|
|
7422
7551
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7423
7552
|
/**
|
|
7424
7553
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-collection-argument.md
|
|
7426
7555
|
*/
|
|
7427
7556
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7428
7557
|
/**
|
|
7429
7558
|
* Disallow useless compound assignments such as `x += 0`.
|
|
7430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7431
7560
|
*/
|
|
7432
7561
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7433
7562
|
/**
|
|
7434
7563
|
* Disallow useless concatenation of literals.
|
|
7435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-concat.md
|
|
7436
7565
|
*/
|
|
7437
7566
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7438
7567
|
/**
|
|
7439
7568
|
* Disallow useless `continue` statements.
|
|
7440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-continue.md
|
|
7441
7570
|
*/
|
|
7442
7571
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7443
7572
|
/**
|
|
7444
7573
|
* Disallow unnecessary existence checks before deletion.
|
|
7445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-delete-check.md
|
|
7446
7575
|
*/
|
|
7447
7576
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7448
7577
|
/**
|
|
7449
7578
|
* Disallow `else` after a statement that exits.
|
|
7450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-else.md
|
|
7451
7580
|
*/
|
|
7452
7581
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7453
7582
|
/**
|
|
7454
7583
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7456
7585
|
*/
|
|
7457
7586
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7458
7587
|
/**
|
|
7459
7588
|
* Disallow useless fallback when spreading in object literals.
|
|
7460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7461
7590
|
*/
|
|
7462
7591
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7463
7592
|
/**
|
|
7464
7593
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7466
7595
|
*/
|
|
7467
7596
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7468
7597
|
/**
|
|
7469
7598
|
* Disallow useless array length check.
|
|
7470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-length-check.md
|
|
7471
7600
|
*/
|
|
7472
7601
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7473
7602
|
/**
|
|
7474
7603
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-logical-operand.md
|
|
7476
7605
|
*/
|
|
7477
7606
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7478
7607
|
/**
|
|
7479
7608
|
* Disallow useless overrides of class methods.
|
|
7480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-override.md
|
|
7481
7610
|
*/
|
|
7482
7611
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7483
7612
|
/**
|
|
7484
7613
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7486
7615
|
*/
|
|
7487
7616
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7488
7617
|
/**
|
|
7489
7618
|
* Disallow redundant re-exports.
|
|
7490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-re-export.md
|
|
7491
7620
|
*/
|
|
7492
7621
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7493
7622
|
/**
|
|
7494
7623
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-recursion.md
|
|
7496
7625
|
*/
|
|
7497
7626
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7498
7627
|
/**
|
|
7499
7628
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
7500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-set-construction.md
|
|
7501
7630
|
*/
|
|
7502
7631
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
7503
7632
|
/**
|
|
7504
7633
|
* Disallow unnecessary spread.
|
|
7505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-spread.md
|
|
7506
7635
|
*/
|
|
7507
7636
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7508
7637
|
/**
|
|
7509
7638
|
* Disallow useless case in switch statements.
|
|
7510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-switch-case.md
|
|
7511
7640
|
*/
|
|
7512
7641
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7513
7642
|
/**
|
|
7514
7643
|
* Disallow useless template literal expressions.
|
|
7515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-template-literals.md
|
|
7516
7645
|
*/
|
|
7517
7646
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7518
7647
|
/**
|
|
7519
7648
|
* Disallow useless `undefined`.
|
|
7520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-useless-undefined.md
|
|
7521
7650
|
*/
|
|
7522
7651
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7523
7652
|
/**
|
|
7524
7653
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
7525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-using-resource-escape.md
|
|
7526
7655
|
*/
|
|
7527
7656
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
7528
7657
|
/**
|
|
7529
7658
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7531
7660
|
*/
|
|
7532
7661
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7533
7662
|
/**
|
|
7534
|
-
*
|
|
7535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* Require consistent decimal numbers without redundant zeros.
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/no-zero-fractions.md
|
|
7536
7665
|
*/
|
|
7537
7666
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7538
7667
|
/**
|
|
7539
7668
|
* Enforce proper case for numeric literals.
|
|
7540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/number-literal-case.md
|
|
7541
7670
|
*/
|
|
7542
7671
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7543
7672
|
/**
|
|
7544
7673
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/numeric-separators-style.md
|
|
7546
7675
|
*/
|
|
7547
7676
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7548
7677
|
/**
|
|
7549
7678
|
* Require assignment operator shorthand where possible.
|
|
7550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/operator-assignment.md
|
|
7551
7680
|
*/
|
|
7552
7681
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7553
7682
|
/**
|
|
7554
7683
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7556
7685
|
*/
|
|
7557
7686
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7558
7687
|
/**
|
|
7559
7688
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7561
7690
|
*/
|
|
7562
7691
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7563
7692
|
/**
|
|
7564
7693
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener.md
|
|
7566
7695
|
*/
|
|
7567
7696
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7568
7697
|
/**
|
|
7569
7698
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7571
7700
|
*/
|
|
7572
7701
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7573
7702
|
/**
|
|
7574
7703
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-aggregate-error.md
|
|
7576
7705
|
*/
|
|
7577
7706
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7578
7707
|
/**
|
|
7579
7708
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-find.md
|
|
7581
7710
|
*/
|
|
7582
7711
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7583
7712
|
/**
|
|
7584
7713
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat.md
|
|
7586
7715
|
*/
|
|
7587
7716
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7588
7717
|
/**
|
|
7589
7718
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-flat-map.md
|
|
7591
7720
|
*/
|
|
7592
7721
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7593
7722
|
/**
|
|
7594
7723
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
7595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-async.md
|
|
7596
7725
|
*/
|
|
7597
7726
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7598
7727
|
/**
|
|
7599
7728
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-map.md
|
|
7601
7730
|
*/
|
|
7602
7731
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7603
7732
|
/**
|
|
7604
7733
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-from-range.md
|
|
7606
7735
|
*/
|
|
7607
7736
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7608
7737
|
/**
|
|
7609
7738
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-index-of.md
|
|
7611
7740
|
*/
|
|
7612
7741
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7613
7742
|
/**
|
|
7614
7743
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7616
7745
|
*/
|
|
7617
7746
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7618
7747
|
/**
|
|
7619
7748
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-last-methods.md
|
|
7621
7750
|
*/
|
|
7622
7751
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7623
7752
|
/**
|
|
7624
7753
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-slice.md
|
|
7626
7755
|
*/
|
|
7627
7756
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7628
7757
|
/**
|
|
7629
7758
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-array-some.md
|
|
7631
7760
|
*/
|
|
7632
7761
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7633
7762
|
/**
|
|
7634
7763
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-at.md
|
|
7636
7765
|
*/
|
|
7637
7766
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7638
7767
|
/**
|
|
7639
7768
|
* Prefer `await` over promise chaining.
|
|
7640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-await.md
|
|
7641
7770
|
*/
|
|
7642
7771
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7643
7772
|
/**
|
|
7644
7773
|
* Prefer `BigInt` literals over the constructor.
|
|
7645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-bigint-literals.md
|
|
7646
7775
|
*/
|
|
7647
7776
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7648
7777
|
/**
|
|
7649
7778
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7651
7780
|
*/
|
|
7652
7781
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7653
7782
|
/**
|
|
7654
7783
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7656
7785
|
*/
|
|
7657
7786
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7658
7787
|
/**
|
|
7659
7788
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-boolean-return.md
|
|
7661
7790
|
*/
|
|
7662
7791
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7663
7792
|
/**
|
|
7664
7793
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-class-fields.md
|
|
7666
7795
|
*/
|
|
7667
7796
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7668
7797
|
/**
|
|
7669
7798
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7671
7800
|
*/
|
|
7672
7801
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7673
7802
|
/**
|
|
7674
7803
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-code-point.md
|
|
7676
7805
|
*/
|
|
7677
7806
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7678
7807
|
/**
|
|
7679
7808
|
* Prefer combining consecutive guards with identical exit statements.
|
|
7680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-combined-guards.md
|
|
7681
7810
|
*/
|
|
7682
7811
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
7683
7812
|
/**
|
|
7684
7813
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
7685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-continue.md
|
|
7686
7815
|
*/
|
|
7687
7816
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7688
7817
|
/**
|
|
7689
7818
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-date-now.md
|
|
7691
7820
|
*/
|
|
7692
7821
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7693
7822
|
/**
|
|
7694
|
-
* Prefer default parameters over reassignment.
|
|
7695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7823
|
+
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
7824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-default-parameters.md
|
|
7696
7825
|
*/
|
|
7697
7826
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7698
7827
|
/**
|
|
7699
7828
|
* Prefer direct iteration over default iterator method calls.
|
|
7700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-direct-iteration.md
|
|
7701
7830
|
*/
|
|
7702
7831
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7703
7832
|
/**
|
|
7704
7833
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dispose.md
|
|
7706
7835
|
*/
|
|
7707
7836
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7708
7837
|
/**
|
|
7709
7838
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-append.md
|
|
7711
7840
|
*/
|
|
7712
7841
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7713
7842
|
/**
|
|
7714
7843
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7716
7845
|
* @deprecated
|
|
7717
7846
|
*/
|
|
7718
7847
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7719
7848
|
/**
|
|
7720
7849
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7722
7851
|
*/
|
|
7723
7852
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7724
7853
|
/**
|
|
7725
7854
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7727
7856
|
*/
|
|
7728
7857
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7729
7858
|
/**
|
|
7730
7859
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
7731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7732
7861
|
*/
|
|
7733
7862
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7734
7863
|
/**
|
|
7735
7864
|
* Prefer `.textContent` over `.innerText`.
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7737
7866
|
*/
|
|
7738
7867
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7739
7868
|
/**
|
|
7740
7869
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
7741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-early-return.md
|
|
7742
7871
|
*/
|
|
7743
7872
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7744
7873
|
/**
|
|
7745
7874
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-else-if.md
|
|
7747
7876
|
*/
|
|
7748
7877
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7749
7878
|
/**
|
|
7750
7879
|
* Prefer `Error.isError()` when checking for errors.
|
|
7751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-error-is-error.md
|
|
7752
7881
|
*/
|
|
7753
7882
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7883
|
+
/**
|
|
7884
|
+
* Prefer escape sequences for irregular whitespace characters.
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
7886
|
+
*/
|
|
7887
|
+
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
7754
7888
|
/**
|
|
7755
7889
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-event-target.md
|
|
7757
7891
|
*/
|
|
7758
7892
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7759
7893
|
/**
|
|
7760
|
-
*
|
|
7761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7894
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
7896
|
+
* @deprecated
|
|
7762
7897
|
*/
|
|
7763
|
-
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<
|
|
7898
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
7764
7899
|
/**
|
|
7765
7900
|
* Prefer `export…from` when re-exporting.
|
|
7766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-export-from.md
|
|
7767
7902
|
*/
|
|
7768
7903
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7769
7904
|
/**
|
|
7770
7905
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7772
7907
|
*/
|
|
7773
7908
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7774
7909
|
/**
|
|
7775
7910
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7777
7912
|
*/
|
|
7778
7913
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7779
7914
|
/**
|
|
7780
7915
|
* Prefer global numeric constants over `Number` static properties.
|
|
7781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-number-constants.md
|
|
7782
7917
|
*/
|
|
7783
7918
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7784
7919
|
/**
|
|
7785
7920
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-global-this.md
|
|
7787
7922
|
*/
|
|
7788
7923
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7789
7924
|
/**
|
|
7790
7925
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
7791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-group-by.md
|
|
7792
7927
|
*/
|
|
7793
7928
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7794
7929
|
/**
|
|
7795
7930
|
* Prefer `.has()` when checking existence.
|
|
7796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-has-check.md
|
|
7797
7932
|
*/
|
|
7798
7933
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7799
7934
|
/**
|
|
7800
7935
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7802
7937
|
*/
|
|
7803
7938
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7804
7939
|
/**
|
|
7805
7940
|
* Prefer HTTPS over HTTP.
|
|
7806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-https.md
|
|
7807
7942
|
*/
|
|
7808
7943
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
7809
7944
|
/**
|
|
7810
7945
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7812
7947
|
*/
|
|
7813
7948
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7814
7949
|
/**
|
|
7815
7950
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7817
7952
|
*/
|
|
7818
7953
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7819
7954
|
/**
|
|
7820
7955
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes.md
|
|
7822
7957
|
*/
|
|
7823
7958
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7824
7959
|
/**
|
|
7825
7960
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7827
7962
|
*/
|
|
7828
7963
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7829
7964
|
/**
|
|
7830
7965
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7832
7967
|
*/
|
|
7833
7968
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7834
7969
|
/**
|
|
7835
7970
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-concat.md
|
|
7837
7972
|
*/
|
|
7838
7973
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7839
7974
|
/**
|
|
7840
7975
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7842
7977
|
*/
|
|
7843
7978
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7844
7979
|
/**
|
|
7845
7980
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7847
7982
|
*/
|
|
7848
7983
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7849
7984
|
/**
|
|
7850
7985
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7852
7987
|
*/
|
|
7853
7988
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7854
7989
|
/**
|
|
7855
7990
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
7856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-iterator-zip.md
|
|
7857
7992
|
*/
|
|
7858
7993
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
7859
7994
|
/**
|
|
7860
7995
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
7861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-json-import.md
|
|
7862
7997
|
*/
|
|
7863
7998
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
7864
7999
|
/**
|
|
7865
8000
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7867
8002
|
* @deprecated
|
|
7868
8003
|
*/
|
|
7869
8004
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7870
8005
|
/**
|
|
7871
8006
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7873
8008
|
*/
|
|
7874
8009
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8010
|
+
/**
|
|
8011
|
+
* Prefer literal printable ASCII characters over escape sequences.
|
|
8012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-literal-ascii.md
|
|
8013
|
+
*/
|
|
8014
|
+
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
7875
8015
|
/**
|
|
7876
8016
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-location-assign.md
|
|
7878
8018
|
*/
|
|
7879
8019
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7880
8020
|
/**
|
|
7881
8021
|
* Prefer using a logical operator over a ternary.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7883
8023
|
*/
|
|
7884
8024
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7885
8025
|
/**
|
|
7886
8026
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-map-from-entries.md
|
|
7888
8028
|
*/
|
|
7889
8029
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7890
8030
|
/**
|
|
7891
8031
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-abs.md
|
|
7893
8033
|
*/
|
|
7894
8034
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7895
8035
|
/**
|
|
7896
8036
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-constants.md
|
|
7898
8038
|
*/
|
|
7899
8039
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7900
8040
|
/**
|
|
7901
8041
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-min-max.md
|
|
7903
8043
|
*/
|
|
7904
8044
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7905
8045
|
/**
|
|
7906
8046
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-math-trunc.md
|
|
7908
8048
|
*/
|
|
7909
8049
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7910
8050
|
/**
|
|
7911
|
-
*
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8051
|
+
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
8053
|
+
* @deprecated
|
|
7913
8054
|
*/
|
|
7914
8055
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
7915
8056
|
/**
|
|
7916
8057
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7918
8059
|
*/
|
|
7919
8060
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7920
8061
|
/**
|
|
7921
8062
|
* Prefer modern DOM APIs.
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7923
8064
|
*/
|
|
7924
8065
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7925
8066
|
/**
|
|
7926
8067
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7928
8069
|
*/
|
|
7929
8070
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7930
8071
|
/**
|
|
7931
8072
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-module.md
|
|
7933
8074
|
*/
|
|
7934
8075
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7935
8076
|
/**
|
|
7936
8077
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7938
8079
|
*/
|
|
7939
8080
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7940
8081
|
/**
|
|
7941
8082
|
* Prefer negative index over `.length - index` when possible.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-negative-index.md
|
|
7943
8084
|
*/
|
|
7944
8085
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7945
8086
|
/**
|
|
7946
8087
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-node-protocol.md
|
|
7948
8089
|
*/
|
|
7949
8090
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7950
8091
|
/**
|
|
7951
8092
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-coercion.md
|
|
7953
8094
|
*/
|
|
7954
8095
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7955
8096
|
/**
|
|
7956
8097
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7958
8099
|
*/
|
|
7959
8100
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7960
8101
|
/**
|
|
7961
8102
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-number-properties.md
|
|
7963
8104
|
*/
|
|
7964
8105
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7965
8106
|
/**
|
|
7966
8107
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-define-properties.md
|
|
7968
8109
|
*/
|
|
7969
8110
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7970
8111
|
/**
|
|
7971
8112
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7973
8114
|
*/
|
|
7974
8115
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7975
8116
|
/**
|
|
7976
8117
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-from-entries.md
|
|
7978
8119
|
*/
|
|
7979
8120
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7980
8121
|
/**
|
|
7981
8122
|
* Prefer the most specific `Object` iterable method.
|
|
7982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7983
8124
|
*/
|
|
7984
8125
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7985
8126
|
/**
|
|
7986
8127
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-observer-apis.md
|
|
7988
8129
|
*/
|
|
7989
8130
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7990
8131
|
/**
|
|
7991
8132
|
* Prefer omitting the `catch` binding parameter.
|
|
7992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7993
8134
|
*/
|
|
7994
8135
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7995
8136
|
/**
|
|
7996
8137
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-path2d.md
|
|
7998
8139
|
*/
|
|
7999
8140
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8000
8141
|
/**
|
|
8001
8142
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-private-class-fields.md
|
|
8003
8144
|
*/
|
|
8004
8145
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8146
|
+
/**
|
|
8147
|
+
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
8148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-static-methods.md
|
|
8149
|
+
*/
|
|
8150
|
+
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
8005
8151
|
/**
|
|
8006
8152
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-try.md
|
|
8008
8154
|
*/
|
|
8009
8155
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8010
8156
|
/**
|
|
8011
8157
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8013
8159
|
*/
|
|
8014
8160
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8015
8161
|
/**
|
|
8016
8162
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-prototype-methods.md
|
|
8018
8164
|
*/
|
|
8019
8165
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8020
8166
|
/**
|
|
8021
8167
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-query-selector.md
|
|
8023
8169
|
*/
|
|
8024
8170
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8025
8171
|
/**
|
|
8026
8172
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-queue-microtask.md
|
|
8028
8174
|
*/
|
|
8029
8175
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8030
8176
|
/**
|
|
8031
8177
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-reflect-apply.md
|
|
8033
8179
|
*/
|
|
8034
8180
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8035
8181
|
/**
|
|
8036
8182
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-escape.md
|
|
8038
8184
|
*/
|
|
8039
8185
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8040
8186
|
/**
|
|
8041
8187
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-regexp-test.md
|
|
8043
8189
|
*/
|
|
8044
8190
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8045
8191
|
/**
|
|
8046
8192
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-response-static-json.md
|
|
8048
8194
|
*/
|
|
8049
8195
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8050
8196
|
/**
|
|
8051
8197
|
* Prefer `:scope` when using element query selector methods.
|
|
8052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-scoped-selector.md
|
|
8053
8199
|
*/
|
|
8054
8200
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8055
8201
|
/**
|
|
8056
8202
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-has.md
|
|
8058
8204
|
*/
|
|
8059
8205
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8060
8206
|
/**
|
|
8061
8207
|
* Prefer `Set` methods for Set operations.
|
|
8062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-methods.md
|
|
8063
8209
|
*/
|
|
8064
8210
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8065
8211
|
/**
|
|
8066
8212
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-set-size.md
|
|
8068
8214
|
*/
|
|
8069
8215
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8070
8216
|
/**
|
|
8071
8217
|
* Prefer arrow function properties over methods with a single return.
|
|
8072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8073
8219
|
*/
|
|
8074
8220
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8221
|
+
/**
|
|
8222
|
+
* Prefer shorter alternatives to Unicode escape sequences.
|
|
8223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
8224
|
+
*/
|
|
8225
|
+
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
8075
8226
|
/**
|
|
8076
8227
|
* Prefer simple conditions first in logical expressions.
|
|
8077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8078
8229
|
*/
|
|
8079
8230
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8080
8231
|
/**
|
|
8081
8232
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8083
8234
|
*/
|
|
8084
8235
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8085
8236
|
/**
|
|
8086
8237
|
* Prefer simplified conditions.
|
|
8087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8088
8239
|
*/
|
|
8089
|
-
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<
|
|
8240
|
+
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
8090
8241
|
/**
|
|
8091
8242
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8093
8244
|
*/
|
|
8094
8245
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8095
8246
|
/**
|
|
8096
8247
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-call.md
|
|
8098
8249
|
*/
|
|
8099
8250
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8100
8251
|
/**
|
|
8101
8252
|
* Prefer a single object destructuring declaration per local const source.
|
|
8102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8103
8254
|
*/
|
|
8104
8255
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8105
8256
|
/**
|
|
8106
8257
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-single-replace.md
|
|
8108
8259
|
*/
|
|
8109
8260
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8110
8261
|
/**
|
|
8111
8262
|
* Prefer declaring variables in the smallest possible scope.
|
|
8112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-smaller-scope.md
|
|
8113
8264
|
*/
|
|
8114
8265
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8115
8266
|
/**
|
|
8116
8267
|
* Prefer `String#split()` with a limit.
|
|
8117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-split-limit.md
|
|
8118
8269
|
*/
|
|
8119
8270
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8120
8271
|
/**
|
|
8121
8272
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-spread.md
|
|
8123
8274
|
*/
|
|
8124
8275
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8125
8276
|
/**
|
|
8126
8277
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-match-all.md
|
|
8128
8279
|
*/
|
|
8129
8280
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8130
8281
|
/**
|
|
8131
8282
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8133
8284
|
*/
|
|
8134
8285
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8135
8286
|
/**
|
|
8136
8287
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-raw.md
|
|
8138
8289
|
*/
|
|
8139
8290
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8140
8291
|
/**
|
|
8141
8292
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-repeat.md
|
|
8143
8294
|
*/
|
|
8144
8295
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8145
8296
|
/**
|
|
8146
8297
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-replace-all.md
|
|
8148
8299
|
*/
|
|
8149
8300
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8150
8301
|
/**
|
|
8151
8302
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-slice.md
|
|
8153
8304
|
*/
|
|
8154
8305
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8155
8306
|
/**
|
|
8156
8307
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8158
8309
|
*/
|
|
8159
8310
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8160
8311
|
/**
|
|
8161
8312
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8163
8314
|
*/
|
|
8164
8315
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8165
8316
|
/**
|
|
8166
8317
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-structured-clone.md
|
|
8168
8319
|
*/
|
|
8169
8320
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8170
8321
|
/**
|
|
8171
8322
|
* Prefer `switch` over multiple `else-if`.
|
|
8172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-switch.md
|
|
8173
8324
|
*/
|
|
8174
8325
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8175
8326
|
/**
|
|
8176
8327
|
* Prefer `Temporal` over `Date`.
|
|
8177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal.md
|
|
8178
8329
|
*/
|
|
8179
8330
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8180
8331
|
/**
|
|
8181
8332
|
* Prefer direct Temporal conversion methods.
|
|
8182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-temporal-conversion.md
|
|
8183
8334
|
*/
|
|
8184
8335
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
8185
8336
|
/**
|
|
8186
8337
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-ternary.md
|
|
8188
8339
|
*/
|
|
8189
8340
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8190
8341
|
/**
|
|
8191
8342
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-then-catch.md
|
|
8193
8344
|
*/
|
|
8194
8345
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8195
8346
|
/**
|
|
8196
8347
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8198
8349
|
*/
|
|
8199
8350
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8200
8351
|
/**
|
|
8201
8352
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-top-level-await.md
|
|
8203
8354
|
*/
|
|
8204
8355
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8205
8356
|
/**
|
|
8206
8357
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-error.md
|
|
8208
8359
|
*/
|
|
8209
8360
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8210
8361
|
/**
|
|
8211
8362
|
* Require type literals to be last in union types.
|
|
8212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-type-literal-last.md
|
|
8213
8364
|
*/
|
|
8214
8365
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8215
8366
|
/**
|
|
8216
8367
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
8217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8218
8369
|
*/
|
|
8219
8370
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8220
8371
|
/**
|
|
8221
8372
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
8222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-uint8array-hex.md
|
|
8223
8374
|
*/
|
|
8224
8375
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
8225
8376
|
/**
|
|
8226
8377
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unary-minus.md
|
|
8228
8379
|
*/
|
|
8229
8380
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8230
8381
|
/**
|
|
8231
8382
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8233
8384
|
*/
|
|
8234
8385
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8235
8386
|
/**
|
|
8236
8387
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-can-parse.md
|
|
8238
8389
|
*/
|
|
8239
8390
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8240
8391
|
/**
|
|
8241
8392
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-href.md
|
|
8243
8394
|
*/
|
|
8244
8395
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8245
8396
|
/**
|
|
8246
8397
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8248
8399
|
*/
|
|
8249
8400
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8250
8401
|
/**
|
|
8251
8402
|
* Prefer putting the condition in the while statement.
|
|
8252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8253
8404
|
*/
|
|
8254
8405
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8255
8406
|
/**
|
|
8256
8407
|
* Renamed to `unicorn/name-replacements`.
|
|
8257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8258
8409
|
* @deprecated
|
|
8259
8410
|
*/
|
|
8260
8411
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8261
8412
|
/**
|
|
8262
8413
|
* Enforce consistent relative URL style.
|
|
8263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/relative-url-style.md
|
|
8264
8415
|
*/
|
|
8265
8416
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8266
8417
|
/**
|
|
8267
8418
|
* Enforce using the separator argument with `Array#join()`.
|
|
8268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-join-separator.md
|
|
8269
8420
|
*/
|
|
8270
8421
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8271
8422
|
/**
|
|
8272
8423
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-array-sort-compare.md
|
|
8274
8425
|
*/
|
|
8275
8426
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8276
8427
|
/**
|
|
8277
8428
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-css-escape.md
|
|
8279
8430
|
*/
|
|
8280
8431
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8281
8432
|
/**
|
|
8282
8433
|
* Require configured YAML frontmatter fields.
|
|
8283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-frontmatter-fields.md
|
|
8284
8435
|
*/
|
|
8285
8436
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8286
8437
|
/**
|
|
8287
8438
|
* Require non-empty module attributes for imports and exports
|
|
8288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-attributes.md
|
|
8289
8440
|
*/
|
|
8290
8441
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8291
8442
|
/**
|
|
8292
8443
|
* Require non-empty specifier list in import and export statements.
|
|
8293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-module-specifiers.md
|
|
8294
8445
|
*/
|
|
8295
8446
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8296
8447
|
/**
|
|
8297
8448
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8299
8450
|
*/
|
|
8300
8451
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8301
8452
|
/**
|
|
8302
8453
|
* Require passive event listeners for high-frequency events.
|
|
8303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-passive-events.md
|
|
8304
8455
|
*/
|
|
8305
8456
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8306
8457
|
/**
|
|
8307
8458
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-post-message-target-origin.md
|
|
8309
8460
|
*/
|
|
8310
8461
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8311
8462
|
/**
|
|
8312
8463
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8314
8465
|
*/
|
|
8315
8466
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8467
|
+
/**
|
|
8468
|
+
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
8469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/require-text-decoder-streaming.md
|
|
8470
|
+
*/
|
|
8471
|
+
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
8316
8472
|
/**
|
|
8317
8473
|
* Enforce a consistent style for single-line block comments.
|
|
8318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/single-line-block-comment-style.md
|
|
8319
8475
|
*/
|
|
8320
8476
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8321
8477
|
/**
|
|
8322
8478
|
* Enforce better string content.
|
|
8323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/string-content.md
|
|
8324
8480
|
*/
|
|
8325
8481
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8326
8482
|
/**
|
|
8327
8483
|
* Enforce consistent brace style for `case` clauses.
|
|
8328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-braces.md
|
|
8329
8485
|
*/
|
|
8330
8486
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8331
8487
|
/**
|
|
8332
8488
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/switch-case-break-position.md
|
|
8334
8490
|
*/
|
|
8335
8491
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8336
8492
|
/**
|
|
8337
8493
|
* Fix whitespace-insensitive template indentation.
|
|
8338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/template-indent.md
|
|
8339
8495
|
*/
|
|
8340
8496
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8341
8497
|
/**
|
|
8342
8498
|
* Enforce consistent case for text encoding identifiers.
|
|
8343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8344
8500
|
*/
|
|
8345
8501
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8346
8502
|
/**
|
|
8347
8503
|
* Require `new` when creating an error.
|
|
8348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/throw-new-error.md
|
|
8349
8505
|
*/
|
|
8350
8506
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8351
8507
|
/**
|
|
8352
8508
|
* Limit the complexity of `try` blocks.
|
|
8353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v77.0.0/docs/rules/try-complexity.md
|
|
8354
8510
|
*/
|
|
8355
8511
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8356
8512
|
/**
|
|
@@ -8824,6 +8980,11 @@ interface RuleOptions {
|
|
|
8824
8980
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-macros-newline.md
|
|
8825
8981
|
*/
|
|
8826
8982
|
'vue-perfectionist/define-macros-newline'?: Linter.RuleEntry<VuePerfectionistDefineMacrosNewline>;
|
|
8983
|
+
/**
|
|
8984
|
+
* enforce declaration styles for Vue macro type arguments.
|
|
8985
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-macros-type-style.md
|
|
8986
|
+
*/
|
|
8987
|
+
'vue-perfectionist/define-macros-type-style'?: Linter.RuleEntry<VuePerfectionistDefineMacrosTypeStyle>;
|
|
8827
8988
|
/**
|
|
8828
8989
|
* enforce a naming pattern for Vue template references.
|
|
8829
8990
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-ref-pattern.md
|
|
@@ -8834,6 +8995,11 @@ interface RuleOptions {
|
|
|
8834
8995
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-component-props.md
|
|
8835
8996
|
*/
|
|
8836
8997
|
'vue-perfectionist/require-component-props'?: Linter.RuleEntry<VuePerfectionistRequireComponentProps>;
|
|
8998
|
+
/**
|
|
8999
|
+
* require exact call-site names for Vue macro type arguments.
|
|
9000
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-macro-type-name.md
|
|
9001
|
+
*/
|
|
9002
|
+
'vue-perfectionist/require-macro-type-name'?: Linter.RuleEntry<VuePerfectionistRequireMacroTypeName>;
|
|
8837
9003
|
/**
|
|
8838
9004
|
* enforce consistent ordering of Vue 3 script setup statements.
|
|
8839
9005
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/sort-script-setup.md
|
|
@@ -12127,6 +12293,7 @@ type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
|
|
|
12127
12293
|
}]);
|
|
12128
12294
|
// ----- jsdoc/check-alignment -----
|
|
12129
12295
|
type JsdocCheckAlignment = [] | [{
|
|
12296
|
+
ignoreEmptyLines?: boolean;
|
|
12130
12297
|
innerIndent?: number;
|
|
12131
12298
|
}];
|
|
12132
12299
|
// ----- jsdoc/check-examples -----
|
|
@@ -12154,6 +12321,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
12154
12321
|
// ----- jsdoc/check-indentation -----
|
|
12155
12322
|
type JsdocCheckIndentation = [] | [{
|
|
12156
12323
|
allowIndentedSections?: boolean;
|
|
12324
|
+
allowNoSpaceAfterAsterisk?: boolean;
|
|
12157
12325
|
excludeTags?: string[];
|
|
12158
12326
|
}];
|
|
12159
12327
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -12189,6 +12357,10 @@ type JsdocCheckParamNames = [] | [{
|
|
|
12189
12357
|
type JsdocCheckPropertyNames = [] | [{
|
|
12190
12358
|
enableFixer?: boolean;
|
|
12191
12359
|
}];
|
|
12360
|
+
// ----- jsdoc/check-syntax -----
|
|
12361
|
+
type JsdocCheckSyntax = [] | [{
|
|
12362
|
+
enableFixer?: boolean;
|
|
12363
|
+
}];
|
|
12192
12364
|
// ----- jsdoc/check-tag-names -----
|
|
12193
12365
|
type JsdocCheckTagNames = [] | [{
|
|
12194
12366
|
definedTags?: string[];
|
|
@@ -12573,7 +12745,6 @@ type JsdocRequireTags = [] | [{
|
|
|
12573
12745
|
tags?: (string | {
|
|
12574
12746
|
context?: string;
|
|
12575
12747
|
tag?: string;
|
|
12576
|
-
[k: string]: unknown | undefined;
|
|
12577
12748
|
})[];
|
|
12578
12749
|
}];
|
|
12579
12750
|
// ----- jsdoc/require-template -----
|
|
@@ -18636,6 +18807,11 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
18636
18807
|
interface _UnicornImportStyle_BooleanObject {
|
|
18637
18808
|
[k: string]: boolean | undefined;
|
|
18638
18809
|
}
|
|
18810
|
+
// ----- unicorn/indent -----
|
|
18811
|
+
type UnicornIndent = [] | [{
|
|
18812
|
+
indent?: ("tab" | number);
|
|
18813
|
+
tabWidth?: number;
|
|
18814
|
+
}];
|
|
18639
18815
|
// ----- unicorn/isolated-functions -----
|
|
18640
18816
|
type UnicornIsolatedFunctions = [] | [{
|
|
18641
18817
|
overrideGlobals?: {
|
|
@@ -18647,6 +18823,15 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
18647
18823
|
}];
|
|
18648
18824
|
// ----- unicorn/iteration-fallback-style -----
|
|
18649
18825
|
type UnicornIterationFallbackStyle = [] | [("guard" | "fallback")];
|
|
18826
|
+
// ----- unicorn/key-name-casing -----
|
|
18827
|
+
type UnicornKeyNameCasing = [] | [{
|
|
18828
|
+
camelCase?: boolean;
|
|
18829
|
+
PascalCase?: boolean;
|
|
18830
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
18831
|
+
"kebab-case"?: boolean;
|
|
18832
|
+
snake_case?: boolean;
|
|
18833
|
+
ignore?: string[];
|
|
18834
|
+
}];
|
|
18650
18835
|
// ----- unicorn/logical-assignment-operators -----
|
|
18651
18836
|
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
18652
18837
|
enforceForIfStatements?: boolean;
|
|
@@ -18701,10 +18886,6 @@ type UnicornNoArraySort = [] | [{
|
|
|
18701
18886
|
type UnicornNoBreakInNestedLoop = [] | [{
|
|
18702
18887
|
checkContinue?: boolean;
|
|
18703
18888
|
}];
|
|
18704
|
-
// ----- unicorn/no-deprecated-css-features -----
|
|
18705
|
-
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
18706
|
-
allow?: string[];
|
|
18707
|
-
}];
|
|
18708
18889
|
// ----- unicorn/no-empty-file -----
|
|
18709
18890
|
type UnicornNoEmptyFile = [] | [{
|
|
18710
18891
|
allowComments?: boolean;
|
|
@@ -18753,9 +18934,9 @@ type UnicornNoNull = [] | [{
|
|
|
18753
18934
|
type UnicornNoTypeofUndefined = [] | [{
|
|
18754
18935
|
checkGlobalVariables?: boolean;
|
|
18755
18936
|
}];
|
|
18756
|
-
// ----- unicorn/no-
|
|
18757
|
-
type
|
|
18758
|
-
|
|
18937
|
+
// ----- unicorn/no-unnecessary-parameters -----
|
|
18938
|
+
type UnicornNoUnnecessaryParameters = [] | [{
|
|
18939
|
+
minimumCallCount?: number;
|
|
18759
18940
|
}];
|
|
18760
18941
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
18761
18942
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
@@ -18767,10 +18948,6 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
18767
18948
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
18768
18949
|
maximumIgnoredElements?: number;
|
|
18769
18950
|
}];
|
|
18770
|
-
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
18771
|
-
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
18772
|
-
scopingRootAtRules?: string[];
|
|
18773
|
-
}];
|
|
18774
18951
|
// ----- unicorn/no-useless-undefined -----
|
|
18775
18952
|
type UnicornNoUselessUndefined = [] | [{
|
|
18776
18953
|
checkArguments?: boolean;
|
|
@@ -18827,6 +19004,7 @@ type UnicornPreferAt = [] | [{
|
|
|
18827
19004
|
// ----- unicorn/prefer-combined-guards -----
|
|
18828
19005
|
type UnicornPreferCombinedGuards = [] | [{
|
|
18829
19006
|
checkCompoundConditions?: boolean;
|
|
19007
|
+
checkMultiStatementBodies?: boolean;
|
|
18830
19008
|
}];
|
|
18831
19009
|
// ----- unicorn/prefer-continue -----
|
|
18832
19010
|
type UnicornPreferContinue = [] | [{
|
|
@@ -18843,10 +19021,6 @@ type UnicornPreferEarlyReturn = [] | [{
|
|
|
18843
19021
|
maximumStatements?: number;
|
|
18844
19022
|
checkShortBodies?: boolean;
|
|
18845
19023
|
}];
|
|
18846
|
-
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
18847
|
-
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
18848
|
-
unit?: ("dvh" | "svh" | "lvh");
|
|
18849
|
-
}];
|
|
18850
19024
|
// ----- unicorn/prefer-export-from -----
|
|
18851
19025
|
type UnicornPreferExportFrom = [] | [{
|
|
18852
19026
|
checkUsedVariables?: boolean;
|
|
@@ -18890,6 +19064,10 @@ type UnicornPreferSetHas = [] | [{
|
|
|
18890
19064
|
}];
|
|
18891
19065
|
// ----- unicorn/prefer-short-arrow-method -----
|
|
18892
19066
|
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
19067
|
+
// ----- unicorn/prefer-simplified-conditions -----
|
|
19068
|
+
type UnicornPreferSimplifiedConditions = [] | [{
|
|
19069
|
+
negatedConditions?: ("simplify" | "expand");
|
|
19070
|
+
}];
|
|
18893
19071
|
// ----- unicorn/prefer-single-call -----
|
|
18894
19072
|
type UnicornPreferSingleCall = [] | [{
|
|
18895
19073
|
ignore?: string[];
|
|
@@ -19147,6 +19325,14 @@ type VuePerfectionistComponentPropValues = [] | [{
|
|
|
19147
19325
|
type VuePerfectionistDefineMacrosNewline = [] | [{
|
|
19148
19326
|
macros?: ("defineProps" | "defineEmits" | "defineSlots" | "defineExpose" | "defineOptions")[];
|
|
19149
19327
|
}];
|
|
19328
|
+
// ----- vue-perfectionist/define-macros-type-style -----
|
|
19329
|
+
type VuePerfectionistDefineMacrosTypeStyle = [] | [{
|
|
19330
|
+
macros?: {
|
|
19331
|
+
defineProps?: (("inline" | "local" | "imported") | [("inline" | "local" | "imported"), ...(("inline" | "local" | "imported"))[]] | false);
|
|
19332
|
+
defineEmits?: (("inline" | "local" | "imported") | [("inline" | "local" | "imported"), ...(("inline" | "local" | "imported"))[]] | false);
|
|
19333
|
+
defineSlots?: (("inline" | "local" | "imported") | [("inline" | "local" | "imported"), ...(("inline" | "local" | "imported"))[]] | false);
|
|
19334
|
+
};
|
|
19335
|
+
}];
|
|
19150
19336
|
// ----- vue-perfectionist/prefer-ref-pattern -----
|
|
19151
19337
|
type VuePerfectionistPreferRefPattern = [] | [{
|
|
19152
19338
|
pattern?: string;
|
|
@@ -19160,6 +19346,14 @@ type VuePerfectionistRequireComponentProps = [] | [{
|
|
|
19160
19346
|
}[];
|
|
19161
19347
|
unknownBindings?: ("report" | "ignore");
|
|
19162
19348
|
}];
|
|
19349
|
+
// ----- vue-perfectionist/require-macro-type-name -----
|
|
19350
|
+
type VuePerfectionistRequireMacroTypeName = [] | [{
|
|
19351
|
+
macros?: {
|
|
19352
|
+
defineProps?: (string | false);
|
|
19353
|
+
defineEmits?: (string | false);
|
|
19354
|
+
defineSlots?: (string | false);
|
|
19355
|
+
};
|
|
19356
|
+
}];
|
|
19163
19357
|
// ----- vue-perfectionist/sort-script-setup -----
|
|
19164
19358
|
type VuePerfectionistSortScriptSetup = [] | [{
|
|
19165
19359
|
newlinesInside?: ((number | "ignore") | "newlinesBetween");
|