@zayne-labs/eslint-config 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +185 -144
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/{src-MgbFTVE-.js → src-Cr2NVJeY.js} +68 -18
- package/dist/src-Cr2NVJeY.js.map +1 -0
- package/package.json +24 -24
- package/dist/src-MgbFTVE-.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,11 @@ interface Rules {
|
|
|
276
276
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
277
277
|
*/
|
|
278
278
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>;
|
|
279
|
+
/**
|
|
280
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
281
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
282
|
+
*/
|
|
283
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>;
|
|
279
284
|
/**
|
|
280
285
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
281
286
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -3523,7 +3528,7 @@ interface Rules {
|
|
|
3523
3528
|
*/
|
|
3524
3529
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
3525
3530
|
/**
|
|
3526
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3531
|
+
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3527
3532
|
*/
|
|
3528
3533
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
3529
3534
|
/**
|
|
@@ -3572,6 +3577,11 @@ interface Rules {
|
|
|
3572
3577
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3573
3578
|
*/
|
|
3574
3579
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
3580
|
+
/**
|
|
3581
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
3582
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
3583
|
+
*/
|
|
3584
|
+
'react-x/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
3575
3585
|
/**
|
|
3576
3586
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
3577
3587
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -3925,6 +3935,11 @@ interface Rules {
|
|
|
3925
3935
|
* @see https://react.dev/learn/you-might-not-need-an-effect#notifying-parent-components-about-state-changes
|
|
3926
3936
|
*/
|
|
3927
3937
|
'react-you-might-not-need-an-effect/no-pass-live-state-to-parent'?: Linter.RuleEntry<[]>;
|
|
3938
|
+
/**
|
|
3939
|
+
* Disallow passing refs, or data from callbacks registered on them, to parents in an effect. Use `forwardRef` instead.
|
|
3940
|
+
* @see https://react.dev/reference/react/forwardRef
|
|
3941
|
+
*/
|
|
3942
|
+
'react-you-might-not-need-an-effect/no-pass-ref-to-parent'?: Linter.RuleEntry<[]>;
|
|
3928
3943
|
/**
|
|
3929
3944
|
* Disallow resetting all state in an effect when a prop changes.
|
|
3930
3945
|
* @see https://react.dev/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes
|
|
@@ -5593,710 +5608,725 @@ interface Rules {
|
|
|
5593
5608
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5594
5609
|
/**
|
|
5595
5610
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
5597
5612
|
*/
|
|
5598
5613
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5599
5614
|
/**
|
|
5600
5615
|
* Enforce a specific parameter name in catch clauses.
|
|
5601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
5602
5617
|
*/
|
|
5603
5618
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5604
5619
|
/**
|
|
5605
5620
|
* Enforce consistent assertion style with `node:assert`.
|
|
5606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
5607
5622
|
*/
|
|
5608
5623
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5609
5624
|
/**
|
|
5610
5625
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
5612
5627
|
*/
|
|
5613
5628
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5614
5629
|
/**
|
|
5615
5630
|
* Use destructured variables over properties.
|
|
5616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
5617
5632
|
*/
|
|
5618
5633
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5619
5634
|
/**
|
|
5620
5635
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5622
5637
|
*/
|
|
5623
5638
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5624
5639
|
/**
|
|
5625
5640
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5627
5642
|
*/
|
|
5628
5643
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5629
5644
|
/**
|
|
5630
5645
|
* Move function definitions to the highest possible scope.
|
|
5631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5632
5647
|
*/
|
|
5633
5648
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5634
5649
|
/**
|
|
5635
5650
|
* Enforce correct `Error` subclassing.
|
|
5636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5637
5652
|
*/
|
|
5638
5653
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5639
5654
|
/**
|
|
5640
5655
|
* Enforce no spaces between braces.
|
|
5641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5642
5657
|
*/
|
|
5643
5658
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5644
5659
|
/**
|
|
5645
5660
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5647
5662
|
*/
|
|
5648
5663
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5649
5664
|
/**
|
|
5650
5665
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5652
5667
|
*/
|
|
5653
5668
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5654
5669
|
/**
|
|
5655
5670
|
* Add expiration conditions to TODO comments.
|
|
5656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5657
5672
|
*/
|
|
5658
5673
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5659
5674
|
/**
|
|
5660
5675
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5662
5677
|
*/
|
|
5663
5678
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5664
5679
|
/**
|
|
5665
5680
|
* Enforce a case style for filenames.
|
|
5666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5667
5682
|
*/
|
|
5668
5683
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5669
5684
|
/**
|
|
5670
5685
|
* Enforce specific import styles per module.
|
|
5671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5672
5687
|
*/
|
|
5673
5688
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5674
5689
|
/**
|
|
5675
5690
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5677
5692
|
*/
|
|
5678
5693
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5679
5694
|
/**
|
|
5680
5695
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5682
5697
|
*/
|
|
5683
5698
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5684
5699
|
/**
|
|
5685
5700
|
* Disallow recursive access to `this` within getters and setters.
|
|
5686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5687
5702
|
*/
|
|
5688
5703
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5689
5704
|
/**
|
|
5690
5705
|
* Disallow anonymous functions and classes as the default export.
|
|
5691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5692
5707
|
*/
|
|
5693
5708
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5694
5709
|
/**
|
|
5695
5710
|
* Prevent passing a function reference directly to iterator methods.
|
|
5696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5697
5712
|
*/
|
|
5698
5713
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5699
5714
|
/**
|
|
5700
5715
|
* Prefer `for…of` over the `forEach` method.
|
|
5701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5702
5717
|
*/
|
|
5703
5718
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5704
5719
|
/**
|
|
5705
5720
|
* Disallow using the `this` argument in array methods.
|
|
5706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5707
5722
|
*/
|
|
5708
5723
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5709
5724
|
/**
|
|
5710
5725
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5712
5727
|
* @deprecated
|
|
5713
5728
|
*/
|
|
5714
5729
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5715
5730
|
/**
|
|
5716
5731
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5718
5733
|
*/
|
|
5719
5734
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5720
5735
|
/**
|
|
5721
5736
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5723
5738
|
*/
|
|
5724
5739
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5725
5740
|
/**
|
|
5726
5741
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5728
5743
|
*/
|
|
5729
5744
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5730
5745
|
/**
|
|
5731
5746
|
* Disallow member access from await expression.
|
|
5732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5733
5748
|
*/
|
|
5734
5749
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5735
5750
|
/**
|
|
5736
5751
|
* Disallow using `await` in `Promise` method parameters.
|
|
5737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5738
5753
|
*/
|
|
5739
5754
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5740
5755
|
/**
|
|
5741
5756
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5743
5758
|
*/
|
|
5744
5759
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5745
5760
|
/**
|
|
5746
5761
|
* Do not use `document.cookie` directly.
|
|
5747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5748
5763
|
*/
|
|
5749
5764
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5750
5765
|
/**
|
|
5751
5766
|
* Disallow empty files.
|
|
5752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5753
5768
|
*/
|
|
5754
5769
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5755
5770
|
/**
|
|
5756
5771
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5758
5773
|
*/
|
|
5759
5774
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5760
5775
|
/**
|
|
5761
5776
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5763
5778
|
*/
|
|
5764
5779
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5780
|
+
/**
|
|
5781
|
+
* Disallow immediate mutation after variable assignment.
|
|
5782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5783
|
+
*/
|
|
5784
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5765
5785
|
/**
|
|
5766
5786
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5768
5788
|
* @deprecated
|
|
5769
5789
|
*/
|
|
5770
5790
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5771
5791
|
/**
|
|
5772
5792
|
* Disallow `instanceof` with built-in objects
|
|
5773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5774
5794
|
*/
|
|
5775
5795
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5776
5796
|
/**
|
|
5777
5797
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5779
5799
|
*/
|
|
5780
5800
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5781
5801
|
/**
|
|
5782
5802
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5784
5804
|
*/
|
|
5785
5805
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5786
5806
|
/**
|
|
5787
5807
|
* Disallow identifiers starting with `new` or `class`.
|
|
5788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5789
5809
|
*/
|
|
5790
5810
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5791
5811
|
/**
|
|
5792
5812
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5794
5814
|
* @deprecated
|
|
5795
5815
|
*/
|
|
5796
5816
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5797
5817
|
/**
|
|
5798
5818
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5800
5820
|
*/
|
|
5801
5821
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5802
5822
|
/**
|
|
5803
5823
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5805
5825
|
*/
|
|
5806
5826
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5807
5827
|
/**
|
|
5808
5828
|
* Disallow named usage of default import and export.
|
|
5809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5810
5830
|
*/
|
|
5811
5831
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5812
5832
|
/**
|
|
5813
5833
|
* Disallow negated conditions.
|
|
5814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5815
5835
|
*/
|
|
5816
5836
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5817
5837
|
/**
|
|
5818
5838
|
* Disallow negated expression in equality check.
|
|
5819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5820
5840
|
*/
|
|
5821
5841
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5822
5842
|
/**
|
|
5823
5843
|
* Disallow nested ternary expressions.
|
|
5824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5825
5845
|
*/
|
|
5826
5846
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5827
5847
|
/**
|
|
5828
5848
|
* Disallow `new Array()`.
|
|
5829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5830
5850
|
*/
|
|
5831
5851
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5832
5852
|
/**
|
|
5833
5853
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5835
5855
|
*/
|
|
5836
5856
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5837
5857
|
/**
|
|
5838
5858
|
* Disallow the use of the `null` literal.
|
|
5839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5840
5860
|
*/
|
|
5841
5861
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5842
5862
|
/**
|
|
5843
5863
|
* Disallow the use of objects as default parameters.
|
|
5844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5845
5865
|
*/
|
|
5846
5866
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5847
5867
|
/**
|
|
5848
5868
|
* Disallow `process.exit()`.
|
|
5849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5850
5870
|
*/
|
|
5851
5871
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5852
5872
|
/**
|
|
5853
5873
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5855
5875
|
*/
|
|
5856
5876
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5857
5877
|
/**
|
|
5858
5878
|
* Disallow classes that only have static members.
|
|
5859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5860
5880
|
*/
|
|
5861
5881
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5862
5882
|
/**
|
|
5863
5883
|
* Disallow `then` property.
|
|
5864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5865
5885
|
*/
|
|
5866
5886
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5867
5887
|
/**
|
|
5868
5888
|
* Disallow assigning `this` to a variable.
|
|
5869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5870
5890
|
*/
|
|
5871
5891
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5872
5892
|
/**
|
|
5873
5893
|
* Disallow comparing `undefined` using `typeof`.
|
|
5874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5875
5895
|
*/
|
|
5876
5896
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5877
5897
|
/**
|
|
5878
5898
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5880
5900
|
*/
|
|
5881
5901
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5882
5902
|
/**
|
|
5883
5903
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5885
5905
|
*/
|
|
5886
5906
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5887
5907
|
/**
|
|
5888
5908
|
* Disallow awaiting non-promise values.
|
|
5889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5890
5910
|
*/
|
|
5891
5911
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5892
5912
|
/**
|
|
5893
5913
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5895
5915
|
*/
|
|
5896
5916
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5897
5917
|
/**
|
|
5898
5918
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5900
5920
|
*/
|
|
5901
5921
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5902
5922
|
/**
|
|
5903
5923
|
* Disallow unreadable array destructuring.
|
|
5904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5905
5925
|
*/
|
|
5906
5926
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5907
5927
|
/**
|
|
5908
5928
|
* Disallow unreadable IIFEs.
|
|
5909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5910
5930
|
*/
|
|
5911
5931
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5912
5932
|
/**
|
|
5913
5933
|
* Disallow unused object properties.
|
|
5914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5915
5935
|
*/
|
|
5916
5936
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5937
|
+
/**
|
|
5938
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5940
|
+
*/
|
|
5941
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5917
5942
|
/**
|
|
5918
5943
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5920
5945
|
*/
|
|
5921
5946
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5922
5947
|
/**
|
|
5923
5948
|
* Disallow useless fallback when spreading in object literals.
|
|
5924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5925
5950
|
*/
|
|
5926
5951
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5927
5952
|
/**
|
|
5928
5953
|
* Disallow useless array length check.
|
|
5929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5930
5955
|
*/
|
|
5931
5956
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5932
5957
|
/**
|
|
5933
5958
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5935
5960
|
*/
|
|
5936
5961
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5937
5962
|
/**
|
|
5938
5963
|
* Disallow unnecessary spread.
|
|
5939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5940
5965
|
*/
|
|
5941
5966
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5942
5967
|
/**
|
|
5943
5968
|
* Disallow useless case in switch statements.
|
|
5944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5945
5970
|
*/
|
|
5946
5971
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5947
5972
|
/**
|
|
5948
5973
|
* Disallow useless `undefined`.
|
|
5949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5950
5975
|
*/
|
|
5951
5976
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5952
5977
|
/**
|
|
5953
5978
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5955
5980
|
*/
|
|
5956
5981
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5957
5982
|
/**
|
|
5958
5983
|
* Enforce proper case for numeric literals.
|
|
5959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5960
5985
|
*/
|
|
5961
5986
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5962
5987
|
/**
|
|
5963
5988
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5965
5990
|
*/
|
|
5966
5991
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5967
5992
|
/**
|
|
5968
5993
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5970
5995
|
*/
|
|
5971
5996
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5972
5997
|
/**
|
|
5973
5998
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5975
6000
|
*/
|
|
5976
6001
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5977
6002
|
/**
|
|
5978
6003
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5980
6005
|
*/
|
|
5981
6006
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5982
6007
|
/**
|
|
5983
6008
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5985
6010
|
*/
|
|
5986
6011
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5987
6012
|
/**
|
|
5988
6013
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5990
6015
|
*/
|
|
5991
6016
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5992
6017
|
/**
|
|
5993
6018
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5995
6020
|
*/
|
|
5996
6021
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5997
6022
|
/**
|
|
5998
6023
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
6000
6025
|
*/
|
|
6001
6026
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6002
6027
|
/**
|
|
6003
6028
|
* Prefer `BigInt` literals over the constructor.
|
|
6004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
6005
6030
|
*/
|
|
6006
6031
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6007
6032
|
/**
|
|
6008
6033
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6010
6035
|
*/
|
|
6011
6036
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6012
6037
|
/**
|
|
6013
6038
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
6015
6040
|
*/
|
|
6016
6041
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6017
6042
|
/**
|
|
6018
6043
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6020
6045
|
*/
|
|
6021
6046
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6022
6047
|
/**
|
|
6023
6048
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
6025
6050
|
*/
|
|
6026
6051
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6027
6052
|
/**
|
|
6028
6053
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
6030
6055
|
*/
|
|
6031
6056
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6032
6057
|
/**
|
|
6033
6058
|
* Prefer default parameters over reassignment.
|
|
6034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
6035
6060
|
*/
|
|
6036
6061
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6037
6062
|
/**
|
|
6038
6063
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
6040
6065
|
*/
|
|
6041
6066
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6042
6067
|
/**
|
|
6043
6068
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6045
6070
|
*/
|
|
6046
6071
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6047
6072
|
/**
|
|
6048
6073
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6050
6075
|
*/
|
|
6051
6076
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6052
6077
|
/**
|
|
6053
6078
|
* Prefer `.textContent` over `.innerText`.
|
|
6054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6055
6080
|
*/
|
|
6056
6081
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6057
6082
|
/**
|
|
6058
6083
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
6060
6085
|
*/
|
|
6061
6086
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6062
6087
|
/**
|
|
6063
6088
|
* Prefer `export…from` when re-exporting.
|
|
6064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
6065
6090
|
*/
|
|
6066
6091
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6067
6092
|
/**
|
|
6068
6093
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
6070
6095
|
*/
|
|
6071
6096
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6072
6097
|
/**
|
|
6073
6098
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6075
6100
|
*/
|
|
6076
6101
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6077
6102
|
/**
|
|
6078
6103
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
6080
6105
|
*/
|
|
6081
6106
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6082
6107
|
/**
|
|
6083
6108
|
* Prefer reading a JSON file as a buffer.
|
|
6084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6085
6110
|
*/
|
|
6086
6111
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6087
6112
|
/**
|
|
6088
6113
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6090
6115
|
*/
|
|
6091
6116
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6092
6117
|
/**
|
|
6093
6118
|
* Prefer using a logical operator over a ternary.
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6095
6120
|
*/
|
|
6096
6121
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6097
6122
|
/**
|
|
6098
6123
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
6100
6125
|
*/
|
|
6101
6126
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6102
6127
|
/**
|
|
6103
6128
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
6105
6130
|
*/
|
|
6106
6131
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6107
6132
|
/**
|
|
6108
6133
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6110
6135
|
*/
|
|
6111
6136
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6112
6137
|
/**
|
|
6113
6138
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6115
6140
|
*/
|
|
6116
6141
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6117
6142
|
/**
|
|
6118
6143
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
6120
6145
|
*/
|
|
6121
6146
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6122
6147
|
/**
|
|
6123
6148
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6125
6150
|
*/
|
|
6126
6151
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6127
6152
|
/**
|
|
6128
6153
|
* Prefer negative index over `.length - index` when possible.
|
|
6129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
6130
6155
|
*/
|
|
6131
6156
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6132
6157
|
/**
|
|
6133
6158
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
6135
6160
|
*/
|
|
6136
6161
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6137
6162
|
/**
|
|
6138
6163
|
* Prefer `Number` static properties over global ones.
|
|
6139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
6140
6165
|
*/
|
|
6141
6166
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6142
6167
|
/**
|
|
6143
6168
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
6145
6170
|
*/
|
|
6146
6171
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6147
6172
|
/**
|
|
6148
6173
|
* Prefer omitting the `catch` binding parameter.
|
|
6149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6150
6175
|
*/
|
|
6151
6176
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6152
6177
|
/**
|
|
6153
6178
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
6155
6180
|
*/
|
|
6156
6181
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6157
6182
|
/**
|
|
6158
6183
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
6160
6185
|
*/
|
|
6161
6186
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6162
6187
|
/**
|
|
6163
6188
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
6165
6190
|
*/
|
|
6166
6191
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6167
6192
|
/**
|
|
6168
6193
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
6170
6195
|
*/
|
|
6171
6196
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6197
|
+
/**
|
|
6198
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
6200
|
+
*/
|
|
6201
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6172
6202
|
/**
|
|
6173
6203
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
6175
6205
|
*/
|
|
6176
6206
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6177
6207
|
/**
|
|
6178
6208
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
6180
6210
|
*/
|
|
6181
6211
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6182
6212
|
/**
|
|
6183
6213
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
6185
6215
|
*/
|
|
6186
6216
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6187
6217
|
/**
|
|
6188
6218
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
6190
6220
|
*/
|
|
6191
6221
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6192
6222
|
/**
|
|
6193
6223
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
6195
6225
|
*/
|
|
6196
6226
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6197
6227
|
/**
|
|
6198
6228
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
6200
6230
|
*/
|
|
6201
6231
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6202
6232
|
/**
|
|
6203
6233
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
6205
6235
|
*/
|
|
6206
6236
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6207
6237
|
/**
|
|
6208
6238
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6210
6240
|
*/
|
|
6211
6241
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6212
6242
|
/**
|
|
6213
6243
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6215
6245
|
*/
|
|
6216
6246
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6217
6247
|
/**
|
|
6218
6248
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
6220
6250
|
*/
|
|
6221
6251
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6222
6252
|
/**
|
|
6223
6253
|
* Prefer `switch` over multiple `else-if`.
|
|
6224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
6225
6255
|
*/
|
|
6226
6256
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6227
6257
|
/**
|
|
6228
6258
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
6230
6260
|
*/
|
|
6231
6261
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6232
6262
|
/**
|
|
6233
6263
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
6235
6265
|
*/
|
|
6236
6266
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6237
6267
|
/**
|
|
6238
6268
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
6240
6270
|
*/
|
|
6241
6271
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6242
6272
|
/**
|
|
6243
6273
|
* Prevent abbreviations.
|
|
6244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
6245
6275
|
*/
|
|
6246
6276
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6247
6277
|
/**
|
|
6248
6278
|
* Enforce consistent relative URL style.
|
|
6249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
6250
6280
|
*/
|
|
6251
6281
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6252
6282
|
/**
|
|
6253
6283
|
* Enforce using the separator argument with `Array#join()`.
|
|
6254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
6255
6285
|
*/
|
|
6256
6286
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6257
6287
|
/**
|
|
6258
6288
|
* Require non-empty module attributes for imports and exports
|
|
6259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
6260
6290
|
*/
|
|
6261
6291
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6262
6292
|
/**
|
|
6263
6293
|
* Require non-empty specifier list in import and export statements.
|
|
6264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
6265
6295
|
*/
|
|
6266
6296
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6267
6297
|
/**
|
|
6268
6298
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6270
6300
|
*/
|
|
6271
6301
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6272
6302
|
/**
|
|
6273
6303
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
6275
6305
|
*/
|
|
6276
6306
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6277
6307
|
/**
|
|
6278
6308
|
* Enforce better string content.
|
|
6279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
6280
6310
|
*/
|
|
6281
6311
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6282
6312
|
/**
|
|
6283
6313
|
* Enforce consistent brace style for `case` clauses.
|
|
6284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
6285
6315
|
*/
|
|
6286
6316
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6287
6317
|
/**
|
|
6288
6318
|
* Fix whitespace-insensitive template indentation.
|
|
6289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
6290
6320
|
*/
|
|
6291
6321
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6292
6322
|
/**
|
|
6293
6323
|
* Enforce consistent case for text encoding identifiers.
|
|
6294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6295
6325
|
*/
|
|
6296
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
6326
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6297
6327
|
/**
|
|
6298
6328
|
* Require `new` when creating an error.
|
|
6299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
6300
6330
|
*/
|
|
6301
6331
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6302
6332
|
/**
|
|
@@ -7946,6 +7976,13 @@ type AstroJsxA11YScope = [] | [{
|
|
|
7946
7976
|
type AstroJsxA11YTabindexNoPositive = [] | [{
|
|
7947
7977
|
[k: string]: unknown | undefined;
|
|
7948
7978
|
}];
|
|
7979
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
7980
|
+
type AstroNoUnsafeInlineScripts = [] | [{
|
|
7981
|
+
allowDefineVars?: boolean;
|
|
7982
|
+
allowModuleScripts?: boolean;
|
|
7983
|
+
allowNonExecutingTypes?: string[];
|
|
7984
|
+
allowNonce?: boolean;
|
|
7985
|
+
}];
|
|
7949
7986
|
// ----- astro/prefer-split-class-list -----
|
|
7950
7987
|
type AstroPreferSplitClassList = [] | [{
|
|
7951
7988
|
splitLiteral?: boolean;
|
|
@@ -16010,6 +16047,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
16010
16047
|
selectors?: string[];
|
|
16011
16048
|
comments?: string[];
|
|
16012
16049
|
}];
|
|
16050
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
16051
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
16052
|
+
withDash?: boolean;
|
|
16053
|
+
}];
|
|
16013
16054
|
// ----- use-isnan -----
|
|
16014
16055
|
type UseIsnan = [] | [{
|
|
16015
16056
|
enforceForSwitchCase?: boolean;
|
|
@@ -18108,7 +18149,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsComponentExtsTypeAw
|
|
|
18108
18149
|
//#region src/types/utils.d.ts
|
|
18109
18150
|
type Awaitable<T> = Promise<T> | T;
|
|
18110
18151
|
type ExtractOptions<TUnion> = Extract<TUnion, object>;
|
|
18111
|
-
type Prettify<TObject
|
|
18152
|
+
type Prettify<TObject> = NonNullable<unknown> & { [Key in keyof TObject]: TObject[Key] };
|
|
18112
18153
|
//#endregion
|
|
18113
18154
|
//#region src/configs/astro.d.ts
|
|
18114
18155
|
declare const astro: (options?: ExtractOptions<OptionsConfig["astro"]>) => Promise<TypedFlatConfigItem[]>;
|