@ntnyq/eslint-config 7.0.0-beta.20 → 7.0.0-beta.21
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 +733 -362
- package/dist/index.mjs +182 -129
- package/package.json +17 -16
package/dist/index.d.mts
CHANGED
|
@@ -29,6 +29,7 @@ import pluginDeMorgan from "eslint-plugin-de-morgan";
|
|
|
29
29
|
import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
|
|
30
30
|
import pluginGitHubAction from "eslint-plugin-github-action";
|
|
31
31
|
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
32
|
+
import pluginVuePerfectionist from "eslint-plugin-vue-perfectionist";
|
|
32
33
|
import * as pluginESLintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
33
34
|
import processorVueBlocks, { Options } from "eslint-processor-vue-blocks";
|
|
34
35
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
@@ -61,10 +62,19 @@ export type Pretty<T> = { [P in keyof T]: T[P]; } & {};
|
|
|
61
62
|
export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
62
63
|
//#endregion
|
|
63
64
|
//#region src/configs/vue.d.ts
|
|
65
|
+
/**
|
|
66
|
+
* Options for a Vue config branch
|
|
67
|
+
*/
|
|
68
|
+
export type ConfigVueBranchOptions = OptionsFiles & OptionsOverrides;
|
|
64
69
|
/**
|
|
65
70
|
* Options type of {@link configVue}
|
|
66
71
|
*/
|
|
67
72
|
export type ConfigVueOptions = OptionsFiles & OptionsOverrides & OptionsShareable & OptionsFormatter & {
|
|
73
|
+
/**
|
|
74
|
+
* Configure vue-perfectionist plugin rules
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
vuePerfectionist?: boolean | ConfigVueBranchOptions;
|
|
68
78
|
/**
|
|
69
79
|
* Create virtual files for Vue SFC blocks to enable linting.
|
|
70
80
|
*
|
|
@@ -2429,7 +2439,7 @@ interface RuleOptions {
|
|
|
2429
2439
|
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
2430
2440
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
2431
2441
|
*/
|
|
2432
|
-
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<
|
|
2442
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<DeMorganNoNegatedDisjunction>;
|
|
2433
2443
|
/**
|
|
2434
2444
|
* Require `default` cases in `switch` statements
|
|
2435
2445
|
* @see https://eslint.org/docs/latest/rules/default-case
|
|
@@ -6501,1740 +6511,1841 @@ interface RuleOptions {
|
|
|
6501
6511
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6502
6512
|
/**
|
|
6503
6513
|
* Prefer better DOM traversal APIs.
|
|
6504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/better-dom-traversing.md
|
|
6505
6515
|
*/
|
|
6506
6516
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6507
6517
|
/**
|
|
6508
6518
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6510
6520
|
* @deprecated
|
|
6511
6521
|
*/
|
|
6512
6522
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6513
6523
|
/**
|
|
6514
6524
|
* Enforce a specific parameter name in catch clauses.
|
|
6515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/catch-error-name.md
|
|
6516
6526
|
*/
|
|
6517
6527
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6518
6528
|
/**
|
|
6519
6529
|
* Enforce consistent class references in static methods.
|
|
6520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6521
6531
|
*/
|
|
6522
6532
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6523
6533
|
/**
|
|
6524
6534
|
* Enforce better comment content.
|
|
6525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/comment-content.md
|
|
6526
6536
|
*/
|
|
6527
6537
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6528
6538
|
/**
|
|
6529
6539
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
6530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-arrow-return-style.md
|
|
6531
6541
|
*/
|
|
6532
6542
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
6533
6543
|
/**
|
|
6534
6544
|
* Enforce consistent assertion style with `node:assert`.
|
|
6535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-assert.md
|
|
6536
6546
|
*/
|
|
6537
6547
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6538
6548
|
/**
|
|
6539
6549
|
* Enforce consistent naming for boolean names.
|
|
6540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-boolean-name.md
|
|
6541
6551
|
*/
|
|
6542
6552
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6543
6553
|
/**
|
|
6544
6554
|
* Enforce consistent class member order.
|
|
6545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-class-member-order.md
|
|
6546
6556
|
*/
|
|
6547
6557
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6548
6558
|
/**
|
|
6549
6559
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-compound-words.md
|
|
6551
6561
|
*/
|
|
6552
6562
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6553
6563
|
/**
|
|
6554
6564
|
* Enforce consistent conditional object spread style.
|
|
6555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6556
6566
|
*/
|
|
6557
6567
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6558
6568
|
/**
|
|
6559
6569
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-date-clone.md
|
|
6561
6571
|
*/
|
|
6562
6572
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6563
6573
|
/**
|
|
6564
6574
|
* Use destructured variables over properties.
|
|
6565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-destructuring.md
|
|
6566
6576
|
*/
|
|
6567
6577
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6568
6578
|
/**
|
|
6569
6579
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6571
6581
|
*/
|
|
6572
6582
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6573
6583
|
/**
|
|
6574
6584
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-existence-index-check.md
|
|
6576
6586
|
*/
|
|
6577
6587
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6578
6588
|
/**
|
|
6579
6589
|
* Enforce consistent decorator position on exported classes.
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6581
6591
|
*/
|
|
6582
6592
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6583
6593
|
/**
|
|
6584
6594
|
* Move function definitions to the highest possible scope.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-scoping.md
|
|
6586
6596
|
*/
|
|
6587
6597
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6588
6598
|
/**
|
|
6589
6599
|
* Enforce function syntax by role.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-style.md
|
|
6591
6601
|
*/
|
|
6592
6602
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6593
6603
|
/**
|
|
6594
6604
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-json-file-read.md
|
|
6596
6606
|
*/
|
|
6597
6607
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6598
6608
|
/**
|
|
6599
6609
|
* Enforce consistent optional chaining for same-base member access.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-optional-chaining.md
|
|
6601
6611
|
*/
|
|
6602
6612
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6603
6613
|
/**
|
|
6604
6614
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6606
6616
|
*/
|
|
6607
6617
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6608
6618
|
/**
|
|
6609
6619
|
* Enforce consistent labels on tuple type elements.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-tuple-labels.md
|
|
6611
6621
|
*/
|
|
6612
6622
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6613
6623
|
/**
|
|
6614
6624
|
* Enforce correct `Error` subclassing.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/custom-error-definition.md
|
|
6616
6626
|
*/
|
|
6617
6627
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6618
6628
|
/**
|
|
6619
6629
|
* Enforce consistent default export declarations.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/default-export-style.md
|
|
6621
6631
|
*/
|
|
6622
6632
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6623
6633
|
/**
|
|
6624
6634
|
* Enforce consistent style for DOM element dataset access.
|
|
6625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/dom-node-dataset.md
|
|
6626
6636
|
*/
|
|
6627
6637
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6628
6638
|
/**
|
|
6629
6639
|
* Enforce no spaces between braces.
|
|
6630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/empty-brace-spaces.md
|
|
6631
6641
|
*/
|
|
6632
6642
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6633
6643
|
/**
|
|
6634
6644
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/error-message.md
|
|
6636
6646
|
*/
|
|
6637
6647
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6638
6648
|
/**
|
|
6639
6649
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/escape-case.md
|
|
6641
6651
|
*/
|
|
6642
6652
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6643
6653
|
/**
|
|
6644
6654
|
* Add expiration conditions to TODO comments.
|
|
6645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/expiring-todo-comments.md
|
|
6646
6656
|
*/
|
|
6647
6657
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6648
6658
|
/**
|
|
6649
6659
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-length-check.md
|
|
6651
6661
|
*/
|
|
6652
6662
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6653
6663
|
/**
|
|
6654
6664
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-timer-delay.md
|
|
6656
6666
|
*/
|
|
6657
6667
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6658
6668
|
/**
|
|
6659
6669
|
* Enforce a case style for filenames and directory names.
|
|
6660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/filename-case.md
|
|
6661
6671
|
*/
|
|
6662
6672
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6663
6673
|
/**
|
|
6664
6674
|
* Require identifiers to match a specified regular expression.
|
|
6665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/id-match.md
|
|
6666
6676
|
*/
|
|
6667
6677
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6668
6678
|
/**
|
|
6669
6679
|
* Enforce specific import styles per module.
|
|
6670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/import-style.md
|
|
6671
6681
|
*/
|
|
6672
6682
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6673
6683
|
/**
|
|
6674
6684
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/isolated-functions.md
|
|
6676
6686
|
*/
|
|
6677
6687
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6678
6688
|
/**
|
|
6679
6689
|
* Enforce a consistent style for optional loop sources.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/iteration-fallback-style.md
|
|
6681
6691
|
*/
|
|
6682
6692
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
6683
6693
|
/**
|
|
6684
6694
|
* Require or disallow logical assignment operator shorthand
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/logical-assignment-operators.md
|
|
6686
6696
|
*/
|
|
6687
6697
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6688
6698
|
/**
|
|
6689
6699
|
* Limit the depth of nested calls.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/max-nested-calls.md
|
|
6691
6701
|
*/
|
|
6692
6702
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6693
6703
|
/**
|
|
6694
6704
|
* Enforce replacements for variable, property, and filenames.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/name-replacements.md
|
|
6696
6706
|
*/
|
|
6697
6707
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6698
6708
|
/**
|
|
6699
6709
|
* Enforce correct use of `new` for builtin constructors.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/new-for-builtins.md
|
|
6701
6711
|
*/
|
|
6702
6712
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6703
6713
|
/**
|
|
6704
6714
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6706
6716
|
*/
|
|
6707
6717
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6708
6718
|
/**
|
|
6709
6719
|
* Disallow recursive access to `this` within getters and setters.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accessor-recursion.md
|
|
6711
6721
|
*/
|
|
6712
6722
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6713
6723
|
/**
|
|
6714
6724
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6716
6726
|
*/
|
|
6717
6727
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6718
6728
|
/**
|
|
6719
6729
|
* Disallow anonymous functions and classes as the default export.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-anonymous-default-export.md
|
|
6721
6731
|
*/
|
|
6722
6732
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6723
6733
|
/**
|
|
6724
6734
|
* Prevent passing a function reference directly to iterator methods.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-callback-reference.md
|
|
6726
6736
|
*/
|
|
6727
6737
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6728
6738
|
/**
|
|
6729
6739
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6731
6741
|
*/
|
|
6732
6742
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6733
6743
|
/**
|
|
6734
6744
|
* Disallow using reference values as `Array#fill()` values.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6736
6746
|
*/
|
|
6737
6747
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6738
6748
|
/**
|
|
6739
6749
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-from-fill.md
|
|
6741
6751
|
*/
|
|
6742
6752
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6743
6753
|
/**
|
|
6744
6754
|
* Disallow front-of-array mutation.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-front-mutation.md
|
|
6746
6756
|
*/
|
|
6747
6757
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6748
6758
|
/**
|
|
6749
6759
|
* Disallow using the `this` argument in array methods.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-method-this-argument.md
|
|
6751
6761
|
*/
|
|
6752
6762
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6753
6763
|
/**
|
|
6754
6764
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6756
6766
|
* @deprecated
|
|
6757
6767
|
*/
|
|
6758
6768
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6759
6769
|
/**
|
|
6760
6770
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reduce.md
|
|
6762
6772
|
*/
|
|
6763
6773
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6764
6774
|
/**
|
|
6765
6775
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reverse.md
|
|
6767
6777
|
*/
|
|
6768
6778
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6769
6779
|
/**
|
|
6770
6780
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort.md
|
|
6772
6782
|
*/
|
|
6773
6783
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6774
6784
|
/**
|
|
6775
6785
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6777
6787
|
*/
|
|
6778
6788
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6779
6789
|
/**
|
|
6780
6790
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-splice.md
|
|
6782
6792
|
*/
|
|
6783
6793
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6784
6794
|
/**
|
|
6785
6795
|
* Disallow asterisk prefixes in documentation comments.
|
|
6786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6787
6797
|
*/
|
|
6788
6798
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6799
|
+
/**
|
|
6800
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-iterator-callback.md
|
|
6802
|
+
*/
|
|
6803
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
6789
6804
|
/**
|
|
6790
6805
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-promise-finally.md
|
|
6792
6807
|
*/
|
|
6793
6808
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6794
6809
|
/**
|
|
6795
6810
|
* Disallow member access from await expression.
|
|
6796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-expression-member.md
|
|
6797
6812
|
*/
|
|
6798
6813
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6799
6814
|
/**
|
|
6800
6815
|
* Disallow using `await` in `Promise` method parameters.
|
|
6801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6802
6817
|
*/
|
|
6803
6818
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6804
6819
|
/**
|
|
6805
6820
|
* Disallow barrel files.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-barrel-files.md
|
|
6807
6822
|
*/
|
|
6808
6823
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
6809
6824
|
/**
|
|
6810
6825
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-blob-to-file.md
|
|
6812
6827
|
*/
|
|
6813
6828
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6814
6829
|
/**
|
|
6815
6830
|
* Disallow boolean-returning sort comparators.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6817
6832
|
*/
|
|
6818
6833
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6819
6834
|
/**
|
|
6820
|
-
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6822
6837
|
*/
|
|
6823
|
-
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<
|
|
6838
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
6824
6839
|
/**
|
|
6825
6840
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-canvas-to-image.md
|
|
6827
6842
|
*/
|
|
6828
6843
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6829
6844
|
/**
|
|
6830
6845
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-chained-comparison.md
|
|
6832
6847
|
*/
|
|
6833
6848
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6834
6849
|
/**
|
|
6835
6850
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-collection-bracket-access.md
|
|
6837
6852
|
*/
|
|
6838
6853
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6839
6854
|
/**
|
|
6840
6855
|
* Disallow dynamic object property existence checks.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6842
6857
|
*/
|
|
6843
6858
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6844
6859
|
/**
|
|
6845
6860
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-splice.md
|
|
6847
6862
|
*/
|
|
6848
6863
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6849
6864
|
/**
|
|
6850
6865
|
* Disallow confusing uses of `Array#with()`.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-with.md
|
|
6852
6867
|
*/
|
|
6853
6868
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6854
6869
|
/**
|
|
6855
6870
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-console-spaces.md
|
|
6857
6872
|
*/
|
|
6858
6873
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6859
6874
|
/**
|
|
6860
6875
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-constant-zero-expression.md
|
|
6862
6877
|
*/
|
|
6863
6878
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6864
6879
|
/**
|
|
6865
6880
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6867
6882
|
*/
|
|
6868
6883
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6884
|
+
/**
|
|
6885
|
+
* Disallow deprecated CSS features.
|
|
6886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-deprecated-css-features.md
|
|
6887
|
+
*/
|
|
6888
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
6869
6889
|
/**
|
|
6870
6890
|
* Do not use `document.cookie` directly.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-document-cookie.md
|
|
6872
6892
|
*/
|
|
6873
6893
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6874
6894
|
/**
|
|
6875
6895
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-double-comparison.md
|
|
6877
6897
|
*/
|
|
6878
6898
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6899
|
+
/**
|
|
6900
|
+
* Disallow duplicate CSS selectors.
|
|
6901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
6902
|
+
*/
|
|
6903
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
6904
|
+
/**
|
|
6905
|
+
* Disallow duplicate font family names.
|
|
6906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
6907
|
+
*/
|
|
6908
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
6879
6909
|
/**
|
|
6880
6910
|
* Disallow duplicate adjacent branches in if chains.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6882
6912
|
*/
|
|
6883
6913
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6884
6914
|
/**
|
|
6885
6915
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6887
6917
|
*/
|
|
6888
6918
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6889
6919
|
/**
|
|
6890
6920
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-loops.md
|
|
6892
6922
|
*/
|
|
6893
6923
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6894
6924
|
/**
|
|
6895
6925
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-set-values.md
|
|
6897
6927
|
*/
|
|
6898
6928
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6899
6929
|
/**
|
|
6900
6930
|
* Disallow empty files.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-empty-file.md
|
|
6902
6932
|
*/
|
|
6903
6933
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6904
6934
|
/**
|
|
6905
6935
|
* Disallow assigning to built-in error properties.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-error-property-assignment.md
|
|
6907
6937
|
*/
|
|
6908
6938
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6909
6939
|
/**
|
|
6910
6940
|
* Disallow exports in scripts.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-exports-in-scripts.md
|
|
6912
6942
|
*/
|
|
6913
6943
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6914
6944
|
/**
|
|
6915
6945
|
* Prefer `for…of` over the `forEach` method.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-each.md
|
|
6917
6947
|
*/
|
|
6918
6948
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6919
6949
|
/**
|
|
6920
6950
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-loop.md
|
|
6922
6952
|
*/
|
|
6923
6953
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6924
6954
|
/**
|
|
6925
6955
|
* Disallow assigning properties on the global object.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6927
6957
|
*/
|
|
6928
6958
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6929
6959
|
/**
|
|
6930
6960
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6932
6962
|
* @deprecated
|
|
6933
6963
|
*/
|
|
6934
6964
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6935
6965
|
/**
|
|
6936
6966
|
* Disallow immediate mutation after variable assignment.
|
|
6937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-immediate-mutation.md
|
|
6938
6968
|
*/
|
|
6939
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<
|
|
6969
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
6940
6970
|
/**
|
|
6941
6971
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6943
6973
|
*/
|
|
6944
6974
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6945
6975
|
/**
|
|
6946
6976
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6948
6978
|
*/
|
|
6949
6979
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6950
6980
|
/**
|
|
6951
6981
|
* Disallow incorrect template literal interpolation syntax.
|
|
6952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6953
6983
|
*/
|
|
6954
6984
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6955
6985
|
/**
|
|
6956
6986
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6958
6988
|
* @deprecated
|
|
6959
6989
|
*/
|
|
6960
6990
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6961
6991
|
/**
|
|
6962
6992
|
* Disallow `instanceof` with built-in objects
|
|
6963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-instanceof-builtins.md
|
|
6964
6994
|
*/
|
|
6965
6995
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6966
6996
|
/**
|
|
6967
6997
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-argument-count.md
|
|
6969
6999
|
*/
|
|
6970
7000
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6971
7001
|
/**
|
|
6972
7002
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
6973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6974
7004
|
*/
|
|
6975
7005
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6976
7006
|
/**
|
|
6977
7007
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6979
7009
|
*/
|
|
6980
7010
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6981
7011
|
/**
|
|
6982
7012
|
* Disallow invalid `accept` values on file inputs.
|
|
6983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6984
7014
|
*/
|
|
6985
7015
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7016
|
+
/**
|
|
7017
|
+
* Disallow unknown media features and invalid values for known media features.
|
|
7018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-media-features.md
|
|
7019
|
+
*/
|
|
7020
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
6986
7021
|
/**
|
|
6987
7022
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6989
7024
|
*/
|
|
6990
7025
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6991
7026
|
/**
|
|
6992
7027
|
* Disallow invalid implementations of well-known symbol methods.
|
|
6993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6994
7029
|
*/
|
|
6995
7030
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6996
7031
|
/**
|
|
6997
7032
|
* Disallow identifiers starting with `new` or `class`.
|
|
6998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-keyword-prefix.md
|
|
6999
7034
|
*/
|
|
7000
7035
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7001
7036
|
/**
|
|
7002
7037
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-current-target-access.md
|
|
7004
7039
|
*/
|
|
7005
7040
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7006
7041
|
/**
|
|
7007
7042
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7008
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-event-control.md
|
|
7009
7044
|
*/
|
|
7010
7045
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7011
7046
|
/**
|
|
7012
7047
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7014
7049
|
* @deprecated
|
|
7015
7050
|
*/
|
|
7016
7051
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7017
7052
|
/**
|
|
7018
7053
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-lonely-if.md
|
|
7020
7055
|
*/
|
|
7021
7056
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7022
7057
|
/**
|
|
7023
7058
|
* Disallow mutating a loop iterable during iteration.
|
|
7024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7025
7060
|
*/
|
|
7026
7061
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7027
7062
|
/**
|
|
7028
7063
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7030
7065
|
*/
|
|
7031
7066
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7032
7067
|
/**
|
|
7033
7068
|
* Disallow manually wrapped comments.
|
|
7034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7035
7070
|
*/
|
|
7036
7071
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7037
7072
|
/**
|
|
7038
7073
|
* Disallow checking a Map key before accessing a different key.
|
|
7039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-mismatched-map-key.md
|
|
7040
7075
|
*/
|
|
7041
7076
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7042
7077
|
/**
|
|
7043
7078
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7045
7080
|
*/
|
|
7046
7081
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7047
7082
|
/**
|
|
7048
7083
|
* Disallow references to missing local resources.
|
|
7049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-missing-local-resource.md
|
|
7050
7085
|
*/
|
|
7051
7086
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7052
7087
|
/**
|
|
7053
7088
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7055
7090
|
*/
|
|
7056
7091
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7057
7092
|
/**
|
|
7058
7093
|
* Disallow named usage of default import and export.
|
|
7059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-named-default.md
|
|
7060
7095
|
*/
|
|
7061
7096
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7062
7097
|
/**
|
|
7063
7098
|
* Disallow negated array predicate calls.
|
|
7064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-array-predicate.md
|
|
7065
7100
|
*/
|
|
7066
7101
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7067
7102
|
/**
|
|
7068
7103
|
* Disallow negated comparisons.
|
|
7069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-comparison.md
|
|
7070
7105
|
*/
|
|
7071
7106
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7072
7107
|
/**
|
|
7073
7108
|
* Disallow negated conditions.
|
|
7074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-condition.md
|
|
7075
7110
|
*/
|
|
7076
7111
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7077
7112
|
/**
|
|
7078
7113
|
* Disallow negated expression in equality check.
|
|
7079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7080
7115
|
*/
|
|
7081
7116
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7082
7117
|
/**
|
|
7083
7118
|
* Disallow nested ternary expressions.
|
|
7084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nested-ternary.md
|
|
7085
7120
|
*/
|
|
7086
7121
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7122
|
+
/**
|
|
7123
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
7124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
7125
|
+
*/
|
|
7126
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
7087
7127
|
/**
|
|
7088
7128
|
* Disallow `new Array()`.
|
|
7089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-array.md
|
|
7090
7130
|
*/
|
|
7091
7131
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7092
7132
|
/**
|
|
7093
7133
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-buffer.md
|
|
7095
7135
|
*/
|
|
7096
7136
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7097
7137
|
/**
|
|
7098
7138
|
* Disallow non-function values with function-style verb prefixes.
|
|
7099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7100
7140
|
*/
|
|
7101
7141
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7102
7142
|
/**
|
|
7103
7143
|
* Disallow non-standard properties on built-in objects.
|
|
7104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7105
7145
|
*/
|
|
7106
7146
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7107
7147
|
/**
|
|
7108
7148
|
* Disallow the use of the `null` literal.
|
|
7109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-null.md
|
|
7110
7150
|
*/
|
|
7111
7151
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7112
7152
|
/**
|
|
7113
7153
|
* Disallow the use of objects as default parameters.
|
|
7114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7115
7155
|
*/
|
|
7116
7156
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7117
7157
|
/**
|
|
7118
7158
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7120
7160
|
*/
|
|
7121
7161
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7122
7162
|
/**
|
|
7123
7163
|
* Disallow optional chaining on undeclared variables.
|
|
7124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7125
7165
|
*/
|
|
7126
7166
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7127
7167
|
/**
|
|
7128
7168
|
* Disallow `process.exit()`.
|
|
7129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-process-exit.md
|
|
7130
7170
|
*/
|
|
7131
7171
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7132
7172
|
/**
|
|
7133
7173
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-comparison.md
|
|
7135
7175
|
*/
|
|
7136
7176
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7177
|
+
/**
|
|
7178
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
7179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
7180
|
+
*/
|
|
7181
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
7137
7182
|
/**
|
|
7138
7183
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-return-array-push.md
|
|
7140
7185
|
*/
|
|
7141
7186
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7142
7187
|
/**
|
|
7143
7188
|
* Disallow selector syntax in DOM names.
|
|
7144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7145
7190
|
*/
|
|
7146
7191
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7147
7192
|
/**
|
|
7148
7193
|
* Disallow shorthand properties that override related longhand properties.
|
|
7149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7150
7195
|
*/
|
|
7151
7196
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7152
7197
|
/**
|
|
7153
7198
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7155
7200
|
*/
|
|
7156
7201
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7157
7202
|
/**
|
|
7158
7203
|
* Disallow classes that only have static members.
|
|
7159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-static-only-class.md
|
|
7160
7205
|
*/
|
|
7161
7206
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7162
7207
|
/**
|
|
7163
7208
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-subtraction-comparison.md
|
|
7165
7210
|
*/
|
|
7166
7211
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7167
7212
|
/**
|
|
7168
7213
|
* Disallow `then` property.
|
|
7169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-thenable.md
|
|
7170
7215
|
*/
|
|
7171
7216
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7172
7217
|
/**
|
|
7173
7218
|
* Disallow assigning `this` to a variable.
|
|
7174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-assignment.md
|
|
7175
7220
|
*/
|
|
7176
7221
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7177
7222
|
/**
|
|
7178
7223
|
* Disallow `this` outside of classes.
|
|
7179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-outside-of-class.md
|
|
7180
7225
|
*/
|
|
7181
7226
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7182
7227
|
/**
|
|
7183
7228
|
* Disallow assigning to top-level variables from inside functions.
|
|
7184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7185
7230
|
*/
|
|
7186
7231
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7187
7232
|
/**
|
|
7188
7233
|
* Disallow top-level side effects in exported modules.
|
|
7189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-side-effects.md
|
|
7190
7235
|
*/
|
|
7191
7236
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7192
7237
|
/**
|
|
7193
7238
|
* Disallow `all` as a transition property.
|
|
7194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-transition-all.md
|
|
7195
7240
|
*/
|
|
7196
7241
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7197
7242
|
/**
|
|
7198
7243
|
* Disallow comparing `undefined` using `typeof`.
|
|
7199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-typeof-undefined.md
|
|
7200
7245
|
*/
|
|
7201
7246
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7202
7247
|
/**
|
|
7203
7248
|
* Disallow referencing methods without calling them.
|
|
7204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-uncalled-method.md
|
|
7205
7250
|
*/
|
|
7206
7251
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7207
7252
|
/**
|
|
7208
7253
|
* Require class members to be declared.
|
|
7209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-undeclared-class-members.md
|
|
7210
7255
|
*/
|
|
7211
7256
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7257
|
+
/**
|
|
7258
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
7259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-css-annotations.md
|
|
7260
|
+
*/
|
|
7261
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
7262
|
+
/**
|
|
7263
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
7264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
7265
|
+
*/
|
|
7266
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
7212
7267
|
/**
|
|
7213
7268
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7215
7270
|
*/
|
|
7216
7271
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7217
7272
|
/**
|
|
7218
7273
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7220
7275
|
*/
|
|
7221
7276
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7222
7277
|
/**
|
|
7223
7278
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7225
7280
|
*/
|
|
7226
7281
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7227
7282
|
/**
|
|
7228
7283
|
* Disallow awaiting non-promise values.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-await.md
|
|
7230
7285
|
*/
|
|
7231
7286
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7232
7287
|
/**
|
|
7233
7288
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7235
7290
|
*/
|
|
7236
7291
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7237
7292
|
/**
|
|
7238
7293
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7240
7295
|
*/
|
|
7241
7296
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7242
7297
|
/**
|
|
7243
7298
|
* Disallow unnecessary `globalThis` references.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7245
7300
|
*/
|
|
7246
7301
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7247
7302
|
/**
|
|
7248
7303
|
* Disallow unnecessary nested ternary expressions.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7250
7305
|
*/
|
|
7251
7306
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7252
7307
|
/**
|
|
7253
7308
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7255
7310
|
*/
|
|
7256
7311
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7257
7312
|
/**
|
|
7258
7313
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7260
7315
|
*/
|
|
7261
7316
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7262
7317
|
/**
|
|
7263
7318
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-splice.md
|
|
7265
7320
|
*/
|
|
7266
7321
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7267
7322
|
/**
|
|
7268
7323
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7270
7325
|
*/
|
|
7271
7326
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7272
7327
|
/**
|
|
7273
7328
|
* Disallow unreadable array destructuring.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7275
7330
|
*/
|
|
7276
7331
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7277
7332
|
/**
|
|
7278
7333
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7280
7335
|
*/
|
|
7281
7336
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7282
7337
|
/**
|
|
7283
7338
|
* Disallow unreadable IIFEs.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-iife.md
|
|
7285
7340
|
*/
|
|
7286
7341
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7287
7342
|
/**
|
|
7288
7343
|
* Disallow unreadable `new` expressions.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7290
7345
|
*/
|
|
7291
7346
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7292
7347
|
/**
|
|
7293
7348
|
* Disallow unreadable object destructuring.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7295
7350
|
*/
|
|
7296
7351
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7297
7352
|
/**
|
|
7298
7353
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7300
7355
|
*/
|
|
7301
7356
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7302
7357
|
/**
|
|
7303
7358
|
* Disallow unsafe DOM HTML APIs.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7305
7360
|
*/
|
|
7306
7361
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7307
7362
|
/**
|
|
7308
7363
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
7310
7365
|
*/
|
|
7311
7366
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
7312
7367
|
/**
|
|
7313
7368
|
* Disallow unsafe values as property keys.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-property-key.md
|
|
7315
7370
|
*/
|
|
7316
7371
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7317
7372
|
/**
|
|
7318
7373
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
7320
7375
|
*/
|
|
7321
7376
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
7322
7377
|
/**
|
|
7323
7378
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7325
7380
|
*/
|
|
7326
7381
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7327
7382
|
/**
|
|
7328
|
-
* Disallow
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* Disallow unscoped CSS nesting selectors.
|
|
7384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
7385
|
+
*/
|
|
7386
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
7387
|
+
/**
|
|
7388
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
7389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
7390
|
+
* @deprecated
|
|
7330
7391
|
*/
|
|
7331
7392
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7393
|
+
/**
|
|
7394
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
7395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
7396
|
+
*/
|
|
7397
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
7398
|
+
/**
|
|
7399
|
+
* Disallow discarding lazy iterator helpers.
|
|
7400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-iterator-helper.md
|
|
7401
|
+
*/
|
|
7402
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
7332
7403
|
/**
|
|
7333
7404
|
* Disallow unused object properties.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-properties.md
|
|
7335
7406
|
*/
|
|
7336
7407
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7337
7408
|
/**
|
|
7338
7409
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7340
7411
|
*/
|
|
7341
7412
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7342
7413
|
/**
|
|
7343
7414
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-coercion.md
|
|
7345
7416
|
*/
|
|
7346
7417
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7347
7418
|
/**
|
|
7348
7419
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-collection-argument.md
|
|
7350
7421
|
*/
|
|
7351
7422
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7352
7423
|
/**
|
|
7353
7424
|
* Disallow useless compound assignments such as `x += 0`.
|
|
7354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7355
7426
|
*/
|
|
7356
7427
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7357
7428
|
/**
|
|
7358
7429
|
* Disallow useless concatenation of literals.
|
|
7359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-concat.md
|
|
7360
7431
|
*/
|
|
7361
7432
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7362
7433
|
/**
|
|
7363
7434
|
* Disallow useless `continue` statements.
|
|
7364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-continue.md
|
|
7365
7436
|
*/
|
|
7366
7437
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7367
7438
|
/**
|
|
7368
7439
|
* Disallow unnecessary existence checks before deletion.
|
|
7369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-delete-check.md
|
|
7370
7441
|
*/
|
|
7371
7442
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7372
7443
|
/**
|
|
7373
7444
|
* Disallow `else` after a statement that exits.
|
|
7374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-else.md
|
|
7375
7446
|
*/
|
|
7376
7447
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7377
7448
|
/**
|
|
7378
7449
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7380
7451
|
*/
|
|
7381
7452
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7382
7453
|
/**
|
|
7383
7454
|
* Disallow useless fallback when spreading in object literals.
|
|
7384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7385
7456
|
*/
|
|
7386
7457
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7387
7458
|
/**
|
|
7388
7459
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7390
7461
|
*/
|
|
7391
7462
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7392
7463
|
/**
|
|
7393
7464
|
* Disallow useless array length check.
|
|
7394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-length-check.md
|
|
7395
7466
|
*/
|
|
7396
7467
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7397
7468
|
/**
|
|
7398
7469
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-logical-operand.md
|
|
7400
7471
|
*/
|
|
7401
7472
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7402
7473
|
/**
|
|
7403
7474
|
* Disallow useless overrides of class methods.
|
|
7404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-override.md
|
|
7405
7476
|
*/
|
|
7406
7477
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7407
7478
|
/**
|
|
7408
7479
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7410
7481
|
*/
|
|
7411
7482
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7412
7483
|
/**
|
|
7413
7484
|
* Disallow redundant re-exports.
|
|
7414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-re-export.md
|
|
7415
7486
|
*/
|
|
7416
7487
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7417
7488
|
/**
|
|
7418
7489
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-recursion.md
|
|
7420
7491
|
*/
|
|
7421
7492
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7493
|
+
/**
|
|
7494
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
7495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-set-construction.md
|
|
7496
|
+
*/
|
|
7497
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
7422
7498
|
/**
|
|
7423
7499
|
* Disallow unnecessary spread.
|
|
7424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-spread.md
|
|
7425
7501
|
*/
|
|
7426
7502
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7427
7503
|
/**
|
|
7428
7504
|
* Disallow useless case in switch statements.
|
|
7429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-switch-case.md
|
|
7430
7506
|
*/
|
|
7431
7507
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7432
7508
|
/**
|
|
7433
7509
|
* Disallow useless template literal expressions.
|
|
7434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-template-literals.md
|
|
7435
7511
|
*/
|
|
7436
7512
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7437
7513
|
/**
|
|
7438
7514
|
* Disallow useless `undefined`.
|
|
7439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-undefined.md
|
|
7440
7516
|
*/
|
|
7441
7517
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7518
|
+
/**
|
|
7519
|
+
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
7520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-using-resource-escape.md
|
|
7521
|
+
*/
|
|
7522
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
7442
7523
|
/**
|
|
7443
7524
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7445
7526
|
*/
|
|
7446
7527
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7447
7528
|
/**
|
|
7448
7529
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-zero-fractions.md
|
|
7450
7531
|
*/
|
|
7451
7532
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7452
7533
|
/**
|
|
7453
7534
|
* Enforce proper case for numeric literals.
|
|
7454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/number-literal-case.md
|
|
7455
7536
|
*/
|
|
7456
7537
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7457
7538
|
/**
|
|
7458
7539
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/numeric-separators-style.md
|
|
7460
7541
|
*/
|
|
7461
7542
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7462
7543
|
/**
|
|
7463
7544
|
* Require assignment operator shorthand where possible.
|
|
7464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/operator-assignment.md
|
|
7465
7546
|
*/
|
|
7466
7547
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7467
7548
|
/**
|
|
7468
7549
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7470
7551
|
*/
|
|
7471
7552
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7472
7553
|
/**
|
|
7473
7554
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7475
7556
|
*/
|
|
7476
7557
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7477
7558
|
/**
|
|
7478
7559
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener.md
|
|
7480
7561
|
*/
|
|
7481
7562
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7482
7563
|
/**
|
|
7483
7564
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7485
7566
|
*/
|
|
7486
7567
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7487
7568
|
/**
|
|
7488
7569
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-aggregate-error.md
|
|
7490
7571
|
*/
|
|
7491
7572
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7492
7573
|
/**
|
|
7493
7574
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-find.md
|
|
7495
7576
|
*/
|
|
7496
7577
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7497
7578
|
/**
|
|
7498
7579
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat.md
|
|
7500
7581
|
*/
|
|
7501
7582
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7502
7583
|
/**
|
|
7503
7584
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat-map.md
|
|
7505
7586
|
*/
|
|
7506
7587
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7507
7588
|
/**
|
|
7508
|
-
* Prefer `Array.fromAsync()` over
|
|
7509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
7590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-async.md
|
|
7510
7591
|
*/
|
|
7511
7592
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7512
7593
|
/**
|
|
7513
7594
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-map.md
|
|
7515
7596
|
*/
|
|
7516
7597
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7517
7598
|
/**
|
|
7518
7599
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-range.md
|
|
7520
7601
|
*/
|
|
7521
7602
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7522
7603
|
/**
|
|
7523
7604
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-index-of.md
|
|
7525
7606
|
*/
|
|
7526
7607
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7527
7608
|
/**
|
|
7528
7609
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7530
7611
|
*/
|
|
7531
7612
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7532
7613
|
/**
|
|
7533
7614
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-last-methods.md
|
|
7535
7616
|
*/
|
|
7536
7617
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7537
7618
|
/**
|
|
7538
7619
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-slice.md
|
|
7540
7621
|
*/
|
|
7541
7622
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7542
7623
|
/**
|
|
7543
7624
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-some.md
|
|
7545
7626
|
*/
|
|
7546
7627
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7547
7628
|
/**
|
|
7548
7629
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-at.md
|
|
7550
7631
|
*/
|
|
7551
7632
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7552
7633
|
/**
|
|
7553
7634
|
* Prefer `await` over promise chaining.
|
|
7554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-await.md
|
|
7555
7636
|
*/
|
|
7556
7637
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7557
7638
|
/**
|
|
7558
7639
|
* Prefer `BigInt` literals over the constructor.
|
|
7559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-bigint-literals.md
|
|
7560
7641
|
*/
|
|
7561
7642
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7562
7643
|
/**
|
|
7563
7644
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7565
7646
|
*/
|
|
7566
7647
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7567
7648
|
/**
|
|
7568
7649
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7570
7651
|
*/
|
|
7571
7652
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7572
7653
|
/**
|
|
7573
7654
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-boolean-return.md
|
|
7575
7656
|
*/
|
|
7576
7657
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7577
7658
|
/**
|
|
7578
7659
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-class-fields.md
|
|
7580
7661
|
*/
|
|
7581
7662
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7582
7663
|
/**
|
|
7583
7664
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7585
7666
|
*/
|
|
7586
7667
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7587
7668
|
/**
|
|
7588
7669
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-code-point.md
|
|
7590
7671
|
*/
|
|
7591
7672
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7592
7673
|
/**
|
|
7593
|
-
* Prefer
|
|
7594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
7675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-combined-guards.md
|
|
7676
|
+
*/
|
|
7677
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
7678
|
+
/**
|
|
7679
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
7680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-continue.md
|
|
7595
7681
|
*/
|
|
7596
7682
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7597
7683
|
/**
|
|
7598
7684
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-date-now.md
|
|
7600
7686
|
*/
|
|
7601
7687
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7602
7688
|
/**
|
|
7603
7689
|
* Prefer default parameters over reassignment.
|
|
7604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-default-parameters.md
|
|
7605
7691
|
*/
|
|
7606
7692
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7607
7693
|
/**
|
|
7608
7694
|
* Prefer direct iteration over default iterator method calls.
|
|
7609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-direct-iteration.md
|
|
7610
7696
|
*/
|
|
7611
7697
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7612
7698
|
/**
|
|
7613
7699
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dispose.md
|
|
7615
7701
|
*/
|
|
7616
7702
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7617
7703
|
/**
|
|
7618
7704
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-append.md
|
|
7620
7706
|
*/
|
|
7621
7707
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7622
7708
|
/**
|
|
7623
7709
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7625
7711
|
* @deprecated
|
|
7626
7712
|
*/
|
|
7627
7713
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7628
7714
|
/**
|
|
7629
7715
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7631
7717
|
*/
|
|
7632
7718
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7633
7719
|
/**
|
|
7634
7720
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7636
7722
|
*/
|
|
7637
7723
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7638
7724
|
/**
|
|
7639
|
-
* Prefer `.replaceChildren()` when
|
|
7640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7725
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
7726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7641
7727
|
*/
|
|
7642
7728
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7643
7729
|
/**
|
|
7644
7730
|
* Prefer `.textContent` over `.innerText`.
|
|
7645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7646
7732
|
*/
|
|
7647
7733
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7648
7734
|
/**
|
|
7649
|
-
* Prefer early returns over
|
|
7650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7735
|
+
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
7736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-early-return.md
|
|
7651
7737
|
*/
|
|
7652
7738
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7653
7739
|
/**
|
|
7654
7740
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-else-if.md
|
|
7656
7742
|
*/
|
|
7657
7743
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7658
7744
|
/**
|
|
7659
7745
|
* Prefer `Error.isError()` when checking for errors.
|
|
7660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-error-is-error.md
|
|
7661
7747
|
*/
|
|
7662
7748
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7663
7749
|
/**
|
|
7664
7750
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-event-target.md
|
|
7666
7752
|
*/
|
|
7667
7753
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7668
7754
|
/**
|
|
7669
7755
|
* Prefer explicit viewport units.
|
|
7670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
7671
7757
|
*/
|
|
7672
7758
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
7673
7759
|
/**
|
|
7674
7760
|
* Prefer `export…from` when re-exporting.
|
|
7675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-export-from.md
|
|
7676
7762
|
*/
|
|
7677
7763
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7678
7764
|
/**
|
|
7679
7765
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7681
7767
|
*/
|
|
7682
7768
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7683
7769
|
/**
|
|
7684
7770
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7686
7772
|
*/
|
|
7687
7773
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7688
7774
|
/**
|
|
7689
7775
|
* Prefer global numeric constants over `Number` static properties.
|
|
7690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-number-constants.md
|
|
7691
7777
|
*/
|
|
7692
7778
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7693
7779
|
/**
|
|
7694
7780
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-this.md
|
|
7696
7782
|
*/
|
|
7697
7783
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7698
7784
|
/**
|
|
7699
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
7700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7785
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
7786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-group-by.md
|
|
7701
7787
|
*/
|
|
7702
7788
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7703
7789
|
/**
|
|
7704
7790
|
* Prefer `.has()` when checking existence.
|
|
7705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-has-check.md
|
|
7706
7792
|
*/
|
|
7707
7793
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7708
7794
|
/**
|
|
7709
7795
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7711
7797
|
*/
|
|
7712
7798
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7713
7799
|
/**
|
|
7714
7800
|
* Prefer HTTPS over HTTP.
|
|
7715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-https.md
|
|
7716
7802
|
*/
|
|
7717
7803
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
7718
7804
|
/**
|
|
7719
7805
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7721
7807
|
*/
|
|
7722
7808
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7723
7809
|
/**
|
|
7724
7810
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7726
7812
|
*/
|
|
7727
7813
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7728
7814
|
/**
|
|
7729
7815
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes.md
|
|
7731
7817
|
*/
|
|
7732
7818
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7733
7819
|
/**
|
|
7734
7820
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7736
7822
|
*/
|
|
7737
7823
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7738
7824
|
/**
|
|
7739
7825
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7741
7827
|
*/
|
|
7742
7828
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7743
7829
|
/**
|
|
7744
7830
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-concat.md
|
|
7746
7832
|
*/
|
|
7747
7833
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7748
7834
|
/**
|
|
7749
7835
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7751
7837
|
*/
|
|
7752
7838
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7753
7839
|
/**
|
|
7754
7840
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7756
7842
|
*/
|
|
7757
7843
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7758
7844
|
/**
|
|
7759
7845
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7761
7847
|
*/
|
|
7762
7848
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7849
|
+
/**
|
|
7850
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
7851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-zip.md
|
|
7852
|
+
*/
|
|
7853
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
7854
|
+
/**
|
|
7855
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
7856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-json-import.md
|
|
7857
|
+
*/
|
|
7858
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
7763
7859
|
/**
|
|
7764
7860
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7766
7862
|
* @deprecated
|
|
7767
7863
|
*/
|
|
7768
7864
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7769
7865
|
/**
|
|
7770
7866
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7772
7868
|
*/
|
|
7773
7869
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7774
7870
|
/**
|
|
7775
7871
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-location-assign.md
|
|
7777
7873
|
*/
|
|
7778
7874
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7779
7875
|
/**
|
|
7780
7876
|
* Prefer using a logical operator over a ternary.
|
|
7781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7782
7878
|
*/
|
|
7783
7879
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7784
7880
|
/**
|
|
7785
7881
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-map-from-entries.md
|
|
7787
7883
|
*/
|
|
7788
7884
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7789
7885
|
/**
|
|
7790
7886
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-abs.md
|
|
7792
7888
|
*/
|
|
7793
7889
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7794
7890
|
/**
|
|
7795
7891
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-constants.md
|
|
7797
7893
|
*/
|
|
7798
7894
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7799
7895
|
/**
|
|
7800
7896
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-min-max.md
|
|
7802
7898
|
*/
|
|
7803
7899
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7804
7900
|
/**
|
|
7805
7901
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-trunc.md
|
|
7807
7903
|
*/
|
|
7808
7904
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7905
|
+
/**
|
|
7906
|
+
* Prefer modern media feature range syntax.
|
|
7907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
7908
|
+
*/
|
|
7909
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
7809
7910
|
/**
|
|
7810
7911
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7812
7913
|
*/
|
|
7813
7914
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7814
7915
|
/**
|
|
7815
7916
|
* Prefer modern DOM APIs.
|
|
7816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7817
7918
|
*/
|
|
7818
7919
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7819
7920
|
/**
|
|
7820
7921
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7822
7923
|
*/
|
|
7823
7924
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7824
7925
|
/**
|
|
7825
7926
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-module.md
|
|
7827
7928
|
*/
|
|
7828
7929
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7829
7930
|
/**
|
|
7830
7931
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7832
7933
|
*/
|
|
7833
7934
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7834
7935
|
/**
|
|
7835
7936
|
* Prefer negative index over `.length - index` when possible.
|
|
7836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-negative-index.md
|
|
7837
7938
|
*/
|
|
7838
7939
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7839
7940
|
/**
|
|
7840
7941
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-node-protocol.md
|
|
7842
7943
|
*/
|
|
7843
7944
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7844
7945
|
/**
|
|
7845
7946
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-coercion.md
|
|
7847
7948
|
*/
|
|
7848
7949
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7849
7950
|
/**
|
|
7850
7951
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7852
7953
|
*/
|
|
7853
7954
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7854
7955
|
/**
|
|
7855
7956
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-properties.md
|
|
7857
7958
|
*/
|
|
7858
7959
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7859
7960
|
/**
|
|
7860
7961
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-define-properties.md
|
|
7862
7963
|
*/
|
|
7863
7964
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7864
7965
|
/**
|
|
7865
7966
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7867
7968
|
*/
|
|
7868
7969
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7869
7970
|
/**
|
|
7870
7971
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-from-entries.md
|
|
7872
7973
|
*/
|
|
7873
7974
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7874
7975
|
/**
|
|
7875
7976
|
* Prefer the most specific `Object` iterable method.
|
|
7876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7877
7978
|
*/
|
|
7878
7979
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7879
7980
|
/**
|
|
7880
7981
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-observer-apis.md
|
|
7882
7983
|
*/
|
|
7883
7984
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7884
7985
|
/**
|
|
7885
7986
|
* Prefer omitting the `catch` binding parameter.
|
|
7886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7887
7988
|
*/
|
|
7888
7989
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7889
7990
|
/**
|
|
7890
7991
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-path2d.md
|
|
7892
7993
|
*/
|
|
7893
7994
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7894
7995
|
/**
|
|
7895
7996
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-private-class-fields.md
|
|
7897
7998
|
*/
|
|
7898
7999
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7899
8000
|
/**
|
|
7900
8001
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-try.md
|
|
7902
8003
|
*/
|
|
7903
8004
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7904
8005
|
/**
|
|
7905
8006
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7907
8008
|
*/
|
|
7908
8009
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7909
8010
|
/**
|
|
7910
8011
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-prototype-methods.md
|
|
7912
8013
|
*/
|
|
7913
8014
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7914
8015
|
/**
|
|
7915
8016
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-query-selector.md
|
|
7917
8018
|
*/
|
|
7918
8019
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7919
8020
|
/**
|
|
7920
8021
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-queue-microtask.md
|
|
7922
8023
|
*/
|
|
7923
8024
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7924
8025
|
/**
|
|
7925
8026
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-reflect-apply.md
|
|
7927
8028
|
*/
|
|
7928
8029
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7929
8030
|
/**
|
|
7930
8031
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-escape.md
|
|
7932
8033
|
*/
|
|
7933
8034
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7934
8035
|
/**
|
|
7935
8036
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-test.md
|
|
7937
8038
|
*/
|
|
7938
8039
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7939
8040
|
/**
|
|
7940
8041
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-response-static-json.md
|
|
7942
8043
|
*/
|
|
7943
8044
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7944
8045
|
/**
|
|
7945
8046
|
* Prefer `:scope` when using element query selector methods.
|
|
7946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-scoped-selector.md
|
|
7947
8048
|
*/
|
|
7948
8049
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7949
8050
|
/**
|
|
7950
8051
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-has.md
|
|
7952
8053
|
*/
|
|
7953
8054
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7954
8055
|
/**
|
|
7955
8056
|
* Prefer `Set` methods for Set operations.
|
|
7956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-methods.md
|
|
7957
8058
|
*/
|
|
7958
8059
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7959
8060
|
/**
|
|
7960
8061
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-size.md
|
|
7962
8063
|
*/
|
|
7963
8064
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7964
8065
|
/**
|
|
7965
8066
|
* Prefer arrow function properties over methods with a single return.
|
|
7966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7967
8068
|
*/
|
|
7968
8069
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
7969
8070
|
/**
|
|
7970
8071
|
* Prefer simple conditions first in logical expressions.
|
|
7971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7972
8073
|
*/
|
|
7973
8074
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7974
8075
|
/**
|
|
7975
8076
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7977
8078
|
*/
|
|
7978
8079
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7979
8080
|
/**
|
|
7980
8081
|
* Prefer simplified conditions.
|
|
7981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7982
8083
|
*/
|
|
7983
8084
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
7984
8085
|
/**
|
|
7985
8086
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7987
8088
|
*/
|
|
7988
8089
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7989
8090
|
/**
|
|
7990
8091
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-call.md
|
|
7992
8093
|
*/
|
|
7993
8094
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7994
8095
|
/**
|
|
7995
8096
|
* Prefer a single object destructuring declaration per local const source.
|
|
7996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7997
8098
|
*/
|
|
7998
8099
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7999
8100
|
/**
|
|
8000
8101
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-replace.md
|
|
8002
8103
|
*/
|
|
8003
8104
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8004
8105
|
/**
|
|
8005
8106
|
* Prefer declaring variables in the smallest possible scope.
|
|
8006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-smaller-scope.md
|
|
8007
8108
|
*/
|
|
8008
8109
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8009
8110
|
/**
|
|
8010
8111
|
* Prefer `String#split()` with a limit.
|
|
8011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-split-limit.md
|
|
8012
8113
|
*/
|
|
8013
8114
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8014
8115
|
/**
|
|
8015
8116
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-spread.md
|
|
8017
8118
|
*/
|
|
8018
8119
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8019
8120
|
/**
|
|
8020
8121
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-match-all.md
|
|
8022
8123
|
*/
|
|
8023
8124
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8024
8125
|
/**
|
|
8025
8126
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8027
8128
|
*/
|
|
8028
8129
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8029
8130
|
/**
|
|
8030
8131
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-raw.md
|
|
8032
8133
|
*/
|
|
8033
8134
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8034
8135
|
/**
|
|
8035
8136
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-repeat.md
|
|
8037
8138
|
*/
|
|
8038
8139
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8039
8140
|
/**
|
|
8040
8141
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-replace-all.md
|
|
8042
8143
|
*/
|
|
8043
8144
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8044
8145
|
/**
|
|
8045
8146
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-slice.md
|
|
8047
8148
|
*/
|
|
8048
8149
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8049
8150
|
/**
|
|
8050
8151
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8052
8153
|
*/
|
|
8053
8154
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8054
8155
|
/**
|
|
8055
8156
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8057
8158
|
*/
|
|
8058
8159
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8059
8160
|
/**
|
|
8060
8161
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-structured-clone.md
|
|
8062
8163
|
*/
|
|
8063
8164
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8064
8165
|
/**
|
|
8065
8166
|
* Prefer `switch` over multiple `else-if`.
|
|
8066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-switch.md
|
|
8067
8168
|
*/
|
|
8068
8169
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8069
8170
|
/**
|
|
8070
8171
|
* Prefer `Temporal` over `Date`.
|
|
8071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal.md
|
|
8072
8173
|
*/
|
|
8073
8174
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8175
|
+
/**
|
|
8176
|
+
* Prefer direct Temporal conversion methods.
|
|
8177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal-conversion.md
|
|
8178
|
+
*/
|
|
8179
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
8074
8180
|
/**
|
|
8075
8181
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-ternary.md
|
|
8077
8183
|
*/
|
|
8078
8184
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8079
8185
|
/**
|
|
8080
8186
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-then-catch.md
|
|
8082
8188
|
*/
|
|
8083
8189
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8084
8190
|
/**
|
|
8085
8191
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8087
8193
|
*/
|
|
8088
8194
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8089
8195
|
/**
|
|
8090
8196
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-top-level-await.md
|
|
8092
8198
|
*/
|
|
8093
8199
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8094
8200
|
/**
|
|
8095
8201
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-error.md
|
|
8097
8203
|
*/
|
|
8098
8204
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8099
8205
|
/**
|
|
8100
8206
|
* Require type literals to be last in union types.
|
|
8101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-literal-last.md
|
|
8102
8208
|
*/
|
|
8103
8209
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8104
8210
|
/**
|
|
8105
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
8106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8211
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
8212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8107
8213
|
*/
|
|
8108
8214
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8215
|
+
/**
|
|
8216
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
8217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-hex.md
|
|
8218
|
+
*/
|
|
8219
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
8109
8220
|
/**
|
|
8110
8221
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unary-minus.md
|
|
8112
8223
|
*/
|
|
8113
8224
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8114
8225
|
/**
|
|
8115
8226
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8117
8228
|
*/
|
|
8118
8229
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8119
8230
|
/**
|
|
8120
8231
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-can-parse.md
|
|
8122
8233
|
*/
|
|
8123
8234
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8124
8235
|
/**
|
|
8125
8236
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-href.md
|
|
8127
8238
|
*/
|
|
8128
8239
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8129
8240
|
/**
|
|
8130
8241
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8132
8243
|
*/
|
|
8133
8244
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8134
8245
|
/**
|
|
8135
8246
|
* Prefer putting the condition in the while statement.
|
|
8136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8137
8248
|
*/
|
|
8138
8249
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8139
8250
|
/**
|
|
8140
8251
|
* Renamed to `unicorn/name-replacements`.
|
|
8141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8142
8253
|
* @deprecated
|
|
8143
8254
|
*/
|
|
8144
8255
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8145
8256
|
/**
|
|
8146
8257
|
* Enforce consistent relative URL style.
|
|
8147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/relative-url-style.md
|
|
8148
8259
|
*/
|
|
8149
8260
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8150
8261
|
/**
|
|
8151
8262
|
* Enforce using the separator argument with `Array#join()`.
|
|
8152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-join-separator.md
|
|
8153
8264
|
*/
|
|
8154
8265
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8155
8266
|
/**
|
|
8156
8267
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-sort-compare.md
|
|
8158
8269
|
*/
|
|
8159
8270
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8160
8271
|
/**
|
|
8161
8272
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-css-escape.md
|
|
8163
8274
|
*/
|
|
8164
8275
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8165
8276
|
/**
|
|
8166
8277
|
* Require configured YAML frontmatter fields.
|
|
8167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-frontmatter-fields.md
|
|
8168
8279
|
*/
|
|
8169
8280
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8170
8281
|
/**
|
|
8171
8282
|
* Require non-empty module attributes for imports and exports
|
|
8172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-attributes.md
|
|
8173
8284
|
*/
|
|
8174
8285
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8175
8286
|
/**
|
|
8176
8287
|
* Require non-empty specifier list in import and export statements.
|
|
8177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-specifiers.md
|
|
8178
8289
|
*/
|
|
8179
8290
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8180
8291
|
/**
|
|
8181
8292
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8183
8294
|
*/
|
|
8184
8295
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8185
8296
|
/**
|
|
8186
8297
|
* Require passive event listeners for high-frequency events.
|
|
8187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-passive-events.md
|
|
8188
8299
|
*/
|
|
8189
8300
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8190
8301
|
/**
|
|
8191
8302
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-post-message-target-origin.md
|
|
8193
8304
|
*/
|
|
8194
8305
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8195
8306
|
/**
|
|
8196
8307
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8198
8309
|
*/
|
|
8199
8310
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8200
8311
|
/**
|
|
8201
8312
|
* Enforce a consistent style for single-line block comments.
|
|
8202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/single-line-block-comment-style.md
|
|
8203
8314
|
*/
|
|
8204
8315
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8205
8316
|
/**
|
|
8206
8317
|
* Enforce better string content.
|
|
8207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/string-content.md
|
|
8208
8319
|
*/
|
|
8209
8320
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8210
8321
|
/**
|
|
8211
8322
|
* Enforce consistent brace style for `case` clauses.
|
|
8212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-braces.md
|
|
8213
8324
|
*/
|
|
8214
8325
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8215
8326
|
/**
|
|
8216
8327
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-break-position.md
|
|
8218
8329
|
*/
|
|
8219
8330
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8220
8331
|
/**
|
|
8221
8332
|
* Fix whitespace-insensitive template indentation.
|
|
8222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/template-indent.md
|
|
8223
8334
|
*/
|
|
8224
8335
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8225
8336
|
/**
|
|
8226
8337
|
* Enforce consistent case for text encoding identifiers.
|
|
8227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8228
8339
|
*/
|
|
8229
8340
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8230
8341
|
/**
|
|
8231
8342
|
* Require `new` when creating an error.
|
|
8232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/throw-new-error.md
|
|
8233
8344
|
*/
|
|
8234
8345
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8235
8346
|
/**
|
|
8236
8347
|
* Limit the complexity of `try` blocks.
|
|
8237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/try-complexity.md
|
|
8238
8349
|
*/
|
|
8239
8350
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8240
8351
|
/**
|
|
@@ -8683,6 +8794,26 @@ interface RuleOptions {
|
|
|
8683
8794
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
|
|
8684
8795
|
*/
|
|
8685
8796
|
'vitest/warn-todo'?: Linter.RuleEntry<[]>;
|
|
8797
|
+
/**
|
|
8798
|
+
* enforce inline callback function and body styles for Vue APIs.
|
|
8799
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/callback-style.md
|
|
8800
|
+
*/
|
|
8801
|
+
'vue-perfectionist/callback-style'?: Linter.RuleEntry<VuePerfectionistCallbackStyle>;
|
|
8802
|
+
/**
|
|
8803
|
+
* require multiline inline declarations in Vue compiler macros.
|
|
8804
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-macros-newline.md
|
|
8805
|
+
*/
|
|
8806
|
+
'vue-perfectionist/define-macros-newline'?: Linter.RuleEntry<VuePerfectionistDefineMacrosNewline>;
|
|
8807
|
+
/**
|
|
8808
|
+
* enforce a naming pattern for Vue template references.
|
|
8809
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-ref-pattern.md
|
|
8810
|
+
*/
|
|
8811
|
+
'vue-perfectionist/prefer-ref-pattern'?: Linter.RuleEntry<VuePerfectionistPreferRefPattern>;
|
|
8812
|
+
/**
|
|
8813
|
+
* enforce consistent ordering of Vue 3 script setup statements.
|
|
8814
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/sort-script-setup.md
|
|
8815
|
+
*/
|
|
8816
|
+
'vue-perfectionist/sort-script-setup'?: Linter.RuleEntry<VuePerfectionistSortScriptSetup>;
|
|
8686
8817
|
/**
|
|
8687
8818
|
* Enforce linebreaks after opening and before closing array brackets in `<template>`
|
|
8688
8819
|
* @see https://eslint.vuejs.org/rules/array-bracket-newline.html
|
|
@@ -11436,6 +11567,10 @@ type ConsistentReturn = [] | [{
|
|
|
11436
11567
|
type ConsistentThis = string[];
|
|
11437
11568
|
// ----- curly -----
|
|
11438
11569
|
type Curly = ([] | ["all"] | [] | [("multi" | "multi-line" | "multi-or-nest")] | [("multi" | "multi-line" | "multi-or-nest"), "consistent"]);
|
|
11570
|
+
// ----- de-morgan/no-negated-disjunction -----
|
|
11571
|
+
type DeMorganNoNegatedDisjunction = [] | [{
|
|
11572
|
+
enforceForMixedOperators?: boolean;
|
|
11573
|
+
}];
|
|
11439
11574
|
// ----- default-case -----
|
|
11440
11575
|
type DefaultCase = [] | [{
|
|
11441
11576
|
commentPattern?: string;
|
|
@@ -18422,6 +18557,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
18422
18557
|
})[];
|
|
18423
18558
|
multipleFileExtensions?: boolean;
|
|
18424
18559
|
checkDirectories?: boolean;
|
|
18560
|
+
directoryRoots?: (string | {
|
|
18561
|
+
[k: string]: unknown | undefined;
|
|
18562
|
+
})[];
|
|
18425
18563
|
} | {
|
|
18426
18564
|
cases?: {
|
|
18427
18565
|
camelCase?: boolean;
|
|
@@ -18435,6 +18573,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
18435
18573
|
})[];
|
|
18436
18574
|
multipleFileExtensions?: boolean;
|
|
18437
18575
|
checkDirectories?: boolean;
|
|
18576
|
+
directoryRoots?: (string | {
|
|
18577
|
+
[k: string]: unknown | undefined;
|
|
18578
|
+
})[];
|
|
18438
18579
|
})];
|
|
18439
18580
|
// ----- unicorn/id-match -----
|
|
18440
18581
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -18521,10 +18662,22 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
18521
18662
|
type UnicornNoArraySort = [] | [{
|
|
18522
18663
|
allowExpressionStatement?: boolean;
|
|
18523
18664
|
}];
|
|
18665
|
+
// ----- unicorn/no-break-in-nested-loop -----
|
|
18666
|
+
type UnicornNoBreakInNestedLoop = [] | [{
|
|
18667
|
+
checkContinue?: boolean;
|
|
18668
|
+
}];
|
|
18669
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
18670
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
18671
|
+
allow?: string[];
|
|
18672
|
+
}];
|
|
18524
18673
|
// ----- unicorn/no-empty-file -----
|
|
18525
18674
|
type UnicornNoEmptyFile = [] | [{
|
|
18526
18675
|
allowComments?: boolean;
|
|
18527
18676
|
}];
|
|
18677
|
+
// ----- unicorn/no-immediate-mutation -----
|
|
18678
|
+
type UnicornNoImmediateMutation = [] | [{
|
|
18679
|
+
checkConditionals?: boolean;
|
|
18680
|
+
}];
|
|
18528
18681
|
// ----- unicorn/no-instanceof-builtins -----
|
|
18529
18682
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
18530
18683
|
useErrorIsError?: boolean;
|
|
@@ -18565,6 +18718,10 @@ type UnicornNoNull = [] | [{
|
|
|
18565
18718
|
type UnicornNoTypeofUndefined = [] | [{
|
|
18566
18719
|
checkGlobalVariables?: boolean;
|
|
18567
18720
|
}];
|
|
18721
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
18722
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
18723
|
+
allow?: string[];
|
|
18724
|
+
}];
|
|
18568
18725
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
18569
18726
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
18570
18727
|
targets?: (string | string[] | {
|
|
@@ -18575,6 +18732,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
18575
18732
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
18576
18733
|
maximumIgnoredElements?: number;
|
|
18577
18734
|
}];
|
|
18735
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
18736
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
18737
|
+
scopingRootAtRules?: string[];
|
|
18738
|
+
}];
|
|
18578
18739
|
// ----- unicorn/no-useless-undefined -----
|
|
18579
18740
|
type UnicornNoUselessUndefined = [] | [{
|
|
18580
18741
|
checkArguments?: boolean;
|
|
@@ -18628,9 +18789,14 @@ type UnicornPreferAt = [] | [{
|
|
|
18628
18789
|
getLastElementFunctions?: string[];
|
|
18629
18790
|
checkAllIndexAccess?: boolean;
|
|
18630
18791
|
}];
|
|
18792
|
+
// ----- unicorn/prefer-combined-guards -----
|
|
18793
|
+
type UnicornPreferCombinedGuards = [] | [{
|
|
18794
|
+
checkCompoundConditions?: boolean;
|
|
18795
|
+
}];
|
|
18631
18796
|
// ----- unicorn/prefer-continue -----
|
|
18632
18797
|
type UnicornPreferContinue = [] | [{
|
|
18633
18798
|
maximumStatements?: number;
|
|
18799
|
+
checkShortBodies?: boolean;
|
|
18634
18800
|
}];
|
|
18635
18801
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
18636
18802
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -18640,6 +18806,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
18640
18806
|
// ----- unicorn/prefer-early-return -----
|
|
18641
18807
|
type UnicornPreferEarlyReturn = [] | [{
|
|
18642
18808
|
maximumStatements?: number;
|
|
18809
|
+
checkShortBodies?: boolean;
|
|
18643
18810
|
}];
|
|
18644
18811
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
18645
18812
|
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
@@ -18896,6 +19063,209 @@ type VitestValidTitle = [] | [{
|
|
|
18896
19063
|
[k: string]: (string | [string] | [string, string]) | undefined;
|
|
18897
19064
|
} | boolean | boolean | string[] | undefined);
|
|
18898
19065
|
}];
|
|
19066
|
+
// ----- vue-perfectionist/callback-style -----
|
|
19067
|
+
type VuePerfectionistCallbackStyle = [] | [{
|
|
19068
|
+
groups?: ("lifecycle" | "watch" | "cleanup" | "scheduler")[];
|
|
19069
|
+
functionStyle?: ("arrow" | "any");
|
|
19070
|
+
bodyStyle?: ("block" | "any");
|
|
19071
|
+
exclude?: string[];
|
|
19072
|
+
vueGlobals?: string[];
|
|
19073
|
+
vueImportSources?: string[];
|
|
19074
|
+
customCallbacks?: {
|
|
19075
|
+
source: string;
|
|
19076
|
+
name: string;
|
|
19077
|
+
callbackIndices: [number, ...(number)[]];
|
|
19078
|
+
}[];
|
|
19079
|
+
}];
|
|
19080
|
+
// ----- vue-perfectionist/define-macros-newline -----
|
|
19081
|
+
type VuePerfectionistDefineMacrosNewline = [] | [{
|
|
19082
|
+
macros?: ("defineProps" | "defineEmits" | "defineSlots" | "defineExpose" | "defineOptions")[];
|
|
19083
|
+
}];
|
|
19084
|
+
// ----- vue-perfectionist/prefer-ref-pattern -----
|
|
19085
|
+
type VuePerfectionistPreferRefPattern = [] | [{
|
|
19086
|
+
pattern?: string;
|
|
19087
|
+
targets?: ("template" | "useTemplateRef" | "render")[];
|
|
19088
|
+
}];
|
|
19089
|
+
// ----- vue-perfectionist/sort-script-setup -----
|
|
19090
|
+
type VuePerfectionistSortScriptSetup = [] | [{
|
|
19091
|
+
newlinesInside?: ((number | "ignore") | "newlinesBetween");
|
|
19092
|
+
fallbackSort?: {
|
|
19093
|
+
order?: ("asc" | "desc");
|
|
19094
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
19095
|
+
};
|
|
19096
|
+
order?: ("asc" | "desc");
|
|
19097
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
|
|
19098
|
+
newlinesBetween?: (number | "ignore");
|
|
19099
|
+
alphabet?: string;
|
|
19100
|
+
ignoreCase?: boolean;
|
|
19101
|
+
locales?: (string | [string, ...(string)[]]);
|
|
19102
|
+
partitionByComment?: ((boolean | ((string | {
|
|
19103
|
+
flags?: string;
|
|
19104
|
+
pattern: string;
|
|
19105
|
+
}) | [(string | {
|
|
19106
|
+
flags?: string;
|
|
19107
|
+
pattern: string;
|
|
19108
|
+
}), ...((string | {
|
|
19109
|
+
flags?: string;
|
|
19110
|
+
pattern: string;
|
|
19111
|
+
}))[]])) | {
|
|
19112
|
+
block?: (boolean | ((string | {
|
|
19113
|
+
flags?: string;
|
|
19114
|
+
pattern: string;
|
|
19115
|
+
}) | [(string | {
|
|
19116
|
+
flags?: string;
|
|
19117
|
+
pattern: string;
|
|
19118
|
+
}), ...((string | {
|
|
19119
|
+
flags?: string;
|
|
19120
|
+
pattern: string;
|
|
19121
|
+
}))[]]));
|
|
19122
|
+
line?: (boolean | ((string | {
|
|
19123
|
+
flags?: string;
|
|
19124
|
+
pattern: string;
|
|
19125
|
+
}) | [(string | {
|
|
19126
|
+
flags?: string;
|
|
19127
|
+
pattern: string;
|
|
19128
|
+
}), ...((string | {
|
|
19129
|
+
flags?: string;
|
|
19130
|
+
pattern: string;
|
|
19131
|
+
}))[]]));
|
|
19132
|
+
});
|
|
19133
|
+
partitionByNewLine?: boolean;
|
|
19134
|
+
specialCharacters?: ("keep" | "trim" | "remove");
|
|
19135
|
+
vueImportSources?: string[];
|
|
19136
|
+
customGroups?: ({
|
|
19137
|
+
groupName: string;
|
|
19138
|
+
newlinesInside?: (number | "ignore");
|
|
19139
|
+
fallbackSort?: {
|
|
19140
|
+
order?: ("asc" | "desc");
|
|
19141
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
19142
|
+
};
|
|
19143
|
+
order?: ("asc" | "desc");
|
|
19144
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
|
|
19145
|
+
callNamePattern?: ((string | {
|
|
19146
|
+
flags?: string;
|
|
19147
|
+
pattern: string;
|
|
19148
|
+
}) | [(string | {
|
|
19149
|
+
flags?: string;
|
|
19150
|
+
pattern: string;
|
|
19151
|
+
}), ...((string | {
|
|
19152
|
+
flags?: string;
|
|
19153
|
+
pattern: string;
|
|
19154
|
+
}))[]]);
|
|
19155
|
+
elementNamePattern?: ((string | {
|
|
19156
|
+
flags?: string;
|
|
19157
|
+
pattern: string;
|
|
19158
|
+
}) | [(string | {
|
|
19159
|
+
flags?: string;
|
|
19160
|
+
pattern: string;
|
|
19161
|
+
}), ...((string | {
|
|
19162
|
+
flags?: string;
|
|
19163
|
+
pattern: string;
|
|
19164
|
+
}))[]]);
|
|
19165
|
+
importSourcePattern?: ((string | {
|
|
19166
|
+
flags?: string;
|
|
19167
|
+
pattern: string;
|
|
19168
|
+
}) | [(string | {
|
|
19169
|
+
flags?: string;
|
|
19170
|
+
pattern: string;
|
|
19171
|
+
}), ...((string | {
|
|
19172
|
+
flags?: string;
|
|
19173
|
+
pattern: string;
|
|
19174
|
+
}))[]]);
|
|
19175
|
+
modifiers?: [("declare" | "async" | "destructured" | "const" | "let" | "var"), ...(("declare" | "async" | "destructured" | "const" | "let" | "var"))[]];
|
|
19176
|
+
selector?: ("interface" | "type" | "enum" | "class" | "define-options" | "define-props" | "define-emits" | "define-slots" | "define-model" | "define-expose" | "constant" | "inject" | "template-ref" | "ref" | "reactive" | "computed" | "composable" | "variable" | "function" | "watch" | "lifecycle-hook" | "provide" | "call");
|
|
19177
|
+
} | {
|
|
19178
|
+
groupName: string;
|
|
19179
|
+
newlinesInside?: (number | "ignore");
|
|
19180
|
+
fallbackSort?: {
|
|
19181
|
+
order?: ("asc" | "desc");
|
|
19182
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
19183
|
+
};
|
|
19184
|
+
order?: ("asc" | "desc");
|
|
19185
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
|
|
19186
|
+
anyOf: [{
|
|
19187
|
+
callNamePattern?: ((string | {
|
|
19188
|
+
flags?: string;
|
|
19189
|
+
pattern: string;
|
|
19190
|
+
}) | [(string | {
|
|
19191
|
+
flags?: string;
|
|
19192
|
+
pattern: string;
|
|
19193
|
+
}), ...((string | {
|
|
19194
|
+
flags?: string;
|
|
19195
|
+
pattern: string;
|
|
19196
|
+
}))[]]);
|
|
19197
|
+
elementNamePattern?: ((string | {
|
|
19198
|
+
flags?: string;
|
|
19199
|
+
pattern: string;
|
|
19200
|
+
}) | [(string | {
|
|
19201
|
+
flags?: string;
|
|
19202
|
+
pattern: string;
|
|
19203
|
+
}), ...((string | {
|
|
19204
|
+
flags?: string;
|
|
19205
|
+
pattern: string;
|
|
19206
|
+
}))[]]);
|
|
19207
|
+
importSourcePattern?: ((string | {
|
|
19208
|
+
flags?: string;
|
|
19209
|
+
pattern: string;
|
|
19210
|
+
}) | [(string | {
|
|
19211
|
+
flags?: string;
|
|
19212
|
+
pattern: string;
|
|
19213
|
+
}), ...((string | {
|
|
19214
|
+
flags?: string;
|
|
19215
|
+
pattern: string;
|
|
19216
|
+
}))[]]);
|
|
19217
|
+
modifiers?: [("declare" | "async" | "destructured" | "const" | "let" | "var"), ...(("declare" | "async" | "destructured" | "const" | "let" | "var"))[]];
|
|
19218
|
+
selector?: ("interface" | "type" | "enum" | "class" | "define-options" | "define-props" | "define-emits" | "define-slots" | "define-model" | "define-expose" | "constant" | "inject" | "template-ref" | "ref" | "reactive" | "computed" | "composable" | "variable" | "function" | "watch" | "lifecycle-hook" | "provide" | "call");
|
|
19219
|
+
}, ...({
|
|
19220
|
+
callNamePattern?: ((string | {
|
|
19221
|
+
flags?: string;
|
|
19222
|
+
pattern: string;
|
|
19223
|
+
}) | [(string | {
|
|
19224
|
+
flags?: string;
|
|
19225
|
+
pattern: string;
|
|
19226
|
+
}), ...((string | {
|
|
19227
|
+
flags?: string;
|
|
19228
|
+
pattern: string;
|
|
19229
|
+
}))[]]);
|
|
19230
|
+
elementNamePattern?: ((string | {
|
|
19231
|
+
flags?: string;
|
|
19232
|
+
pattern: string;
|
|
19233
|
+
}) | [(string | {
|
|
19234
|
+
flags?: string;
|
|
19235
|
+
pattern: string;
|
|
19236
|
+
}), ...((string | {
|
|
19237
|
+
flags?: string;
|
|
19238
|
+
pattern: string;
|
|
19239
|
+
}))[]]);
|
|
19240
|
+
importSourcePattern?: ((string | {
|
|
19241
|
+
flags?: string;
|
|
19242
|
+
pattern: string;
|
|
19243
|
+
}) | [(string | {
|
|
19244
|
+
flags?: string;
|
|
19245
|
+
pattern: string;
|
|
19246
|
+
}), ...((string | {
|
|
19247
|
+
flags?: string;
|
|
19248
|
+
pattern: string;
|
|
19249
|
+
}))[]]);
|
|
19250
|
+
modifiers?: [("declare" | "async" | "destructured" | "const" | "let" | "var"), ...(("declare" | "async" | "destructured" | "const" | "let" | "var"))[]];
|
|
19251
|
+
selector?: ("interface" | "type" | "enum" | "class" | "define-options" | "define-props" | "define-emits" | "define-slots" | "define-model" | "define-expose" | "constant" | "inject" | "template-ref" | "ref" | "reactive" | "computed" | "composable" | "variable" | "function" | "watch" | "lifecycle-hook" | "provide" | "call");
|
|
19252
|
+
})[]];
|
|
19253
|
+
})[];
|
|
19254
|
+
fix?: ("safe" | "none");
|
|
19255
|
+
groups?: ((string | [string, ...(string)[]]) | {
|
|
19256
|
+
group: (string | [string, ...(string)[]]);
|
|
19257
|
+
newlinesInside?: (number | "ignore");
|
|
19258
|
+
fallbackSort?: {
|
|
19259
|
+
order?: ("asc" | "desc");
|
|
19260
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
19261
|
+
};
|
|
19262
|
+
order?: ("asc" | "desc");
|
|
19263
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
|
|
19264
|
+
} | {
|
|
19265
|
+
newlinesBetween: (number | "ignore");
|
|
19266
|
+
})[];
|
|
19267
|
+
vueGlobals?: string[];
|
|
19268
|
+
}];
|
|
18899
19269
|
// ----- vue/array-bracket-newline -----
|
|
18900
19270
|
type VueArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
18901
19271
|
multiline?: boolean;
|
|
@@ -20338,7 +20708,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
20338
20708
|
onlyEquality?: boolean;
|
|
20339
20709
|
}];
|
|
20340
20710
|
// Names of all the configs
|
|
20341
|
-
type ConfigNames = 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/jsx' | 'ntnyq/node' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/javascript/recommended' | 'ntnyq/javascript/core' | 'ntnyq/import-x' | 'ntnyq/jsdoc/base' | 'ntnyq/jsdoc/javascript' | 'ntnyq/jsdoc/typescript' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/unicorn' | 'ntnyq/pinia' | 'ntnyq/de-morgan' | 'ntnyq/regexp' | 'ntnyq/typescript/setup' | 'ntnyq/typescript/parser' | 'ntnyq/typescript/parser-type-aware' | 'ntnyq/typescript/rules' | 'ntnyq/typescript/rules/type-aware' | 'ntnyq/typescript/types' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yml' | 'ntnyq/toml' | 'ntnyq/jsonc' | 'ntnyq/astro' | 'ntnyq/svelte' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/json-schema' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/unocss' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/code-blocks' | 'ntnyq/antfu' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/ntnyq' | 'ntnyq/github-action' | 'ntnyq/eslint-plugin' | 'ntnyq/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | 'ntnyq/svgo' | 'ntnyq/html' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/specials/shadcn-vue' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/oxfmt/native-files' | 'ntnyq/oxfmt/plain-parser-files';
|
|
20711
|
+
type ConfigNames = 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/jsx' | 'ntnyq/node' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/javascript/recommended' | 'ntnyq/javascript/core' | 'ntnyq/import-x' | 'ntnyq/jsdoc/base' | 'ntnyq/jsdoc/javascript' | 'ntnyq/jsdoc/typescript' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/unicorn' | 'ntnyq/pinia' | 'ntnyq/de-morgan' | 'ntnyq/regexp' | 'ntnyq/typescript/setup' | 'ntnyq/typescript/parser' | 'ntnyq/typescript/parser-type-aware' | 'ntnyq/typescript/rules' | 'ntnyq/typescript/rules/type-aware' | 'ntnyq/typescript/types' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/vue/vue-perfectionist' | 'ntnyq/yml' | 'ntnyq/toml' | 'ntnyq/jsonc' | 'ntnyq/astro' | 'ntnyq/svelte' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/json-schema' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/unocss' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/code-blocks' | 'ntnyq/antfu' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/ntnyq' | 'ntnyq/github-action' | 'ntnyq/eslint-plugin' | 'ntnyq/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | 'ntnyq/svgo' | 'ntnyq/html' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/specials/shadcn-vue' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/oxfmt/native-files' | 'ntnyq/oxfmt/plain-parser-files';
|
|
20342
20712
|
//#endregion
|
|
20343
20713
|
//#region src/types/eslint.d.ts
|
|
20344
20714
|
/**
|
|
@@ -20520,6 +20890,9 @@ export declare const GLOB_TSX: string;
|
|
|
20520
20890
|
export declare const GLOB_TSX_ONLY: string;
|
|
20521
20891
|
export declare const GLOB_DTS: string;
|
|
20522
20892
|
export declare const GLOB_TYPES: string[];
|
|
20893
|
+
export declare const GLOB_VUE: string;
|
|
20894
|
+
export declare const GLOB_PINIA_STORE: string;
|
|
20895
|
+
export declare const GLOB_VUE_COMPOSABLES: string[];
|
|
20523
20896
|
export declare const GLOB_TYPE_TEST: string[];
|
|
20524
20897
|
export declare const GLOB_TEST: string[];
|
|
20525
20898
|
export declare const GLOB_STYLE: string;
|
|
@@ -20535,8 +20908,8 @@ export declare const GLOB_JSON_SCHEMA: string[];
|
|
|
20535
20908
|
export declare const GLOB_TSCONFIG_JSON: string[];
|
|
20536
20909
|
export declare const GLOB_YAML: string;
|
|
20537
20910
|
export declare const GLOB_PNPM_WORKSPACE_YAML: string;
|
|
20911
|
+
export declare const GLOB_GITHUB_ACTION: string;
|
|
20538
20912
|
export declare const GLOB_SVG: string;
|
|
20539
|
-
export declare const GLOB_VUE: string;
|
|
20540
20913
|
export declare const GLOB_SVELTE: string;
|
|
20541
20914
|
export declare const GLOB_TOML: string;
|
|
20542
20915
|
export declare const GLOB_HTML: string;
|
|
@@ -20547,8 +20920,6 @@ export declare const GLOB_MARKDOWN_CODE: string;
|
|
|
20547
20920
|
export declare const GLOB_MARKDOWN_NESTED: string;
|
|
20548
20921
|
export declare const GLOB_SRC_EXTENSIONS: string[];
|
|
20549
20922
|
export declare const GLOB_ALL_SRC: string[];
|
|
20550
|
-
export declare const GLOB_PINIA_STORE: string;
|
|
20551
|
-
export declare const GLOB_GITHUB_ACTION: string;
|
|
20552
20923
|
export declare const GLOB_NODE_MODULES: string;
|
|
20553
20924
|
export declare const GLOB_DIST: string;
|
|
20554
20925
|
export declare const GLOB_LOCKFILE: string[];
|
|
@@ -20673,4 +21044,4 @@ export declare const PERFECTIONIST: Readonly<{
|
|
|
20673
21044
|
sortObjectsGroups: string[];
|
|
20674
21045
|
}>;
|
|
20675
21046
|
//#endregion
|
|
20676
|
-
export { type ConfigNames, type RuleOptions, configsTypeScript, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginDeMorgan, pluginDepend, pluginESLintComments, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginOxfmt, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginYml, processorPassThrough, processorVueBlocks };
|
|
21047
|
+
export { type ConfigNames, type RuleOptions, configsTypeScript, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginDeMorgan, pluginDepend, pluginESLintComments, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginOxfmt, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginVuePerfectionist, pluginYml, processorPassThrough, processorVueBlocks };
|