@anolilab/eslint-config 16.4.1 → 16.4.3
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/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +257 -146
- package/dist/index.d.mts +257 -146
- package/dist/index.d.ts +257 -146
- package/dist/index.mjs +7 -7
- package/package.json +33 -33
package/dist/index.d.cts
CHANGED
|
@@ -79,6 +79,11 @@ interface RuleOptions {
|
|
|
79
79
|
* @see https://eslint.style/rules/eol-last
|
|
80
80
|
*/
|
|
81
81
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>
|
|
82
|
+
/**
|
|
83
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
84
|
+
* @see https://eslint.style/rules/list-style
|
|
85
|
+
*/
|
|
86
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>
|
|
82
87
|
/**
|
|
83
88
|
* Enforce line breaks between arguments of a function call
|
|
84
89
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -1468,6 +1473,11 @@ interface RuleOptions {
|
|
|
1468
1473
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
1469
1474
|
*/
|
|
1470
1475
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>
|
|
1476
|
+
/**
|
|
1477
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
1478
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
1479
|
+
*/
|
|
1480
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>
|
|
1471
1481
|
/**
|
|
1472
1482
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
1473
1483
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -3569,7 +3579,7 @@ interface RuleOptions {
|
|
|
3569
3579
|
*/
|
|
3570
3580
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>
|
|
3571
3581
|
/**
|
|
3572
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3582
|
+
* 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.
|
|
3573
3583
|
*/
|
|
3574
3584
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>
|
|
3575
3585
|
/**
|
|
@@ -3634,6 +3644,11 @@ interface RuleOptions {
|
|
|
3634
3644
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3635
3645
|
*/
|
|
3636
3646
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
3647
|
+
/**
|
|
3648
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
3649
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
3650
|
+
*/
|
|
3651
|
+
'react-x/jsx-dollar'?: Linter.RuleEntry<[]>
|
|
3637
3652
|
/**
|
|
3638
3653
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
3639
3654
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -3772,6 +3787,7 @@ interface RuleOptions {
|
|
|
3772
3787
|
/**
|
|
3773
3788
|
* Disallow certain props on components.
|
|
3774
3789
|
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
3790
|
+
* @deprecated
|
|
3775
3791
|
*/
|
|
3776
3792
|
'react-x/no-forbidden-props'?: Linter.RuleEntry<ReactXNoForbiddenProps>
|
|
3777
3793
|
/**
|
|
@@ -3893,7 +3909,7 @@ interface RuleOptions {
|
|
|
3893
3909
|
* Prevents using referential-type values as default props in object destructuring.
|
|
3894
3910
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3895
3911
|
*/
|
|
3896
|
-
'react-x/no-unstable-default-props'?: Linter.RuleEntry<
|
|
3912
|
+
'react-x/no-unstable-default-props'?: Linter.RuleEntry<ReactXNoUnstableDefaultProps>
|
|
3897
3913
|
/**
|
|
3898
3914
|
* Warns unused class component methods and properties.
|
|
3899
3915
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
@@ -3970,6 +3986,7 @@ interface RuleOptions {
|
|
|
3970
3986
|
'react-you-might-not-need-an-effect/no-event-handler'?: Linter.RuleEntry<[]>
|
|
3971
3987
|
/**
|
|
3972
3988
|
* Disallow initializing state in an effect.
|
|
3989
|
+
* @see https://tkdodo.eu/blog/avoiding-hydration-mismatches-with-use-sync-external-store
|
|
3973
3990
|
*/
|
|
3974
3991
|
'react-you-might-not-need-an-effect/no-initialize-state'?: Linter.RuleEntry<[]>
|
|
3975
3992
|
/**
|
|
@@ -3986,6 +4003,11 @@ interface RuleOptions {
|
|
|
3986
4003
|
* @see https://react.dev/learn/you-might-not-need-an-effect#notifying-parent-components-about-state-changes
|
|
3987
4004
|
*/
|
|
3988
4005
|
'react-you-might-not-need-an-effect/no-pass-live-state-to-parent'?: Linter.RuleEntry<[]>
|
|
4006
|
+
/**
|
|
4007
|
+
* Disallow passing refs, or data from callbacks registered on them, to parents in an effect. Use `forwardRef` instead.
|
|
4008
|
+
* @see https://react.dev/reference/react/forwardRef
|
|
4009
|
+
*/
|
|
4010
|
+
'react-you-might-not-need-an-effect/no-pass-ref-to-parent'?: Linter.RuleEntry<[]>
|
|
3989
4011
|
/**
|
|
3990
4012
|
* Disallow resetting all state in an effect when a prop changes.
|
|
3991
4013
|
* @see https://react.dev/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes
|
|
@@ -6654,710 +6676,725 @@ interface RuleOptions {
|
|
|
6654
6676
|
'tsdoc/syntax'?: Linter.RuleEntry<[]>
|
|
6655
6677
|
/**
|
|
6656
6678
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
6658
6680
|
*/
|
|
6659
6681
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
6660
6682
|
/**
|
|
6661
6683
|
* Enforce a specific parameter name in catch clauses.
|
|
6662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
6663
6685
|
*/
|
|
6664
6686
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
6665
6687
|
/**
|
|
6666
6688
|
* Enforce consistent assertion style with `node:assert`.
|
|
6667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
6668
6690
|
*/
|
|
6669
6691
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
6670
6692
|
/**
|
|
6671
6693
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
6673
6695
|
*/
|
|
6674
6696
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
6675
6697
|
/**
|
|
6676
6698
|
* Use destructured variables over properties.
|
|
6677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
6678
6700
|
*/
|
|
6679
6701
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
6680
6702
|
/**
|
|
6681
6703
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6683
6705
|
*/
|
|
6684
6706
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
6685
6707
|
/**
|
|
6686
6708
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
6688
6710
|
*/
|
|
6689
6711
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
6690
6712
|
/**
|
|
6691
6713
|
* Move function definitions to the highest possible scope.
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
6693
6715
|
*/
|
|
6694
6716
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
6695
6717
|
/**
|
|
6696
6718
|
* Enforce correct `Error` subclassing.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
6698
6720
|
*/
|
|
6699
6721
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
6700
6722
|
/**
|
|
6701
6723
|
* Enforce no spaces between braces.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
6703
6725
|
*/
|
|
6704
6726
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
6705
6727
|
/**
|
|
6706
6728
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
6708
6730
|
*/
|
|
6709
6731
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
6710
6732
|
/**
|
|
6711
6733
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
6713
6735
|
*/
|
|
6714
6736
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
6715
6737
|
/**
|
|
6716
6738
|
* Add expiration conditions to TODO comments.
|
|
6717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
6718
6740
|
*/
|
|
6719
6741
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
6720
6742
|
/**
|
|
6721
6743
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
6723
6745
|
*/
|
|
6724
6746
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
6725
6747
|
/**
|
|
6726
6748
|
* Enforce a case style for filenames.
|
|
6727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
6728
6750
|
*/
|
|
6729
6751
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
6730
6752
|
/**
|
|
6731
6753
|
* Enforce specific import styles per module.
|
|
6732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
6733
6755
|
*/
|
|
6734
6756
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
6735
6757
|
/**
|
|
6736
6758
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
6738
6760
|
*/
|
|
6739
6761
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
6740
6762
|
/**
|
|
6741
6763
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6743
6765
|
*/
|
|
6744
6766
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
6745
6767
|
/**
|
|
6746
6768
|
* Disallow recursive access to `this` within getters and setters.
|
|
6747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
6748
6770
|
*/
|
|
6749
6771
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
6750
6772
|
/**
|
|
6751
6773
|
* Disallow anonymous functions and classes as the default export.
|
|
6752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
6753
6775
|
*/
|
|
6754
6776
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
6755
6777
|
/**
|
|
6756
6778
|
* Prevent passing a function reference directly to iterator methods.
|
|
6757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
6758
6780
|
*/
|
|
6759
6781
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
6760
6782
|
/**
|
|
6761
6783
|
* Prefer `for…of` over the `forEach` method.
|
|
6762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
6763
6785
|
*/
|
|
6764
6786
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
6765
6787
|
/**
|
|
6766
6788
|
* Disallow using the `this` argument in array methods.
|
|
6767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
6768
6790
|
*/
|
|
6769
6791
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
6770
6792
|
/**
|
|
6771
6793
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
6773
6795
|
* @deprecated
|
|
6774
6796
|
*/
|
|
6775
6797
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
6776
6798
|
/**
|
|
6777
6799
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
6779
6801
|
*/
|
|
6780
6802
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
6781
6803
|
/**
|
|
6782
6804
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
6784
6806
|
*/
|
|
6785
6807
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
6786
6808
|
/**
|
|
6787
6809
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
6789
6811
|
*/
|
|
6790
6812
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
|
|
6791
6813
|
/**
|
|
6792
6814
|
* Disallow member access from await expression.
|
|
6793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
6794
6816
|
*/
|
|
6795
6817
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
6796
6818
|
/**
|
|
6797
6819
|
* Disallow using `await` in `Promise` method parameters.
|
|
6798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6799
6821
|
*/
|
|
6800
6822
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6801
6823
|
/**
|
|
6802
6824
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
6804
6826
|
*/
|
|
6805
6827
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
6806
6828
|
/**
|
|
6807
6829
|
* Do not use `document.cookie` directly.
|
|
6808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
6809
6831
|
*/
|
|
6810
6832
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
6811
6833
|
/**
|
|
6812
6834
|
* Disallow empty files.
|
|
6813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
6814
6836
|
*/
|
|
6815
6837
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
6816
6838
|
/**
|
|
6817
6839
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
6819
6841
|
*/
|
|
6820
6842
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
6821
6843
|
/**
|
|
6822
6844
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
6824
6846
|
*/
|
|
6825
6847
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
6848
|
+
/**
|
|
6849
|
+
* Disallow immediate mutation after variable assignment.
|
|
6850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
6851
|
+
*/
|
|
6852
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
|
|
6826
6853
|
/**
|
|
6827
6854
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
6829
6856
|
* @deprecated
|
|
6830
6857
|
*/
|
|
6831
6858
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
6832
6859
|
/**
|
|
6833
6860
|
* Disallow `instanceof` with built-in objects
|
|
6834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
6835
6862
|
*/
|
|
6836
6863
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
6837
6864
|
/**
|
|
6838
6865
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6840
6867
|
*/
|
|
6841
6868
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
6842
6869
|
/**
|
|
6843
6870
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6845
6872
|
*/
|
|
6846
6873
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
6847
6874
|
/**
|
|
6848
6875
|
* Disallow identifiers starting with `new` or `class`.
|
|
6849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
6850
6877
|
*/
|
|
6851
6878
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
6852
6879
|
/**
|
|
6853
6880
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6855
6882
|
* @deprecated
|
|
6856
6883
|
*/
|
|
6857
6884
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
6858
6885
|
/**
|
|
6859
6886
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
6861
6888
|
*/
|
|
6862
6889
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
6863
6890
|
/**
|
|
6864
6891
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6866
6893
|
*/
|
|
6867
6894
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6868
6895
|
/**
|
|
6869
6896
|
* Disallow named usage of default import and export.
|
|
6870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
6871
6898
|
*/
|
|
6872
6899
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
6873
6900
|
/**
|
|
6874
6901
|
* Disallow negated conditions.
|
|
6875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
6876
6903
|
*/
|
|
6877
6904
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
6878
6905
|
/**
|
|
6879
6906
|
* Disallow negated expression in equality check.
|
|
6880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6881
6908
|
*/
|
|
6882
6909
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
6883
6910
|
/**
|
|
6884
6911
|
* Disallow nested ternary expressions.
|
|
6885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
6886
6913
|
*/
|
|
6887
6914
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
6888
6915
|
/**
|
|
6889
6916
|
* Disallow `new Array()`.
|
|
6890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
6891
6918
|
*/
|
|
6892
6919
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
6893
6920
|
/**
|
|
6894
6921
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
6896
6923
|
*/
|
|
6897
6924
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
6898
6925
|
/**
|
|
6899
6926
|
* Disallow the use of the `null` literal.
|
|
6900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
6901
6928
|
*/
|
|
6902
6929
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
6903
6930
|
/**
|
|
6904
6931
|
* Disallow the use of objects as default parameters.
|
|
6905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6906
6933
|
*/
|
|
6907
6934
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
6908
6935
|
/**
|
|
6909
6936
|
* Disallow `process.exit()`.
|
|
6910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
6911
6938
|
*/
|
|
6912
6939
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
6913
6940
|
/**
|
|
6914
6941
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6916
6943
|
*/
|
|
6917
6944
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
6918
6945
|
/**
|
|
6919
6946
|
* Disallow classes that only have static members.
|
|
6920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
6921
6948
|
*/
|
|
6922
6949
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
6923
6950
|
/**
|
|
6924
6951
|
* Disallow `then` property.
|
|
6925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
6926
6953
|
*/
|
|
6927
6954
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
6928
6955
|
/**
|
|
6929
6956
|
* Disallow assigning `this` to a variable.
|
|
6930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
6931
6958
|
*/
|
|
6932
6959
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
6933
6960
|
/**
|
|
6934
6961
|
* Disallow comparing `undefined` using `typeof`.
|
|
6935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
6936
6963
|
*/
|
|
6937
6964
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
6938
6965
|
/**
|
|
6939
6966
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6941
6968
|
*/
|
|
6942
6969
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
6943
6970
|
/**
|
|
6944
6971
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6946
6973
|
*/
|
|
6947
6974
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
6948
6975
|
/**
|
|
6949
6976
|
* Disallow awaiting non-promise values.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
6951
6978
|
*/
|
|
6952
6979
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
6953
6980
|
/**
|
|
6954
6981
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6956
6983
|
*/
|
|
6957
6984
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
6958
6985
|
/**
|
|
6959
6986
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6961
6988
|
*/
|
|
6962
6989
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
6963
6990
|
/**
|
|
6964
6991
|
* Disallow unreadable array destructuring.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6966
6993
|
*/
|
|
6967
6994
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
6968
6995
|
/**
|
|
6969
6996
|
* Disallow unreadable IIFEs.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
6971
6998
|
*/
|
|
6972
6999
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
6973
7000
|
/**
|
|
6974
7001
|
* Disallow unused object properties.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
6976
7003
|
*/
|
|
6977
7004
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
7005
|
+
/**
|
|
7006
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
7008
|
+
*/
|
|
7009
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
|
|
6978
7010
|
/**
|
|
6979
7011
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6981
7013
|
*/
|
|
6982
7014
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
6983
7015
|
/**
|
|
6984
7016
|
* Disallow useless fallback when spreading in object literals.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6986
7018
|
*/
|
|
6987
7019
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
6988
7020
|
/**
|
|
6989
7021
|
* Disallow useless array length check.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
6991
7023
|
*/
|
|
6992
7024
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
6993
7025
|
/**
|
|
6994
7026
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6996
7028
|
*/
|
|
6997
7029
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
6998
7030
|
/**
|
|
6999
7031
|
* Disallow unnecessary spread.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
7001
7033
|
*/
|
|
7002
7034
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
7003
7035
|
/**
|
|
7004
7036
|
* Disallow useless case in switch statements.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
7006
7038
|
*/
|
|
7007
7039
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
7008
7040
|
/**
|
|
7009
7041
|
* Disallow useless `undefined`.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
7011
7043
|
*/
|
|
7012
7044
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
7013
7045
|
/**
|
|
7014
7046
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
7016
7048
|
*/
|
|
7017
7049
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
7018
7050
|
/**
|
|
7019
7051
|
* Enforce proper case for numeric literals.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
7021
7053
|
*/
|
|
7022
7054
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
7023
7055
|
/**
|
|
7024
7056
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
7026
7058
|
*/
|
|
7027
7059
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
7028
7060
|
/**
|
|
7029
7061
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
7031
7063
|
*/
|
|
7032
7064
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
7033
7065
|
/**
|
|
7034
7066
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
7036
7068
|
*/
|
|
7037
7069
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
7038
7070
|
/**
|
|
7039
7071
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
7041
7073
|
*/
|
|
7042
7074
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
7043
7075
|
/**
|
|
7044
7076
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
7046
7078
|
*/
|
|
7047
7079
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
7048
7080
|
/**
|
|
7049
7081
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
7051
7083
|
*/
|
|
7052
7084
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
7053
7085
|
/**
|
|
7054
7086
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
7056
7088
|
*/
|
|
7057
7089
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
7058
7090
|
/**
|
|
7059
7091
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
7061
7093
|
*/
|
|
7062
7094
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
7063
7095
|
/**
|
|
7064
7096
|
* Prefer `BigInt` literals over the constructor.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
7066
7098
|
*/
|
|
7067
7099
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
|
|
7068
7100
|
/**
|
|
7069
7101
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7071
7103
|
*/
|
|
7072
7104
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
7073
7105
|
/**
|
|
7074
7106
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
7076
7108
|
*/
|
|
7077
7109
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
7078
7110
|
/**
|
|
7079
7111
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7081
7113
|
*/
|
|
7082
7114
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
|
|
7083
7115
|
/**
|
|
7084
7116
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
7086
7118
|
*/
|
|
7087
7119
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
7088
7120
|
/**
|
|
7089
7121
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
7091
7123
|
*/
|
|
7092
7124
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
7093
7125
|
/**
|
|
7094
7126
|
* Prefer default parameters over reassignment.
|
|
7095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
7096
7128
|
*/
|
|
7097
7129
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
7098
7130
|
/**
|
|
7099
7131
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
7101
7133
|
*/
|
|
7102
7134
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
7103
7135
|
/**
|
|
7104
7136
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
7106
7138
|
*/
|
|
7107
7139
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
7108
7140
|
/**
|
|
7109
7141
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7111
7143
|
*/
|
|
7112
7144
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
7113
7145
|
/**
|
|
7114
7146
|
* Prefer `.textContent` over `.innerText`.
|
|
7115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7116
7148
|
*/
|
|
7117
7149
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
7118
7150
|
/**
|
|
7119
7151
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
7121
7153
|
*/
|
|
7122
7154
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
7123
7155
|
/**
|
|
7124
7156
|
* Prefer `export…from` when re-exporting.
|
|
7125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
7126
7158
|
*/
|
|
7127
7159
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
7128
7160
|
/**
|
|
7129
7161
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
7131
7163
|
*/
|
|
7132
7164
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
7133
7165
|
/**
|
|
7134
7166
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7136
7168
|
*/
|
|
7137
7169
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
7138
7170
|
/**
|
|
7139
7171
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
7141
7173
|
*/
|
|
7142
7174
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
7143
7175
|
/**
|
|
7144
7176
|
* Prefer reading a JSON file as a buffer.
|
|
7145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
7146
7178
|
*/
|
|
7147
7179
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
7148
7180
|
/**
|
|
7149
7181
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7151
7183
|
*/
|
|
7152
7184
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
7153
7185
|
/**
|
|
7154
7186
|
* Prefer using a logical operator over a ternary.
|
|
7155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7156
7188
|
*/
|
|
7157
7189
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
7158
7190
|
/**
|
|
7159
7191
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
7161
7193
|
*/
|
|
7162
7194
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
7163
7195
|
/**
|
|
7164
7196
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
7166
7198
|
*/
|
|
7167
7199
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
7168
7200
|
/**
|
|
7169
7201
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7171
7203
|
*/
|
|
7172
7204
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
7173
7205
|
/**
|
|
7174
7206
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7176
7208
|
*/
|
|
7177
7209
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
7178
7210
|
/**
|
|
7179
7211
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
7181
7213
|
*/
|
|
7182
7214
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
7183
7215
|
/**
|
|
7184
7216
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7186
7218
|
*/
|
|
7187
7219
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
7188
7220
|
/**
|
|
7189
7221
|
* Prefer negative index over `.length - index` when possible.
|
|
7190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
7191
7223
|
*/
|
|
7192
7224
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
7193
7225
|
/**
|
|
7194
7226
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
7196
7228
|
*/
|
|
7197
7229
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
7198
7230
|
/**
|
|
7199
7231
|
* Prefer `Number` static properties over global ones.
|
|
7200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
7201
7233
|
*/
|
|
7202
7234
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
7203
7235
|
/**
|
|
7204
7236
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
7206
7238
|
*/
|
|
7207
7239
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
7208
7240
|
/**
|
|
7209
7241
|
* Prefer omitting the `catch` binding parameter.
|
|
7210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7211
7243
|
*/
|
|
7212
7244
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
7213
7245
|
/**
|
|
7214
7246
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
7216
7248
|
*/
|
|
7217
7249
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
7218
7250
|
/**
|
|
7219
7251
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
7221
7253
|
*/
|
|
7222
7254
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
7223
7255
|
/**
|
|
7224
7256
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
7226
7258
|
*/
|
|
7227
7259
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
7228
7260
|
/**
|
|
7229
7261
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
7231
7263
|
*/
|
|
7232
7264
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
7265
|
+
/**
|
|
7266
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
7268
|
+
*/
|
|
7269
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
|
|
7233
7270
|
/**
|
|
7234
7271
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
7236
7273
|
*/
|
|
7237
7274
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
7238
7275
|
/**
|
|
7239
7276
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
7241
7278
|
*/
|
|
7242
7279
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
7243
7280
|
/**
|
|
7244
7281
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
7246
7283
|
*/
|
|
7247
7284
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
7248
7285
|
/**
|
|
7249
7286
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
7251
7288
|
*/
|
|
7252
7289
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
7253
7290
|
/**
|
|
7254
7291
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
7256
7293
|
*/
|
|
7257
7294
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
7258
7295
|
/**
|
|
7259
7296
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
7261
7298
|
*/
|
|
7262
7299
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
7263
7300
|
/**
|
|
7264
7301
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
7266
7303
|
*/
|
|
7267
7304
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
7268
7305
|
/**
|
|
7269
7306
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7271
7308
|
*/
|
|
7272
7309
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
7273
7310
|
/**
|
|
7274
7311
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7276
7313
|
*/
|
|
7277
7314
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
7278
7315
|
/**
|
|
7279
7316
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
7281
7318
|
*/
|
|
7282
7319
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
7283
7320
|
/**
|
|
7284
7321
|
* Prefer `switch` over multiple `else-if`.
|
|
7285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
7286
7323
|
*/
|
|
7287
7324
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
7288
7325
|
/**
|
|
7289
7326
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
7291
7328
|
*/
|
|
7292
7329
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
7293
7330
|
/**
|
|
7294
7331
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
7296
7333
|
*/
|
|
7297
7334
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
7298
7335
|
/**
|
|
7299
7336
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
7301
7338
|
*/
|
|
7302
7339
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
7303
7340
|
/**
|
|
7304
7341
|
* Prevent abbreviations.
|
|
7305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
7306
7343
|
*/
|
|
7307
7344
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
7308
7345
|
/**
|
|
7309
7346
|
* Enforce consistent relative URL style.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
7311
7348
|
*/
|
|
7312
7349
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
7313
7350
|
/**
|
|
7314
7351
|
* Enforce using the separator argument with `Array#join()`.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
7316
7353
|
*/
|
|
7317
7354
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
7318
7355
|
/**
|
|
7319
7356
|
* Require non-empty module attributes for imports and exports
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
7321
7358
|
*/
|
|
7322
7359
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
|
|
7323
7360
|
/**
|
|
7324
7361
|
* Require non-empty specifier list in import and export statements.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
7326
7363
|
*/
|
|
7327
7364
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
7328
7365
|
/**
|
|
7329
7366
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7331
7368
|
*/
|
|
7332
7369
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
7333
7370
|
/**
|
|
7334
7371
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
7336
7373
|
*/
|
|
7337
7374
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
7338
7375
|
/**
|
|
7339
7376
|
* Enforce better string content.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
7341
7378
|
*/
|
|
7342
7379
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
7343
7380
|
/**
|
|
7344
7381
|
* Enforce consistent brace style for `case` clauses.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
7346
7383
|
*/
|
|
7347
7384
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
7348
7385
|
/**
|
|
7349
7386
|
* Fix whitespace-insensitive template indentation.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
7351
7388
|
*/
|
|
7352
7389
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
7353
7390
|
/**
|
|
7354
7391
|
* Enforce consistent case for text encoding identifiers.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7356
7393
|
*/
|
|
7357
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
7394
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
|
|
7358
7395
|
/**
|
|
7359
7396
|
* Require `new` when creating an error.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
7361
7398
|
*/
|
|
7362
7399
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
7363
7400
|
/**
|
|
@@ -7712,6 +7749,11 @@ interface RuleOptions {
|
|
|
7712
7749
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
7713
7750
|
*/
|
|
7714
7751
|
'vitest/prefer-vi-mocked'?: Linter.RuleEntry<[]>
|
|
7752
|
+
/**
|
|
7753
|
+
* ensure that every `expect.poll` call is awaited
|
|
7754
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
|
|
7755
|
+
*/
|
|
7756
|
+
'vitest/require-awaited-expect-poll'?: Linter.RuleEntry<[]>
|
|
7715
7757
|
/**
|
|
7716
7758
|
* require setup and teardown to be within a hook
|
|
7717
7759
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
@@ -8169,6 +8211,50 @@ type StylisticCurlyNewline = []|[(("always" | "never") | {
|
|
|
8169
8211
|
type StylisticDotLocation = []|[("object" | "property")]
|
|
8170
8212
|
// ----- @stylistic/eol-last -----
|
|
8171
8213
|
type StylisticEolLast = []|[("always" | "never" | "unix" | "windows")]
|
|
8214
|
+
// ----- @stylistic/exp-list-style -----
|
|
8215
|
+
type StylisticExpListStyle = []|[{
|
|
8216
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig
|
|
8217
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig
|
|
8218
|
+
overrides?: {
|
|
8219
|
+
"[]"?: _StylisticExpListStyle_BaseConfig
|
|
8220
|
+
"{}"?: _StylisticExpListStyle_BaseConfig
|
|
8221
|
+
"<>"?: _StylisticExpListStyle_BaseConfig
|
|
8222
|
+
"()"?: _StylisticExpListStyle_BaseConfig
|
|
8223
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig
|
|
8224
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig
|
|
8225
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig
|
|
8226
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig
|
|
8227
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
8228
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
8229
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig
|
|
8230
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
8231
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig
|
|
8232
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig
|
|
8233
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig
|
|
8234
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig
|
|
8235
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig
|
|
8236
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig
|
|
8237
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig
|
|
8238
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig
|
|
8239
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig
|
|
8240
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig
|
|
8241
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
8242
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig
|
|
8243
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig
|
|
8244
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig
|
|
8245
|
+
}
|
|
8246
|
+
}]
|
|
8247
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
8248
|
+
spacing?: ("always" | "never")
|
|
8249
|
+
maxItems?: number
|
|
8250
|
+
}
|
|
8251
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
8252
|
+
minItems?: number
|
|
8253
|
+
}
|
|
8254
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
8255
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig
|
|
8256
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig
|
|
8257
|
+
}
|
|
8172
8258
|
// ----- @stylistic/function-call-argument-newline -----
|
|
8173
8259
|
type StylisticFunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
8174
8260
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -8238,7 +8324,11 @@ type StylisticIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
8238
8324
|
ObjectExpression?: (number | ("first" | "off"))
|
|
8239
8325
|
ImportDeclaration?: (number | ("first" | "off"))
|
|
8240
8326
|
flatTernaryExpressions?: boolean
|
|
8241
|
-
offsetTernaryExpressions?: boolean
|
|
8327
|
+
offsetTernaryExpressions?: (boolean | {
|
|
8328
|
+
CallExpression?: boolean
|
|
8329
|
+
AwaitExpression?: boolean
|
|
8330
|
+
NewExpression?: boolean
|
|
8331
|
+
})
|
|
8242
8332
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean
|
|
8243
8333
|
ignoredNodes?: string[]
|
|
8244
8334
|
ignoreComments?: boolean
|
|
@@ -9041,6 +9131,7 @@ type StylisticObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never
|
|
|
9041
9131
|
TSInterfaceBody?: ("always" | "never")
|
|
9042
9132
|
TSEnumBody?: ("always" | "never")
|
|
9043
9133
|
}
|
|
9134
|
+
emptyObjects?: ("ignore" | "always" | "never")
|
|
9044
9135
|
}]
|
|
9045
9136
|
// ----- @stylistic/object-property-newline -----
|
|
9046
9137
|
type StylisticObjectPropertyNewline = []|[{
|
|
@@ -10603,6 +10694,13 @@ type AstroJsxA11YScope = []|[{
|
|
|
10603
10694
|
type AstroJsxA11YTabindexNoPositive = []|[{
|
|
10604
10695
|
[k: string]: unknown | undefined
|
|
10605
10696
|
}]
|
|
10697
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
10698
|
+
type AstroNoUnsafeInlineScripts = []|[{
|
|
10699
|
+
allowDefineVars?: boolean
|
|
10700
|
+
allowModuleScripts?: boolean
|
|
10701
|
+
allowNonExecutingTypes?: string[]
|
|
10702
|
+
allowNonce?: boolean
|
|
10703
|
+
}]
|
|
10606
10704
|
// ----- astro/prefer-split-class-list -----
|
|
10607
10705
|
type AstroPreferSplitClassList = []|[{
|
|
10608
10706
|
splitLiteral?: boolean
|
|
@@ -11571,6 +11669,10 @@ type JsdocSortTags = []|[{
|
|
|
11571
11669
|
|
|
11572
11670
|
reportTagGroupSpacing?: boolean
|
|
11573
11671
|
|
|
11672
|
+
tagExceptions?: {
|
|
11673
|
+
[k: string]: number
|
|
11674
|
+
}
|
|
11675
|
+
|
|
11574
11676
|
tagSequence?: {
|
|
11575
11677
|
|
|
11576
11678
|
tags?: string[]
|
|
@@ -15717,6 +15819,10 @@ type ReactXNoForbiddenProps = []|[{
|
|
|
15717
15819
|
prop: string
|
|
15718
15820
|
})[]
|
|
15719
15821
|
}]
|
|
15822
|
+
// ----- react-x/no-unstable-default-props -----
|
|
15823
|
+
type ReactXNoUnstableDefaultProps = []|[{
|
|
15824
|
+
safeDefaultProps?: string[]
|
|
15825
|
+
}]
|
|
15720
15826
|
// ----- react-x/no-useless-fragment -----
|
|
15721
15827
|
type ReactXNoUselessFragment = []|[{
|
|
15722
15828
|
|
|
@@ -16917,6 +17023,10 @@ type UnicornTemplateIndent = []|[{
|
|
|
16917
17023
|
selectors?: string[]
|
|
16918
17024
|
comments?: string[]
|
|
16919
17025
|
}]
|
|
17026
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
17027
|
+
type UnicornTextEncodingIdentifierCase = []|[{
|
|
17028
|
+
withDash?: boolean
|
|
17029
|
+
}]
|
|
16920
17030
|
// ----- unocss/enforce-class-compile -----
|
|
16921
17031
|
type UnocssEnforceClassCompile = []|[{
|
|
16922
17032
|
prefix?: string
|
|
@@ -16960,7 +17070,8 @@ type VitestNoFocusedTests = []|[{
|
|
|
16960
17070
|
}]
|
|
16961
17071
|
// ----- vitest/no-hooks -----
|
|
16962
17072
|
type VitestNoHooks = []|[{
|
|
16963
|
-
|
|
17073
|
+
|
|
17074
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[]
|
|
16964
17075
|
}]
|
|
16965
17076
|
// ----- vitest/no-large-snapshots -----
|
|
16966
17077
|
type VitestNoLargeSnapshots = []|[{
|