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