@hexadrop/eslint-config 1.0.0 → 1.0.1
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 +377 -310
- package/dist/index.mjs +3 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -270,6 +270,11 @@ interface RuleOptions {
|
|
|
270
270
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
271
271
|
*/
|
|
272
272
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
273
|
+
/**
|
|
274
|
+
* disallow omitted end tags
|
|
275
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
276
|
+
*/
|
|
277
|
+
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
273
278
|
/**
|
|
274
279
|
* disallow `prerender` export outside of pages/ directory
|
|
275
280
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
@@ -4555,1560 +4560,1620 @@ interface RuleOptions {
|
|
|
4555
4560
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
4556
4561
|
/**
|
|
4557
4562
|
* Prefer better DOM traversal APIs.
|
|
4558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/better-dom-traversing.md
|
|
4559
4564
|
*/
|
|
4560
4565
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
4561
4566
|
/**
|
|
4562
4567
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
4563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
4564
4569
|
* @deprecated
|
|
4565
4570
|
*/
|
|
4566
4571
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
4567
4572
|
/**
|
|
4568
4573
|
* Enforce a specific parameter name in catch clauses.
|
|
4569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/catch-error-name.md
|
|
4570
4575
|
*/
|
|
4571
4576
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4572
4577
|
/**
|
|
4573
4578
|
* Enforce consistent class references in static methods.
|
|
4574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/class-reference-in-static-methods.md
|
|
4575
4580
|
*/
|
|
4576
4581
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
4577
4582
|
/**
|
|
4578
4583
|
* Enforce better comment content.
|
|
4579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/comment-content.md
|
|
4580
4585
|
*/
|
|
4581
4586
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
4582
4587
|
/**
|
|
4583
4588
|
* Enforce consistent assertion style with `node:assert`.
|
|
4584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-assert.md
|
|
4585
4590
|
*/
|
|
4586
4591
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4587
4592
|
/**
|
|
4588
4593
|
* Enforce consistent naming for boolean names.
|
|
4589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-boolean-name.md
|
|
4590
4595
|
*/
|
|
4591
4596
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
4592
4597
|
/**
|
|
4593
4598
|
* Enforce consistent class member order.
|
|
4594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-class-member-order.md
|
|
4595
4600
|
*/
|
|
4596
4601
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
4597
4602
|
/**
|
|
4598
4603
|
* Enforce consistent spelling of compound words in identifiers.
|
|
4599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-compound-words.md
|
|
4600
4605
|
*/
|
|
4601
4606
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
4602
4607
|
/**
|
|
4603
4608
|
* Enforce consistent conditional object spread style.
|
|
4604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
4605
4610
|
*/
|
|
4606
4611
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
4607
4612
|
/**
|
|
4608
4613
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-date-clone.md
|
|
4610
4615
|
*/
|
|
4611
4616
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4612
4617
|
/**
|
|
4613
4618
|
* Use destructured variables over properties.
|
|
4614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-destructuring.md
|
|
4615
4620
|
*/
|
|
4616
4621
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4617
4622
|
/**
|
|
4618
4623
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4620
4625
|
*/
|
|
4621
4626
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4622
4627
|
/**
|
|
4623
4628
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-existence-index-check.md
|
|
4625
4630
|
*/
|
|
4626
4631
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4627
4632
|
/**
|
|
4628
4633
|
* Enforce consistent decorator position on exported classes.
|
|
4629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-export-decorator-position.md
|
|
4630
4635
|
*/
|
|
4631
4636
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
4632
4637
|
/**
|
|
4633
4638
|
* Move function definitions to the highest possible scope.
|
|
4634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-scoping.md
|
|
4635
4640
|
*/
|
|
4636
4641
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4637
4642
|
/**
|
|
4638
4643
|
* Enforce function syntax by role.
|
|
4639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-style.md
|
|
4640
4645
|
*/
|
|
4641
4646
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
4642
4647
|
/**
|
|
4643
4648
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
4644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-json-file-read.md
|
|
4645
4650
|
*/
|
|
4646
4651
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
4647
4652
|
/**
|
|
4648
4653
|
* Enforce consistent optional chaining for same-base member access.
|
|
4649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-optional-chaining.md
|
|
4650
4655
|
*/
|
|
4651
4656
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
4652
4657
|
/**
|
|
4653
4658
|
* Enforce consistent style for escaping `${` in template literals.
|
|
4654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-template-literal-escape.md
|
|
4655
4660
|
*/
|
|
4656
4661
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
4662
|
+
/**
|
|
4663
|
+
* Enforce consistent labels on tuple type elements.
|
|
4664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-tuple-labels.md
|
|
4665
|
+
*/
|
|
4666
|
+
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
4657
4667
|
/**
|
|
4658
4668
|
* Enforce correct `Error` subclassing.
|
|
4659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/custom-error-definition.md
|
|
4660
4670
|
*/
|
|
4661
4671
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4662
4672
|
/**
|
|
4663
4673
|
* Enforce consistent default export declarations.
|
|
4664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/default-export-style.md
|
|
4665
4675
|
*/
|
|
4666
4676
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
4667
4677
|
/**
|
|
4668
4678
|
* Enforce consistent style for DOM element dataset access.
|
|
4669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/dom-node-dataset.md
|
|
4670
4680
|
*/
|
|
4671
4681
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
4672
4682
|
/**
|
|
4673
4683
|
* Enforce no spaces between braces.
|
|
4674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/empty-brace-spaces.md
|
|
4675
4685
|
*/
|
|
4676
4686
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4677
4687
|
/**
|
|
4678
4688
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/error-message.md
|
|
4680
4690
|
*/
|
|
4681
4691
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4682
4692
|
/**
|
|
4683
4693
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/escape-case.md
|
|
4685
4695
|
*/
|
|
4686
4696
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4687
4697
|
/**
|
|
4688
4698
|
* Add expiration conditions to TODO comments.
|
|
4689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/expiring-todo-comments.md
|
|
4690
4700
|
*/
|
|
4691
4701
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4692
4702
|
/**
|
|
4693
4703
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-length-check.md
|
|
4695
4705
|
*/
|
|
4696
4706
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4697
4707
|
/**
|
|
4698
4708
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
4699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-timer-delay.md
|
|
4700
4710
|
*/
|
|
4701
4711
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
4702
4712
|
/**
|
|
4703
4713
|
* Enforce a case style for filenames and directory names.
|
|
4704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/filename-case.md
|
|
4705
4715
|
*/
|
|
4706
4716
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4707
4717
|
/**
|
|
4708
4718
|
* Require identifiers to match a specified regular expression.
|
|
4709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/id-match.md
|
|
4710
4720
|
*/
|
|
4711
4721
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
4712
4722
|
/**
|
|
4713
4723
|
* Enforce specific import styles per module.
|
|
4714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/import-style.md
|
|
4715
4725
|
*/
|
|
4716
4726
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4717
4727
|
/**
|
|
4718
4728
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
4719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/isolated-functions.md
|
|
4720
4730
|
*/
|
|
4721
4731
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
4722
4732
|
/**
|
|
4723
4733
|
* Require or disallow logical assignment operator shorthand
|
|
4724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/logical-assignment-operators.md
|
|
4725
4735
|
*/
|
|
4726
4736
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
4727
4737
|
/**
|
|
4728
4738
|
* Limit the depth of nested calls.
|
|
4729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/max-nested-calls.md
|
|
4730
4740
|
*/
|
|
4731
4741
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
4732
4742
|
/**
|
|
4733
4743
|
* Enforce replacements for variable, property, and filenames.
|
|
4734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/name-replacements.md
|
|
4735
4745
|
*/
|
|
4736
4746
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
4737
4747
|
/**
|
|
4738
4748
|
* Enforce correct use of `new` for builtin constructors.
|
|
4739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/new-for-builtins.md
|
|
4740
4750
|
*/
|
|
4741
4751
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4742
4752
|
/**
|
|
4743
4753
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4745
4755
|
*/
|
|
4746
4756
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4747
4757
|
/**
|
|
4748
4758
|
* Disallow recursive access to `this` within getters and setters.
|
|
4749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accessor-recursion.md
|
|
4750
4760
|
*/
|
|
4751
4761
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
4752
4762
|
/**
|
|
4753
4763
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
4754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
4755
4765
|
*/
|
|
4756
4766
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
4757
4767
|
/**
|
|
4758
4768
|
* Disallow anonymous functions and classes as the default export.
|
|
4759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-anonymous-default-export.md
|
|
4760
4770
|
*/
|
|
4761
4771
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
4762
4772
|
/**
|
|
4763
4773
|
* Prevent passing a function reference directly to iterator methods.
|
|
4764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-callback-reference.md
|
|
4765
4775
|
*/
|
|
4766
4776
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
4767
4777
|
/**
|
|
4768
4778
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
4769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-concat-in-loop.md
|
|
4770
4780
|
*/
|
|
4771
4781
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
4772
4782
|
/**
|
|
4773
4783
|
* Disallow using reference values as `Array#fill()` values.
|
|
4774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
4775
4785
|
*/
|
|
4776
4786
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
4777
4787
|
/**
|
|
4778
4788
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
4779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-from-fill.md
|
|
4780
4790
|
*/
|
|
4781
4791
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
4782
4792
|
/**
|
|
4783
4793
|
* Disallow front-of-array mutation.
|
|
4784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-front-mutation.md
|
|
4785
4795
|
*/
|
|
4786
4796
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
4787
4797
|
/**
|
|
4788
4798
|
* Disallow using the `this` argument in array methods.
|
|
4789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-method-this-argument.md
|
|
4790
4800
|
*/
|
|
4791
4801
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
4792
4802
|
/**
|
|
4793
4803
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
4795
4805
|
* @deprecated
|
|
4796
4806
|
*/
|
|
4797
4807
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
4798
4808
|
/**
|
|
4799
4809
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reduce.md
|
|
4801
4811
|
*/
|
|
4802
4812
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4803
4813
|
/**
|
|
4804
4814
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reverse.md
|
|
4806
4816
|
*/
|
|
4807
4817
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4808
4818
|
/**
|
|
4809
4819
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
4810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort.md
|
|
4811
4821
|
*/
|
|
4812
4822
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
4813
4823
|
/**
|
|
4814
4824
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
4815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
4816
4826
|
*/
|
|
4817
4827
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
4818
4828
|
/**
|
|
4819
4829
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
4820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-splice.md
|
|
4821
4831
|
*/
|
|
4822
4832
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
4823
4833
|
/**
|
|
4824
4834
|
* Disallow asterisk prefixes in documentation comments.
|
|
4825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
4826
4836
|
*/
|
|
4827
4837
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
4828
4838
|
/**
|
|
4829
4839
|
* Disallow member access from await expression.
|
|
4830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-expression-member.md
|
|
4831
4841
|
*/
|
|
4832
4842
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
4833
4843
|
/**
|
|
4834
4844
|
* Disallow using `await` in `Promise` method parameters.
|
|
4835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4836
4846
|
*/
|
|
4837
4847
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4838
4848
|
/**
|
|
4839
4849
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
4840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-blob-to-file.md
|
|
4841
4851
|
*/
|
|
4842
4852
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
4843
4853
|
/**
|
|
4844
4854
|
* Disallow boolean-returning sort comparators.
|
|
4845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
4846
4856
|
*/
|
|
4847
4857
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
4848
4858
|
/**
|
|
4849
4859
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
4850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-break-in-nested-loop.md
|
|
4851
4861
|
*/
|
|
4852
4862
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
4853
4863
|
/**
|
|
4854
4864
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
4855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-canvas-to-image.md
|
|
4856
4866
|
*/
|
|
4857
4867
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
4858
4868
|
/**
|
|
4859
4869
|
* Disallow chained comparisons such as `a < b < c`.
|
|
4860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-chained-comparison.md
|
|
4861
4871
|
*/
|
|
4862
4872
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
4863
4873
|
/**
|
|
4864
4874
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
4865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-collection-bracket-access.md
|
|
4866
4876
|
*/
|
|
4867
4877
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
4868
4878
|
/**
|
|
4869
4879
|
* Disallow dynamic object property existence checks.
|
|
4870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-computed-property-existence-check.md
|
|
4871
4881
|
*/
|
|
4872
4882
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
4873
4883
|
/**
|
|
4874
4884
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
4875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-splice.md
|
|
4876
4886
|
*/
|
|
4877
4887
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
4878
4888
|
/**
|
|
4879
4889
|
* Disallow confusing uses of `Array#with()`.
|
|
4880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-with.md
|
|
4881
4891
|
*/
|
|
4882
4892
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
4883
4893
|
/**
|
|
4884
4894
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-console-spaces.md
|
|
4886
4896
|
*/
|
|
4887
4897
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
4888
4898
|
/**
|
|
4889
4899
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
4890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-constant-zero-expression.md
|
|
4891
4901
|
*/
|
|
4892
4902
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
4893
4903
|
/**
|
|
4894
4904
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
4895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
4896
4906
|
*/
|
|
4897
4907
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
4898
4908
|
/**
|
|
4899
4909
|
* Do not use `document.cookie` directly.
|
|
4900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-document-cookie.md
|
|
4901
4911
|
*/
|
|
4902
4912
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
4903
4913
|
/**
|
|
4904
4914
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
4905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-double-comparison.md
|
|
4906
4916
|
*/
|
|
4907
4917
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
4908
4918
|
/**
|
|
4909
4919
|
* Disallow duplicate adjacent branches in if chains.
|
|
4910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-if-branches.md
|
|
4911
4921
|
*/
|
|
4912
4922
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
4913
4923
|
/**
|
|
4914
4924
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
4915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
4916
4926
|
*/
|
|
4917
4927
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
4918
4928
|
/**
|
|
4919
4929
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
4920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-loops.md
|
|
4921
4931
|
*/
|
|
4922
4932
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
4923
4933
|
/**
|
|
4924
4934
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
4925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-set-values.md
|
|
4926
4936
|
*/
|
|
4927
4937
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
4928
4938
|
/**
|
|
4929
4939
|
* Disallow empty files.
|
|
4930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-empty-file.md
|
|
4931
4941
|
*/
|
|
4932
4942
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
4933
4943
|
/**
|
|
4934
4944
|
* Disallow assigning to built-in error properties.
|
|
4935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-error-property-assignment.md
|
|
4936
4946
|
*/
|
|
4937
4947
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
4938
4948
|
/**
|
|
4939
4949
|
* Disallow exports in scripts.
|
|
4940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-exports-in-scripts.md
|
|
4941
4951
|
*/
|
|
4942
4952
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
4943
4953
|
/**
|
|
4944
4954
|
* Prefer `for…of` over the `forEach` method.
|
|
4945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-each.md
|
|
4946
4956
|
*/
|
|
4947
4957
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
4948
4958
|
/**
|
|
4949
4959
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-loop.md
|
|
4951
4961
|
*/
|
|
4952
4962
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
4953
4963
|
/**
|
|
4954
4964
|
* Disallow assigning properties on the global object.
|
|
4955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-global-object-property-assignment.md
|
|
4956
4966
|
*/
|
|
4957
4967
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
4958
4968
|
/**
|
|
4959
4969
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
4960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
4961
4971
|
* @deprecated
|
|
4962
4972
|
*/
|
|
4963
4973
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
4964
4974
|
/**
|
|
4965
4975
|
* Disallow immediate mutation after variable assignment.
|
|
4966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-immediate-mutation.md
|
|
4967
4977
|
*/
|
|
4968
4978
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
4969
4979
|
/**
|
|
4970
4980
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
4971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-impossible-length-comparison.md
|
|
4972
4982
|
*/
|
|
4973
4983
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
4974
4984
|
/**
|
|
4975
4985
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
4976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-query-selector.md
|
|
4977
4987
|
*/
|
|
4978
4988
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
4979
4989
|
/**
|
|
4980
4990
|
* Disallow incorrect template literal interpolation syntax.
|
|
4981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
4982
4992
|
*/
|
|
4983
4993
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
4984
4994
|
/**
|
|
4985
4995
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
4987
4997
|
* @deprecated
|
|
4988
4998
|
*/
|
|
4989
4999
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
4990
5000
|
/**
|
|
4991
5001
|
* Disallow `instanceof` with built-in objects
|
|
4992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-instanceof-builtins.md
|
|
4993
5003
|
*/
|
|
4994
5004
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4995
5005
|
/**
|
|
4996
5006
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
4997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-argument-count.md
|
|
4998
5008
|
*/
|
|
4999
5009
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
5000
5010
|
/**
|
|
5001
5011
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
5002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-character-comparison.md
|
|
5003
5013
|
*/
|
|
5004
5014
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
5005
5015
|
/**
|
|
5006
5016
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5008
5018
|
*/
|
|
5009
5019
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5010
5020
|
/**
|
|
5011
5021
|
* Disallow invalid `accept` values on file inputs.
|
|
5012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
5013
5023
|
*/
|
|
5014
5024
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5015
5025
|
/**
|
|
5016
5026
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5018
5028
|
*/
|
|
5019
5029
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5030
|
+
/**
|
|
5031
|
+
* Disallow invalid implementations of well-known symbol methods.
|
|
5032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
5033
|
+
*/
|
|
5034
|
+
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
5020
5035
|
/**
|
|
5021
5036
|
* Disallow identifiers starting with `new` or `class`.
|
|
5022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-keyword-prefix.md
|
|
5023
5038
|
*/
|
|
5024
5039
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5025
5040
|
/**
|
|
5026
5041
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-current-target-access.md
|
|
5028
5043
|
*/
|
|
5029
5044
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5045
|
+
/**
|
|
5046
|
+
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
5047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-event-control.md
|
|
5048
|
+
*/
|
|
5049
|
+
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
5030
5050
|
/**
|
|
5031
5051
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5033
5053
|
* @deprecated
|
|
5034
5054
|
*/
|
|
5035
5055
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5036
5056
|
/**
|
|
5037
5057
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-lonely-if.md
|
|
5039
5059
|
*/
|
|
5040
5060
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5041
5061
|
/**
|
|
5042
5062
|
* Disallow mutating a loop iterable during iteration.
|
|
5043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
5044
5064
|
*/
|
|
5045
5065
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
5046
5066
|
/**
|
|
5047
5067
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5049
5069
|
*/
|
|
5050
5070
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5051
5071
|
/**
|
|
5052
5072
|
* Disallow manually wrapped comments.
|
|
5053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
5054
5074
|
*/
|
|
5055
5075
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
5056
5076
|
/**
|
|
5057
5077
|
* Disallow checking a Map key before accessing a different key.
|
|
5058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-mismatched-map-key.md
|
|
5059
5079
|
*/
|
|
5060
5080
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
5061
5081
|
/**
|
|
5062
5082
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
5063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-misrefactored-assignment.md
|
|
5064
5084
|
*/
|
|
5065
5085
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
5066
5086
|
/**
|
|
5067
5087
|
* Disallow named usage of default import and export.
|
|
5068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-named-default.md
|
|
5069
5089
|
*/
|
|
5070
5090
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5071
5091
|
/**
|
|
5072
5092
|
* Disallow negated array predicate calls.
|
|
5073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-array-predicate.md
|
|
5074
5094
|
*/
|
|
5075
5095
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5076
5096
|
/**
|
|
5077
5097
|
* Disallow negated comparisons.
|
|
5078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-comparison.md
|
|
5079
5099
|
*/
|
|
5080
5100
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
5081
5101
|
/**
|
|
5082
5102
|
* Disallow negated conditions.
|
|
5083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-condition.md
|
|
5084
5104
|
*/
|
|
5085
5105
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5086
5106
|
/**
|
|
5087
5107
|
* Disallow negated expression in equality check.
|
|
5088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5089
5109
|
*/
|
|
5090
5110
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5091
5111
|
/**
|
|
5092
5112
|
* Disallow nested ternary expressions.
|
|
5093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nested-ternary.md
|
|
5094
5114
|
*/
|
|
5095
5115
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5096
5116
|
/**
|
|
5097
5117
|
* Disallow `new Array()`.
|
|
5098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-array.md
|
|
5099
5119
|
*/
|
|
5100
5120
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5101
5121
|
/**
|
|
5102
5122
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-buffer.md
|
|
5104
5124
|
*/
|
|
5105
5125
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5106
5126
|
/**
|
|
5107
5127
|
* Disallow non-function values with function-style verb prefixes.
|
|
5108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
5109
5129
|
*/
|
|
5110
5130
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
5111
5131
|
/**
|
|
5112
5132
|
* Disallow non-standard properties on built-in objects.
|
|
5113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
5114
5134
|
*/
|
|
5115
5135
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
5116
5136
|
/**
|
|
5117
5137
|
* Disallow the use of the `null` literal.
|
|
5118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-null.md
|
|
5119
5139
|
*/
|
|
5120
5140
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5121
5141
|
/**
|
|
5122
5142
|
* Disallow the use of objects as default parameters.
|
|
5123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5124
5144
|
*/
|
|
5125
5145
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5126
5146
|
/**
|
|
5127
5147
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
5128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-methods-with-collections.md
|
|
5129
5149
|
*/
|
|
5130
5150
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
5131
5151
|
/**
|
|
5132
5152
|
* Disallow optional chaining on undeclared variables.
|
|
5133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
5134
5154
|
*/
|
|
5135
5155
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
5136
5156
|
/**
|
|
5137
5157
|
* Disallow `process.exit()`.
|
|
5138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-process-exit.md
|
|
5139
5159
|
*/
|
|
5140
5160
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5141
5161
|
/**
|
|
5142
5162
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
5143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-redundant-comparison.md
|
|
5144
5164
|
*/
|
|
5145
5165
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
5146
5166
|
/**
|
|
5147
5167
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
5148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-return-array-push.md
|
|
5149
5169
|
*/
|
|
5150
5170
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
5151
5171
|
/**
|
|
5152
5172
|
* Disallow selector syntax in DOM names.
|
|
5153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-selector-as-dom-name.md
|
|
5154
5174
|
*/
|
|
5155
5175
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
5156
5176
|
/**
|
|
5157
5177
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5159
5179
|
*/
|
|
5160
5180
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5161
5181
|
/**
|
|
5162
5182
|
* Disallow classes that only have static members.
|
|
5163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-static-only-class.md
|
|
5164
5184
|
*/
|
|
5165
5185
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5166
5186
|
/**
|
|
5167
5187
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
5168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-subtraction-comparison.md
|
|
5169
5189
|
*/
|
|
5170
5190
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
5171
5191
|
/**
|
|
5172
5192
|
* Disallow `then` property.
|
|
5173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-thenable.md
|
|
5174
5194
|
*/
|
|
5175
5195
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5176
5196
|
/**
|
|
5177
5197
|
* Disallow assigning `this` to a variable.
|
|
5178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-assignment.md
|
|
5179
5199
|
*/
|
|
5180
5200
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5181
5201
|
/**
|
|
5182
5202
|
* Disallow `this` outside of classes.
|
|
5183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-outside-of-class.md
|
|
5184
5204
|
*/
|
|
5185
5205
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
5186
5206
|
/**
|
|
5187
5207
|
* Disallow assigning to top-level variables from inside functions.
|
|
5188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
5189
5209
|
*/
|
|
5190
5210
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
5191
5211
|
/**
|
|
5192
5212
|
* Disallow top-level side effects in exported modules.
|
|
5193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-side-effects.md
|
|
5194
5214
|
*/
|
|
5195
5215
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
5196
5216
|
/**
|
|
5197
5217
|
* Disallow comparing `undefined` using `typeof`.
|
|
5198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-typeof-undefined.md
|
|
5199
5219
|
*/
|
|
5200
5220
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5201
5221
|
/**
|
|
5202
5222
|
* Disallow referencing methods without calling them.
|
|
5203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-uncalled-method.md
|
|
5204
5224
|
*/
|
|
5205
5225
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
5206
5226
|
/**
|
|
5207
5227
|
* Require class members to be declared.
|
|
5208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-undeclared-class-members.md
|
|
5209
5229
|
*/
|
|
5210
5230
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
5211
5231
|
/**
|
|
5212
5232
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5214
5234
|
*/
|
|
5215
5235
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5216
5236
|
/**
|
|
5217
5237
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5219
5239
|
*/
|
|
5220
5240
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5221
5241
|
/**
|
|
5222
5242
|
* Disallow awaiting non-promise values.
|
|
5223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-await.md
|
|
5224
5244
|
*/
|
|
5225
5245
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5226
5246
|
/**
|
|
5227
5247
|
* Disallow unnecessary comparisons against boolean literals.
|
|
5228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
5229
5249
|
*/
|
|
5230
5250
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
5231
5251
|
/**
|
|
5232
5252
|
* Disallow unnecessary `globalThis` references.
|
|
5233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-global-this.md
|
|
5234
5254
|
*/
|
|
5235
5255
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
5236
5256
|
/**
|
|
5237
5257
|
* Disallow unnecessary nested ternary expressions.
|
|
5238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
5239
5259
|
*/
|
|
5240
5260
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5241
5261
|
/**
|
|
5242
5262
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5244
5264
|
*/
|
|
5245
5265
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5246
5266
|
/**
|
|
5247
5267
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5249
5269
|
*/
|
|
5250
5270
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5251
5271
|
/**
|
|
5252
5272
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
5253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-splice.md
|
|
5254
5274
|
*/
|
|
5255
5275
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
5256
5276
|
/**
|
|
5257
5277
|
* Disallow unreadable array destructuring.
|
|
5258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5259
5279
|
*/
|
|
5260
5280
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
5261
5281
|
/**
|
|
5262
5282
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
5263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
5264
5284
|
*/
|
|
5265
5285
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
5266
5286
|
/**
|
|
5267
5287
|
* Disallow unreadable IIFEs.
|
|
5268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-iife.md
|
|
5269
5289
|
*/
|
|
5270
5290
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5271
5291
|
/**
|
|
5272
5292
|
* Disallow unreadable `new` expressions.
|
|
5273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-new-expression.md
|
|
5274
5294
|
*/
|
|
5275
5295
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
5276
5296
|
/**
|
|
5277
5297
|
* Disallow unreadable object destructuring.
|
|
5278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
5279
5299
|
*/
|
|
5280
5300
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5281
5301
|
/**
|
|
5282
5302
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
5283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
5284
5304
|
*/
|
|
5285
5305
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
5286
5306
|
/**
|
|
5287
5307
|
* Disallow unsafe DOM HTML APIs.
|
|
5288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-dom-html.md
|
|
5289
5309
|
*/
|
|
5290
5310
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
5291
5311
|
/**
|
|
5292
5312
|
* Disallow unsafe values as property keys.
|
|
5293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-property-key.md
|
|
5294
5314
|
*/
|
|
5295
5315
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
5296
5316
|
/**
|
|
5297
5317
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
5298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
5299
5319
|
*/
|
|
5300
5320
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
5301
5321
|
/**
|
|
5302
5322
|
* Disallow ignoring the return value of selected array methods.
|
|
5303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-array-method-return.md
|
|
5304
5324
|
*/
|
|
5305
5325
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5306
5326
|
/**
|
|
5307
5327
|
* Disallow unused object properties.
|
|
5308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-properties.md
|
|
5309
5329
|
*/
|
|
5310
5330
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5311
5331
|
/**
|
|
5312
5332
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
5313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-boolean-cast.md
|
|
5314
5334
|
*/
|
|
5315
5335
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
5316
5336
|
/**
|
|
5317
5337
|
* Disallow useless type coercions of values that are already of the target type.
|
|
5318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-coercion.md
|
|
5319
5339
|
*/
|
|
5320
5340
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
5321
5341
|
/**
|
|
5322
5342
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-collection-argument.md
|
|
5324
5344
|
*/
|
|
5325
5345
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5326
5346
|
/**
|
|
5327
5347
|
* Disallow useless compound assignments such as `x += 0`.
|
|
5328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-compound-assignment.md
|
|
5329
5349
|
*/
|
|
5330
5350
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
5331
5351
|
/**
|
|
5332
5352
|
* Disallow useless concatenation of literals.
|
|
5333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-concat.md
|
|
5334
5354
|
*/
|
|
5335
5355
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
5336
5356
|
/**
|
|
5337
5357
|
* Disallow useless `continue` statements.
|
|
5338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-continue.md
|
|
5339
5359
|
*/
|
|
5340
5360
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
5341
5361
|
/**
|
|
5342
5362
|
* Disallow unnecessary existence checks before deletion.
|
|
5343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-delete-check.md
|
|
5344
5364
|
*/
|
|
5345
5365
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
5346
5366
|
/**
|
|
5347
5367
|
* Disallow `else` after a statement that exits.
|
|
5348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-else.md
|
|
5349
5369
|
*/
|
|
5350
5370
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
5351
5371
|
/**
|
|
5352
5372
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5354
5374
|
*/
|
|
5355
5375
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5356
5376
|
/**
|
|
5357
5377
|
* Disallow useless fallback when spreading in object literals.
|
|
5358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5359
5379
|
*/
|
|
5360
5380
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5361
5381
|
/**
|
|
5362
5382
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5364
5384
|
*/
|
|
5365
5385
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5366
5386
|
/**
|
|
5367
5387
|
* Disallow useless array length check.
|
|
5368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-length-check.md
|
|
5369
5389
|
*/
|
|
5370
5390
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5371
5391
|
/**
|
|
5372
5392
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
5373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-logical-operand.md
|
|
5374
5394
|
*/
|
|
5375
5395
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
5376
5396
|
/**
|
|
5377
5397
|
* Disallow useless overrides of class methods.
|
|
5378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-override.md
|
|
5379
5399
|
*/
|
|
5380
5400
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
5381
5401
|
/**
|
|
5382
5402
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5384
5404
|
*/
|
|
5385
5405
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5386
5406
|
/**
|
|
5387
5407
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-recursion.md
|
|
5389
5409
|
*/
|
|
5390
5410
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
5391
5411
|
/**
|
|
5392
5412
|
* Disallow unnecessary spread.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-spread.md
|
|
5394
5414
|
*/
|
|
5395
5415
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5396
5416
|
/**
|
|
5397
5417
|
* Disallow useless case in switch statements.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-switch-case.md
|
|
5399
5419
|
*/
|
|
5400
5420
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5401
5421
|
/**
|
|
5402
5422
|
* Disallow useless template literal expressions.
|
|
5403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-template-literals.md
|
|
5404
5424
|
*/
|
|
5405
5425
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
5406
5426
|
/**
|
|
5407
5427
|
* Disallow useless `undefined`.
|
|
5408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-undefined.md
|
|
5409
5429
|
*/
|
|
5410
5430
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5411
5431
|
/**
|
|
5412
5432
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
5413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
5414
5434
|
*/
|
|
5415
5435
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
5416
5436
|
/**
|
|
5417
5437
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-zero-fractions.md
|
|
5419
5439
|
*/
|
|
5420
5440
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5421
5441
|
/**
|
|
5422
5442
|
* Enforce proper case for numeric literals.
|
|
5423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/number-literal-case.md
|
|
5424
5444
|
*/
|
|
5425
5445
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5426
5446
|
/**
|
|
5427
5447
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/numeric-separators-style.md
|
|
5429
5449
|
*/
|
|
5430
5450
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5431
5451
|
/**
|
|
5432
5452
|
* Require assignment operator shorthand where possible.
|
|
5433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/operator-assignment.md
|
|
5434
5454
|
*/
|
|
5435
5455
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
5456
|
+
/**
|
|
5457
|
+
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
5459
|
+
*/
|
|
5460
|
+
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
5436
5461
|
/**
|
|
5437
5462
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener.md
|
|
5439
5464
|
*/
|
|
5440
5465
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5441
5466
|
/**
|
|
5442
5467
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
5443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
5444
5469
|
*/
|
|
5445
5470
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
5471
|
+
/**
|
|
5472
|
+
* Prefer `AggregateError` when throwing collected errors.
|
|
5473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-aggregate-error.md
|
|
5474
|
+
*/
|
|
5475
|
+
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
5446
5476
|
/**
|
|
5447
5477
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-find.md
|
|
5449
5479
|
*/
|
|
5450
5480
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5451
5481
|
/**
|
|
5452
5482
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat.md
|
|
5454
5484
|
*/
|
|
5455
5485
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5456
5486
|
/**
|
|
5457
5487
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
5458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat-map.md
|
|
5459
5489
|
*/
|
|
5460
5490
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5461
5491
|
/**
|
|
5462
5492
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
5463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-async.md
|
|
5464
5494
|
*/
|
|
5465
5495
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
5466
5496
|
/**
|
|
5467
5497
|
* Prefer using the `Array.from()` mapping function argument.
|
|
5468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-map.md
|
|
5469
5499
|
*/
|
|
5470
5500
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
5471
5501
|
/**
|
|
5472
5502
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-index-of.md
|
|
5474
5504
|
*/
|
|
5475
5505
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5476
5506
|
/**
|
|
5477
5507
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
5478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
5479
5509
|
*/
|
|
5480
5510
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5481
5511
|
/**
|
|
5482
5512
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-last-methods.md
|
|
5484
5514
|
*/
|
|
5485
5515
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
5486
5516
|
/**
|
|
5487
5517
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
5488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-slice.md
|
|
5489
5519
|
*/
|
|
5490
5520
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
5491
5521
|
/**
|
|
5492
5522
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-some.md
|
|
5494
5524
|
*/
|
|
5495
5525
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5496
5526
|
/**
|
|
5497
5527
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-at.md
|
|
5499
5529
|
*/
|
|
5500
5530
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5501
5531
|
/**
|
|
5502
5532
|
* Prefer `await` over promise chaining.
|
|
5503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-await.md
|
|
5504
5534
|
*/
|
|
5505
5535
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
5506
5536
|
/**
|
|
5507
5537
|
* Prefer `BigInt` literals over the constructor.
|
|
5508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-bigint-literals.md
|
|
5509
5539
|
*/
|
|
5510
5540
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5511
5541
|
/**
|
|
5512
5542
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5514
5544
|
*/
|
|
5515
5545
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5516
5546
|
/**
|
|
5517
5547
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
5518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-boolean-return.md
|
|
5519
5549
|
*/
|
|
5520
5550
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5521
5551
|
/**
|
|
5522
5552
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-class-fields.md
|
|
5524
5554
|
*/
|
|
5525
5555
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5526
5556
|
/**
|
|
5527
5557
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5529
5559
|
*/
|
|
5530
5560
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5531
5561
|
/**
|
|
5532
5562
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-code-point.md
|
|
5534
5564
|
*/
|
|
5535
5565
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5536
5566
|
/**
|
|
5537
5567
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
5538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-continue.md
|
|
5539
5569
|
*/
|
|
5540
5570
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
5541
5571
|
/**
|
|
5542
5572
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-date-now.md
|
|
5544
5574
|
*/
|
|
5545
5575
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5546
5576
|
/**
|
|
5547
5577
|
* Prefer default parameters over reassignment.
|
|
5548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-default-parameters.md
|
|
5549
5579
|
*/
|
|
5550
5580
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5551
5581
|
/**
|
|
5552
5582
|
* Prefer direct iteration over default iterator method calls.
|
|
5553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-direct-iteration.md
|
|
5554
5584
|
*/
|
|
5555
5585
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
5556
5586
|
/**
|
|
5557
5587
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
5558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dispose.md
|
|
5559
5589
|
*/
|
|
5560
5590
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
5561
5591
|
/**
|
|
5562
5592
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-append.md
|
|
5564
5594
|
*/
|
|
5565
5595
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5566
5596
|
/**
|
|
5567
5597
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
5568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5569
5599
|
* @deprecated
|
|
5570
5600
|
*/
|
|
5571
5601
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5572
5602
|
/**
|
|
5573
5603
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
5574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
5575
5605
|
*/
|
|
5576
5606
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
5577
5607
|
/**
|
|
5578
5608
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5580
5610
|
*/
|
|
5581
5611
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5612
|
+
/**
|
|
5613
|
+
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
5614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
5615
|
+
*/
|
|
5616
|
+
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
5582
5617
|
/**
|
|
5583
5618
|
* Prefer `.textContent` over `.innerText`.
|
|
5584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5585
5620
|
*/
|
|
5586
5621
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5587
5622
|
/**
|
|
5588
5623
|
* Prefer early returns over full-function conditional wrapping.
|
|
5589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-early-return.md
|
|
5590
5625
|
*/
|
|
5591
5626
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
5592
5627
|
/**
|
|
5593
5628
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
5594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-else-if.md
|
|
5595
5630
|
*/
|
|
5596
5631
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
5632
|
+
/**
|
|
5633
|
+
* Prefer `Error.isError()` when checking for errors.
|
|
5634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-error-is-error.md
|
|
5635
|
+
*/
|
|
5636
|
+
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
5597
5637
|
/**
|
|
5598
5638
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-event-target.md
|
|
5600
5640
|
*/
|
|
5601
5641
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5602
5642
|
/**
|
|
5603
5643
|
* Prefer `export…from` when re-exporting.
|
|
5604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-export-from.md
|
|
5605
5645
|
*/
|
|
5606
5646
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5607
5647
|
/**
|
|
5608
5648
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
5609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
5610
5650
|
*/
|
|
5611
5651
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5612
5652
|
/**
|
|
5613
5653
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
5615
5655
|
*/
|
|
5616
5656
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
5617
5657
|
/**
|
|
5618
5658
|
* Prefer global numeric constants over `Number` static properties.
|
|
5619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-number-constants.md
|
|
5620
5660
|
*/
|
|
5621
5661
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
5622
5662
|
/**
|
|
5623
5663
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-this.md
|
|
5625
5665
|
*/
|
|
5626
5666
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5627
5667
|
/**
|
|
5628
5668
|
* Prefer `.has()` when checking existence.
|
|
5629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-has-check.md
|
|
5630
5670
|
*/
|
|
5631
5671
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
5632
5672
|
/**
|
|
5633
5673
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
5634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
5635
5675
|
*/
|
|
5636
5676
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
5637
5677
|
/**
|
|
5638
5678
|
* Prefer HTTPS over HTTP.
|
|
5639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-https.md
|
|
5640
5680
|
*/
|
|
5641
5681
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
5642
5682
|
/**
|
|
5643
5683
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
5644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
5645
5685
|
*/
|
|
5646
5686
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
5647
5687
|
/**
|
|
5648
5688
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5650
5690
|
*/
|
|
5651
5691
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5652
5692
|
/**
|
|
5653
5693
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes.md
|
|
5655
5695
|
*/
|
|
5656
5696
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5657
5697
|
/**
|
|
5658
5698
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
5659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
5660
5700
|
*/
|
|
5661
5701
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
5662
5702
|
/**
|
|
5663
5703
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
5664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
5665
5705
|
*/
|
|
5666
5706
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
5667
5707
|
/**
|
|
5668
5708
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
5669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-concat.md
|
|
5670
5710
|
*/
|
|
5671
5711
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
5672
5712
|
/**
|
|
5673
5713
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
5674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array.md
|
|
5675
5715
|
*/
|
|
5676
5716
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5677
5717
|
/**
|
|
5678
5718
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
5679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
5680
5720
|
*/
|
|
5681
5721
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
5682
5722
|
/**
|
|
5683
5723
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
5684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
5685
5725
|
* @deprecated
|
|
5686
5726
|
*/
|
|
5687
5727
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5688
5728
|
/**
|
|
5689
5729
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
5690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5691
5731
|
*/
|
|
5692
5732
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5693
5733
|
/**
|
|
5694
5734
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
5695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-location-assign.md
|
|
5696
5736
|
*/
|
|
5697
5737
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
5698
5738
|
/**
|
|
5699
5739
|
* Prefer using a logical operator over a ternary.
|
|
5700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5701
5741
|
*/
|
|
5702
5742
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5703
5743
|
/**
|
|
5704
5744
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
5705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-map-from-entries.md
|
|
5706
5746
|
*/
|
|
5707
5747
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
5708
5748
|
/**
|
|
5709
5749
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
5710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-abs.md
|
|
5711
5751
|
*/
|
|
5712
5752
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
5713
5753
|
/**
|
|
5714
5754
|
* Prefer `Math` constants over their approximate numeric values.
|
|
5715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-constants.md
|
|
5716
5756
|
*/
|
|
5717
5757
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
5718
5758
|
/**
|
|
5719
5759
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-min-max.md
|
|
5721
5761
|
*/
|
|
5722
5762
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5723
5763
|
/**
|
|
5724
5764
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
5725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-trunc.md
|
|
5726
5766
|
*/
|
|
5727
5767
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5728
5768
|
/**
|
|
5729
5769
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
5730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-minimal-ternary.md
|
|
5731
5771
|
*/
|
|
5732
5772
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
5733
5773
|
/**
|
|
5734
5774
|
* Prefer modern DOM APIs.
|
|
5735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5736
5776
|
*/
|
|
5737
5777
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5738
5778
|
/**
|
|
5739
5779
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5741
5781
|
*/
|
|
5742
5782
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5743
5783
|
/**
|
|
5744
5784
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-module.md
|
|
5746
5786
|
*/
|
|
5747
5787
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5748
5788
|
/**
|
|
5749
5789
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5751
5791
|
*/
|
|
5752
5792
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5753
5793
|
/**
|
|
5754
5794
|
* Prefer negative index over `.length - index` when possible.
|
|
5755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-negative-index.md
|
|
5756
5796
|
*/
|
|
5757
5797
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5758
5798
|
/**
|
|
5759
5799
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-node-protocol.md
|
|
5761
5801
|
*/
|
|
5762
5802
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5763
5803
|
/**
|
|
5764
5804
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
5765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-coercion.md
|
|
5766
5806
|
*/
|
|
5767
5807
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
5768
5808
|
/**
|
|
5769
5809
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
5770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
5771
5811
|
*/
|
|
5772
5812
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
5773
5813
|
/**
|
|
5774
5814
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
5775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-properties.md
|
|
5776
5816
|
*/
|
|
5777
5817
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5778
5818
|
/**
|
|
5779
5819
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
5780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-define-properties.md
|
|
5781
5821
|
*/
|
|
5782
5822
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
5783
5823
|
/**
|
|
5784
5824
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
5785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
5786
5826
|
*/
|
|
5787
5827
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
5788
5828
|
/**
|
|
5789
5829
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-from-entries.md
|
|
5791
5831
|
*/
|
|
5792
5832
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5793
5833
|
/**
|
|
5794
5834
|
* Prefer the most specific `Object` iterable method.
|
|
5795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
5796
5836
|
*/
|
|
5797
5837
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
5838
|
+
/**
|
|
5839
|
+
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
5840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-observer-apis.md
|
|
5841
|
+
*/
|
|
5842
|
+
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
5798
5843
|
/**
|
|
5799
5844
|
* Prefer omitting the `catch` binding parameter.
|
|
5800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5801
5846
|
*/
|
|
5802
5847
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5803
5848
|
/**
|
|
5804
5849
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
5805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-path2d.md
|
|
5806
5851
|
*/
|
|
5807
5852
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
5808
5853
|
/**
|
|
5809
5854
|
* Prefer private class fields over the underscore-prefix convention.
|
|
5810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-private-class-fields.md
|
|
5811
5856
|
*/
|
|
5812
5857
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
5858
|
+
/**
|
|
5859
|
+
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
5860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-try.md
|
|
5861
|
+
*/
|
|
5862
|
+
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
5813
5863
|
/**
|
|
5814
5864
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
5815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
5816
5866
|
*/
|
|
5817
5867
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
5818
5868
|
/**
|
|
5819
5869
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-prototype-methods.md
|
|
5821
5871
|
*/
|
|
5822
5872
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5823
5873
|
/**
|
|
5824
5874
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
5825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-query-selector.md
|
|
5826
5876
|
*/
|
|
5827
5877
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
5828
5878
|
/**
|
|
5829
5879
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
5830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-queue-microtask.md
|
|
5831
5881
|
*/
|
|
5832
5882
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
5833
5883
|
/**
|
|
5834
5884
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-reflect-apply.md
|
|
5836
5886
|
*/
|
|
5837
5887
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5838
5888
|
/**
|
|
5839
5889
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
5840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-escape.md
|
|
5841
5891
|
*/
|
|
5842
5892
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
5843
5893
|
/**
|
|
5844
5894
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
5845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-test.md
|
|
5846
5896
|
*/
|
|
5847
5897
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5848
5898
|
/**
|
|
5849
5899
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-response-static-json.md
|
|
5851
5901
|
*/
|
|
5852
5902
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5853
5903
|
/**
|
|
5854
5904
|
* Prefer `:scope` when using element query selector methods.
|
|
5855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-scoped-selector.md
|
|
5856
5906
|
*/
|
|
5857
5907
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
5858
5908
|
/**
|
|
5859
5909
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-has.md
|
|
5861
5911
|
*/
|
|
5862
5912
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
5913
|
+
/**
|
|
5914
|
+
* Prefer `Set` methods for Set operations.
|
|
5915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-methods.md
|
|
5916
|
+
*/
|
|
5917
|
+
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
5863
5918
|
/**
|
|
5864
5919
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-size.md
|
|
5866
5921
|
*/
|
|
5867
5922
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5868
5923
|
/**
|
|
5869
5924
|
* Prefer arrow function properties over methods with a single return.
|
|
5870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-short-arrow-method.md
|
|
5871
5926
|
*/
|
|
5872
5927
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
5873
5928
|
/**
|
|
5874
5929
|
* Prefer simple conditions first in logical expressions.
|
|
5875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-condition-first.md
|
|
5876
5931
|
*/
|
|
5877
5932
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
5878
5933
|
/**
|
|
5879
5934
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
5880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
5881
5936
|
*/
|
|
5882
5937
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
5883
5938
|
/**
|
|
5884
5939
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
5885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-array-predicate.md
|
|
5886
5941
|
*/
|
|
5887
5942
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
5888
5943
|
/**
|
|
5889
5944
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-call.md
|
|
5891
5946
|
*/
|
|
5892
5947
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5893
5948
|
/**
|
|
5894
5949
|
* Prefer a single object destructuring declaration per local const source.
|
|
5895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
5896
5951
|
*/
|
|
5897
5952
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
5898
5953
|
/**
|
|
5899
5954
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
5900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-replace.md
|
|
5901
5956
|
*/
|
|
5902
5957
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
5903
5958
|
/**
|
|
5904
5959
|
* Prefer declaring variables in the smallest possible scope.
|
|
5905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-smaller-scope.md
|
|
5906
5961
|
*/
|
|
5907
5962
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
5908
5963
|
/**
|
|
5909
5964
|
* Prefer `String#split()` with a limit.
|
|
5910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-split-limit.md
|
|
5911
5966
|
*/
|
|
5912
5967
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
5913
5968
|
/**
|
|
5914
5969
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
5915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-spread.md
|
|
5916
5971
|
*/
|
|
5917
5972
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5918
5973
|
/**
|
|
5919
5974
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
5920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-match-all.md
|
|
5921
5976
|
*/
|
|
5922
5977
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
5923
5978
|
/**
|
|
5924
5979
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
5925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
5926
5981
|
*/
|
|
5927
5982
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
5928
5983
|
/**
|
|
5929
5984
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-raw.md
|
|
5931
5986
|
*/
|
|
5932
5987
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5933
5988
|
/**
|
|
5934
5989
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
5935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-repeat.md
|
|
5936
5991
|
*/
|
|
5937
5992
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
5938
5993
|
/**
|
|
5939
5994
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
5940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-replace-all.md
|
|
5941
5996
|
*/
|
|
5942
5997
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5943
5998
|
/**
|
|
5944
5999
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-slice.md
|
|
5946
6001
|
*/
|
|
5947
6002
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5948
6003
|
/**
|
|
5949
6004
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
5950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5951
6006
|
*/
|
|
5952
6007
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5953
6008
|
/**
|
|
5954
6009
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5956
6011
|
*/
|
|
5957
6012
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5958
6013
|
/**
|
|
5959
6014
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-structured-clone.md
|
|
5961
6016
|
*/
|
|
5962
6017
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5963
6018
|
/**
|
|
5964
6019
|
* Prefer `switch` over multiple `else-if`.
|
|
5965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-switch.md
|
|
5966
6021
|
*/
|
|
5967
6022
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5968
6023
|
/**
|
|
5969
6024
|
* Prefer `Temporal` over `Date`.
|
|
5970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-temporal.md
|
|
5971
6026
|
*/
|
|
5972
6027
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
5973
6028
|
/**
|
|
5974
6029
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
5975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-ternary.md
|
|
5976
6031
|
*/
|
|
5977
6032
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6033
|
+
/**
|
|
6034
|
+
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
6035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-toggle-attribute.md
|
|
6036
|
+
*/
|
|
6037
|
+
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
5978
6038
|
/**
|
|
5979
6039
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-top-level-await.md
|
|
5981
6041
|
*/
|
|
5982
6042
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5983
6043
|
/**
|
|
5984
6044
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-error.md
|
|
5986
6046
|
*/
|
|
5987
6047
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5988
6048
|
/**
|
|
5989
6049
|
* Require type literals to be last in union types.
|
|
5990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-literal-last.md
|
|
5991
6051
|
*/
|
|
5992
6052
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
5993
6053
|
/**
|
|
5994
6054
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
5995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-uint8array-base64.md
|
|
5996
6056
|
*/
|
|
5997
6057
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
5998
6058
|
/**
|
|
5999
6059
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
6000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unary-minus.md
|
|
6001
6061
|
*/
|
|
6002
6062
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
6003
6063
|
/**
|
|
6004
6064
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
6005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
6006
6066
|
*/
|
|
6007
6067
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
6008
6068
|
/**
|
|
6009
6069
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
6010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-can-parse.md
|
|
6011
6071
|
*/
|
|
6012
6072
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
6013
6073
|
/**
|
|
6014
6074
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
6015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-href.md
|
|
6016
6076
|
*/
|
|
6017
6077
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
6078
|
+
/**
|
|
6079
|
+
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
6080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-search-parameters.md
|
|
6081
|
+
*/
|
|
6082
|
+
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
6018
6083
|
/**
|
|
6019
6084
|
* Prefer putting the condition in the while statement.
|
|
6020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-while-loop-condition.md
|
|
6021
6086
|
*/
|
|
6022
6087
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
6023
6088
|
/**
|
|
6024
6089
|
* Renamed to `unicorn/name-replacements`.
|
|
6025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
6026
6091
|
* @deprecated
|
|
6027
6092
|
*/
|
|
6028
6093
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
6029
6094
|
/**
|
|
6030
6095
|
* Enforce consistent relative URL style.
|
|
6031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/relative-url-style.md
|
|
6032
6097
|
*/
|
|
6033
6098
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6034
6099
|
/**
|
|
6035
6100
|
* Enforce using the separator argument with `Array#join()`.
|
|
6036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-join-separator.md
|
|
6037
6102
|
*/
|
|
6038
6103
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6039
6104
|
/**
|
|
6040
6105
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
6041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-sort-compare.md
|
|
6042
6107
|
*/
|
|
6043
6108
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
6044
6109
|
/**
|
|
6045
6110
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
6046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-css-escape.md
|
|
6047
6112
|
*/
|
|
6048
6113
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
6049
6114
|
/**
|
|
6050
6115
|
* Require non-empty module attributes for imports and exports
|
|
6051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-attributes.md
|
|
6052
6117
|
*/
|
|
6053
6118
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6054
6119
|
/**
|
|
6055
6120
|
* Require non-empty specifier list in import and export statements.
|
|
6056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-specifiers.md
|
|
6057
6122
|
*/
|
|
6058
6123
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6059
6124
|
/**
|
|
6060
6125
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6062
6127
|
*/
|
|
6063
6128
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6064
6129
|
/**
|
|
6065
6130
|
* Require passive event listeners for high-frequency events.
|
|
6066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-passive-events.md
|
|
6067
6132
|
*/
|
|
6068
6133
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
6069
6134
|
/**
|
|
6070
6135
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-post-message-target-origin.md
|
|
6072
6137
|
*/
|
|
6073
6138
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6074
6139
|
/**
|
|
6075
6140
|
* Require boolean-returning Proxy traps to return booleans.
|
|
6076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
6077
6142
|
*/
|
|
6078
6143
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
6079
6144
|
/**
|
|
6080
6145
|
* Enforce better string content.
|
|
6081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/string-content.md
|
|
6082
6147
|
*/
|
|
6083
6148
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6084
6149
|
/**
|
|
6085
6150
|
* Enforce consistent brace style for `case` clauses.
|
|
6086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-braces.md
|
|
6087
6152
|
*/
|
|
6088
6153
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6089
6154
|
/**
|
|
6090
6155
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-break-position.md
|
|
6092
6157
|
*/
|
|
6093
6158
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6094
6159
|
/**
|
|
6095
6160
|
* Fix whitespace-insensitive template indentation.
|
|
6096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/template-indent.md
|
|
6097
6162
|
*/
|
|
6098
6163
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6099
6164
|
/**
|
|
6100
6165
|
* Enforce consistent case for text encoding identifiers.
|
|
6101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6102
6167
|
*/
|
|
6103
6168
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6104
6169
|
/**
|
|
6105
6170
|
* Require `new` when creating an error.
|
|
6106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/throw-new-error.md
|
|
6107
6172
|
*/
|
|
6108
6173
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6109
6174
|
/**
|
|
6110
6175
|
* Limit the complexity of `try` blocks.
|
|
6111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/try-complexity.md
|
|
6112
6177
|
*/
|
|
6113
6178
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6114
6179
|
/**
|
|
@@ -13430,6 +13495,7 @@ type UnicornConsistentBooleanName = [] | [{
|
|
|
13430
13495
|
prefixes?: {
|
|
13431
13496
|
[k: string]: boolean | undefined;
|
|
13432
13497
|
};
|
|
13498
|
+
ignore?: unknown[];
|
|
13433
13499
|
}]; // ----- unicorn/consistent-class-member-order -----
|
|
13434
13500
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
13435
13501
|
order?: [("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method")];
|
|
@@ -13672,6 +13738,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
13672
13738
|
minimumComparisons?: number;
|
|
13673
13739
|
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
13674
13740
|
type UnicornPreferMinimalTernary = [] | [{
|
|
13741
|
+
checkVaryingCallee?: boolean;
|
|
13675
13742
|
checkComputedMemberAccess?: boolean;
|
|
13676
13743
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
13677
13744
|
type UnicornPreferNumberProperties = [] | [{
|