@jimmy.codes/eslint-config 6.9.0 → 6.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -48,18 +48,6 @@ interface RuleOptions {
|
|
|
48
48
|
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
|
|
49
49
|
*/
|
|
50
50
|
'@eslint-community/eslint-comments/require-description'?: Linter.RuleEntry<EslintCommunityEslintCommentsRequireDescription>;
|
|
51
|
-
/**
|
|
52
|
-
* Enforces explicit boolean values for boolean attributes.
|
|
53
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
54
|
-
* @deprecated
|
|
55
|
-
*/
|
|
56
|
-
'@eslint-react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
57
|
-
/**
|
|
58
|
-
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
59
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
60
|
-
* @deprecated
|
|
61
|
-
*/
|
|
62
|
-
'@eslint-react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>;
|
|
63
51
|
/**
|
|
64
52
|
* Disallow `dangerouslySetInnerHTML`.
|
|
65
53
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
@@ -150,35 +138,6 @@ interface RuleOptions {
|
|
|
150
138
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
151
139
|
*/
|
|
152
140
|
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
153
|
-
/**
|
|
154
|
-
* Disallow direct calls to the `set` function of `useState` in `useLayoutEffect`.
|
|
155
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
156
|
-
*/
|
|
157
|
-
'@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>;
|
|
158
|
-
/**
|
|
159
|
-
* Disallow unnecessary usage of `useCallback`.
|
|
160
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
161
|
-
* @deprecated
|
|
162
|
-
*/
|
|
163
|
-
'@eslint-react/hooks-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
164
|
-
/**
|
|
165
|
-
* Disallow unnecessary usage of `useMemo`.
|
|
166
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
167
|
-
* @deprecated
|
|
168
|
-
*/
|
|
169
|
-
'@eslint-react/hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
170
|
-
/**
|
|
171
|
-
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
172
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
173
|
-
* @deprecated
|
|
174
|
-
*/
|
|
175
|
-
'@eslint-react/hooks-extra/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
176
|
-
/**
|
|
177
|
-
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
178
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
179
|
-
* @deprecated
|
|
180
|
-
*/
|
|
181
|
-
'@eslint-react/hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
|
|
182
141
|
/**
|
|
183
142
|
* Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.
|
|
184
143
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -299,18 +258,6 @@ interface RuleOptions {
|
|
|
299
258
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
300
259
|
*/
|
|
301
260
|
'@eslint-react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
302
|
-
/**
|
|
303
|
-
* Prevents comments from being inserted as text nodes.
|
|
304
|
-
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
305
|
-
* @deprecated
|
|
306
|
-
*/
|
|
307
|
-
'@eslint-react/no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
308
|
-
/**
|
|
309
|
-
* Disallow complex conditional rendering in JSX expressions.
|
|
310
|
-
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
311
|
-
* @deprecated
|
|
312
|
-
*/
|
|
313
|
-
'@eslint-react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
314
261
|
/**
|
|
315
262
|
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
316
263
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
@@ -516,29 +463,11 @@ interface RuleOptions {
|
|
|
516
463
|
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
517
464
|
*/
|
|
518
465
|
'@eslint-react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
519
|
-
/**
|
|
520
|
-
* Enforces React is imported via a namespace import.
|
|
521
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
|
|
522
|
-
* @deprecated
|
|
523
|
-
*/
|
|
524
|
-
'@eslint-react/prefer-react-namespace-import'?: Linter.RuleEntry<[]>;
|
|
525
466
|
/**
|
|
526
467
|
* Enforces read-only props in components.
|
|
527
468
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
528
469
|
*/
|
|
529
470
|
'@eslint-react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
|
|
530
|
-
/**
|
|
531
|
-
* Enforces shorthand syntax for boolean attributes.
|
|
532
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
533
|
-
* @deprecated
|
|
534
|
-
*/
|
|
535
|
-
'@eslint-react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
536
|
-
/**
|
|
537
|
-
* Enforces shorthand syntax for fragments.
|
|
538
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
539
|
-
* @deprecated
|
|
540
|
-
*/
|
|
541
|
-
'@eslint-react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>;
|
|
542
471
|
/**
|
|
543
472
|
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
544
473
|
* @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
|
|
@@ -3182,6 +3111,11 @@ interface RuleOptions {
|
|
|
3182
3111
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header
|
|
3183
3112
|
*/
|
|
3184
3113
|
'jsdoc/require-jsdoc'?: Linter.RuleEntry<JsdocRequireJsdoc>;
|
|
3114
|
+
/**
|
|
3115
|
+
* Requires a type for @next tags
|
|
3116
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header
|
|
3117
|
+
*/
|
|
3118
|
+
'jsdoc/require-next-type'?: Linter.RuleEntry<[]>;
|
|
3185
3119
|
/**
|
|
3186
3120
|
* Requires that all function parameters are documented.
|
|
3187
3121
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header
|
|
@@ -3252,6 +3186,11 @@ interface RuleOptions {
|
|
|
3252
3186
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
3253
3187
|
*/
|
|
3254
3188
|
'jsdoc/require-throws'?: Linter.RuleEntry<JsdocRequireThrows>;
|
|
3189
|
+
/**
|
|
3190
|
+
* Requires a type for @throws tags
|
|
3191
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header
|
|
3192
|
+
*/
|
|
3193
|
+
'jsdoc/require-throws-type'?: Linter.RuleEntry<[]>;
|
|
3255
3194
|
/**
|
|
3256
3195
|
* Requires yields are documented.
|
|
3257
3196
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header
|
|
@@ -3262,6 +3201,11 @@ interface RuleOptions {
|
|
|
3262
3201
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header
|
|
3263
3202
|
*/
|
|
3264
3203
|
'jsdoc/require-yields-check'?: Linter.RuleEntry<JsdocRequireYieldsCheck>;
|
|
3204
|
+
/**
|
|
3205
|
+
* Requires a type for @yields tags
|
|
3206
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header
|
|
3207
|
+
*/
|
|
3208
|
+
'jsdoc/require-yields-type'?: Linter.RuleEntry<[]>;
|
|
3265
3209
|
/**
|
|
3266
3210
|
* Sorts tags by a specified sequence according to tag name.
|
|
3267
3211
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header
|
|
@@ -3277,6 +3221,11 @@ interface RuleOptions {
|
|
|
3277
3221
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
3278
3222
|
*/
|
|
3279
3223
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
3224
|
+
/**
|
|
3225
|
+
* Formats JSDoc type values.
|
|
3226
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
3227
|
+
*/
|
|
3228
|
+
'jsdoc/type-formatting'?: Linter.RuleEntry<JsdocTypeFormatting>;
|
|
3280
3229
|
/**
|
|
3281
3230
|
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
|
|
3282
3231
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
@@ -5914,710 +5863,710 @@ interface RuleOptions {
|
|
|
5914
5863
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5915
5864
|
/**
|
|
5916
5865
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
5918
5867
|
*/
|
|
5919
5868
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5920
5869
|
/**
|
|
5921
5870
|
* Enforce a specific parameter name in catch clauses.
|
|
5922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
5923
5872
|
*/
|
|
5924
5873
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5925
5874
|
/**
|
|
5926
5875
|
* Enforce consistent assertion style with `node:assert`.
|
|
5927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
5928
5877
|
*/
|
|
5929
5878
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5930
5879
|
/**
|
|
5931
5880
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
5933
5882
|
*/
|
|
5934
5883
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5935
5884
|
/**
|
|
5936
5885
|
* Use destructured variables over properties.
|
|
5937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
5938
5887
|
*/
|
|
5939
5888
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5940
5889
|
/**
|
|
5941
5890
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
5943
5892
|
*/
|
|
5944
5893
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5945
5894
|
/**
|
|
5946
5895
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
5948
5897
|
*/
|
|
5949
5898
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5950
5899
|
/**
|
|
5951
5900
|
* Move function definitions to the highest possible scope.
|
|
5952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
5953
5902
|
*/
|
|
5954
5903
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5955
5904
|
/**
|
|
5956
5905
|
* Enforce correct `Error` subclassing.
|
|
5957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
5958
5907
|
*/
|
|
5959
5908
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5960
5909
|
/**
|
|
5961
5910
|
* Enforce no spaces between braces.
|
|
5962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
5963
5912
|
*/
|
|
5964
5913
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5965
5914
|
/**
|
|
5966
5915
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
5968
5917
|
*/
|
|
5969
5918
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5970
5919
|
/**
|
|
5971
5920
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
5973
5922
|
*/
|
|
5974
5923
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5975
5924
|
/**
|
|
5976
5925
|
* Add expiration conditions to TODO comments.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
5978
5927
|
*/
|
|
5979
5928
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5980
5929
|
/**
|
|
5981
5930
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
5983
5932
|
*/
|
|
5984
5933
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5985
5934
|
/**
|
|
5986
5935
|
* Enforce a case style for filenames.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
5988
5937
|
*/
|
|
5989
5938
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5990
5939
|
/**
|
|
5991
5940
|
* Enforce specific import styles per module.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
5993
5942
|
*/
|
|
5994
5943
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5995
5944
|
/**
|
|
5996
5945
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
5998
5947
|
*/
|
|
5999
5948
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6000
5949
|
/**
|
|
6001
5950
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
6003
5952
|
*/
|
|
6004
5953
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6005
5954
|
/**
|
|
6006
5955
|
* Disallow recursive access to `this` within getters and setters.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
6008
5957
|
*/
|
|
6009
5958
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6010
5959
|
/**
|
|
6011
5960
|
* Disallow anonymous functions and classes as the default export.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
6013
5962
|
*/
|
|
6014
5963
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6015
5964
|
/**
|
|
6016
5965
|
* Prevent passing a function reference directly to iterator methods.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
6018
5967
|
*/
|
|
6019
5968
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6020
5969
|
/**
|
|
6021
5970
|
* Prefer `for…of` over the `forEach` method.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
6023
5972
|
*/
|
|
6024
5973
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6025
5974
|
/**
|
|
6026
5975
|
* Disallow using the `this` argument in array methods.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
6028
5977
|
*/
|
|
6029
5978
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6030
5979
|
/**
|
|
6031
5980
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
6033
5982
|
* @deprecated
|
|
6034
5983
|
*/
|
|
6035
5984
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6036
5985
|
/**
|
|
6037
5986
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
6039
5988
|
*/
|
|
6040
5989
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6041
5990
|
/**
|
|
6042
5991
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
6044
5993
|
*/
|
|
6045
5994
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6046
5995
|
/**
|
|
6047
5996
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6048
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
5997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
6049
5998
|
*/
|
|
6050
5999
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6051
6000
|
/**
|
|
6052
6001
|
* Disallow member access from await expression.
|
|
6053
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
6054
6003
|
*/
|
|
6055
6004
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6056
6005
|
/**
|
|
6057
6006
|
* Disallow using `await` in `Promise` method parameters.
|
|
6058
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
6059
6008
|
*/
|
|
6060
6009
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6061
6010
|
/**
|
|
6062
6011
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
6064
6013
|
*/
|
|
6065
6014
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6066
6015
|
/**
|
|
6067
6016
|
* Do not use `document.cookie` directly.
|
|
6068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
6069
6018
|
*/
|
|
6070
6019
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6071
6020
|
/**
|
|
6072
6021
|
* Disallow empty files.
|
|
6073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
6074
6023
|
*/
|
|
6075
6024
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6076
6025
|
/**
|
|
6077
6026
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
6079
6028
|
*/
|
|
6080
6029
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6081
6030
|
/**
|
|
6082
6031
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
6084
6033
|
*/
|
|
6085
6034
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6086
6035
|
/**
|
|
6087
6036
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
6089
6038
|
* @deprecated
|
|
6090
6039
|
*/
|
|
6091
6040
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6092
6041
|
/**
|
|
6093
6042
|
* Disallow `instanceof` with built-in objects
|
|
6094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
6095
6044
|
*/
|
|
6096
6045
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6097
6046
|
/**
|
|
6098
6047
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
6100
6049
|
*/
|
|
6101
6050
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6102
6051
|
/**
|
|
6103
6052
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
6105
6054
|
*/
|
|
6106
6055
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6107
6056
|
/**
|
|
6108
6057
|
* Disallow identifiers starting with `new` or `class`.
|
|
6109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
6110
6059
|
*/
|
|
6111
6060
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6112
6061
|
/**
|
|
6113
6062
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6115
6064
|
* @deprecated
|
|
6116
6065
|
*/
|
|
6117
6066
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6118
6067
|
/**
|
|
6119
6068
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
6121
6070
|
*/
|
|
6122
6071
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6123
6072
|
/**
|
|
6124
6073
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
6126
6075
|
*/
|
|
6127
6076
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6128
6077
|
/**
|
|
6129
6078
|
* Disallow named usage of default import and export.
|
|
6130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
6131
6080
|
*/
|
|
6132
6081
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6133
6082
|
/**
|
|
6134
6083
|
* Disallow negated conditions.
|
|
6135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
6136
6085
|
*/
|
|
6137
6086
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6138
6087
|
/**
|
|
6139
6088
|
* Disallow negated expression in equality check.
|
|
6140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
6141
6090
|
*/
|
|
6142
6091
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6143
6092
|
/**
|
|
6144
6093
|
* Disallow nested ternary expressions.
|
|
6145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
6146
6095
|
*/
|
|
6147
6096
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6148
6097
|
/**
|
|
6149
6098
|
* Disallow `new Array()`.
|
|
6150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
6151
6100
|
*/
|
|
6152
6101
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6153
6102
|
/**
|
|
6154
6103
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
6156
6105
|
*/
|
|
6157
6106
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6158
6107
|
/**
|
|
6159
6108
|
* Disallow the use of the `null` literal.
|
|
6160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
6161
6110
|
*/
|
|
6162
6111
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6163
6112
|
/**
|
|
6164
6113
|
* Disallow the use of objects as default parameters.
|
|
6165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
6166
6115
|
*/
|
|
6167
6116
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6168
6117
|
/**
|
|
6169
6118
|
* Disallow `process.exit()`.
|
|
6170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
6171
6120
|
*/
|
|
6172
6121
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6173
6122
|
/**
|
|
6174
6123
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
6176
6125
|
*/
|
|
6177
6126
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6178
6127
|
/**
|
|
6179
6128
|
* Disallow classes that only have static members.
|
|
6180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
6181
6130
|
*/
|
|
6182
6131
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6183
6132
|
/**
|
|
6184
6133
|
* Disallow `then` property.
|
|
6185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
6186
6135
|
*/
|
|
6187
6136
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6188
6137
|
/**
|
|
6189
6138
|
* Disallow assigning `this` to a variable.
|
|
6190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
6191
6140
|
*/
|
|
6192
6141
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6193
6142
|
/**
|
|
6194
6143
|
* Disallow comparing `undefined` using `typeof`.
|
|
6195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
6196
6145
|
*/
|
|
6197
6146
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6198
6147
|
/**
|
|
6199
6148
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6201
6150
|
*/
|
|
6202
6151
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6203
6152
|
/**
|
|
6204
6153
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
6206
6155
|
*/
|
|
6207
6156
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6208
6157
|
/**
|
|
6209
6158
|
* Disallow awaiting non-promise values.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
6211
6160
|
*/
|
|
6212
6161
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6213
6162
|
/**
|
|
6214
6163
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
6216
6165
|
*/
|
|
6217
6166
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6218
6167
|
/**
|
|
6219
6168
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
6221
6170
|
*/
|
|
6222
6171
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6223
6172
|
/**
|
|
6224
6173
|
* Disallow unreadable array destructuring.
|
|
6225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
6226
6175
|
*/
|
|
6227
6176
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6228
6177
|
/**
|
|
6229
6178
|
* Disallow unreadable IIFEs.
|
|
6230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
6231
6180
|
*/
|
|
6232
6181
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6233
6182
|
/**
|
|
6234
6183
|
* Disallow unused object properties.
|
|
6235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
6236
6185
|
*/
|
|
6237
6186
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6238
6187
|
/**
|
|
6239
6188
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6241
6190
|
*/
|
|
6242
6191
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6243
6192
|
/**
|
|
6244
6193
|
* Disallow useless fallback when spreading in object literals.
|
|
6245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
6246
6195
|
*/
|
|
6247
6196
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6248
6197
|
/**
|
|
6249
6198
|
* Disallow useless array length check.
|
|
6250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
6251
6200
|
*/
|
|
6252
6201
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6253
6202
|
/**
|
|
6254
6203
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
6256
6205
|
*/
|
|
6257
6206
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6258
6207
|
/**
|
|
6259
6208
|
* Disallow unnecessary spread.
|
|
6260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
6261
6210
|
*/
|
|
6262
6211
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6263
6212
|
/**
|
|
6264
6213
|
* Disallow useless case in switch statements.
|
|
6265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
6266
6215
|
*/
|
|
6267
6216
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6268
6217
|
/**
|
|
6269
6218
|
* Disallow useless `undefined`.
|
|
6270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
6271
6220
|
*/
|
|
6272
6221
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6273
6222
|
/**
|
|
6274
6223
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
6276
6225
|
*/
|
|
6277
6226
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6278
6227
|
/**
|
|
6279
6228
|
* Enforce proper case for numeric literals.
|
|
6280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
6281
6230
|
*/
|
|
6282
6231
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6283
6232
|
/**
|
|
6284
6233
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
6286
6235
|
*/
|
|
6287
6236
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6288
6237
|
/**
|
|
6289
6238
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
6291
6240
|
*/
|
|
6292
6241
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6293
6242
|
/**
|
|
6294
6243
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
6296
6245
|
*/
|
|
6297
6246
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6298
6247
|
/**
|
|
6299
6248
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
6301
6250
|
*/
|
|
6302
6251
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6303
6252
|
/**
|
|
6304
6253
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
6306
6255
|
*/
|
|
6307
6256
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6308
6257
|
/**
|
|
6309
6258
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
6311
6260
|
*/
|
|
6312
6261
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6313
6262
|
/**
|
|
6314
6263
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
6316
6265
|
*/
|
|
6317
6266
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6318
6267
|
/**
|
|
6319
6268
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
6321
6270
|
*/
|
|
6322
6271
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6323
6272
|
/**
|
|
6324
6273
|
* Prefer `BigInt` literals over the constructor.
|
|
6325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
6326
6275
|
*/
|
|
6327
6276
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6328
6277
|
/**
|
|
6329
6278
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
6331
6280
|
*/
|
|
6332
6281
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6333
6282
|
/**
|
|
6334
6283
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
6336
6285
|
*/
|
|
6337
6286
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6338
6287
|
/**
|
|
6339
6288
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
6341
6290
|
*/
|
|
6342
6291
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6343
6292
|
/**
|
|
6344
6293
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
6346
6295
|
*/
|
|
6347
6296
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6348
6297
|
/**
|
|
6349
6298
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
6351
6300
|
*/
|
|
6352
6301
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6353
6302
|
/**
|
|
6354
6303
|
* Prefer default parameters over reassignment.
|
|
6355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
6356
6305
|
*/
|
|
6357
6306
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6358
6307
|
/**
|
|
6359
6308
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
6361
6310
|
*/
|
|
6362
6311
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6363
6312
|
/**
|
|
6364
6313
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
6366
6315
|
*/
|
|
6367
6316
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6368
6317
|
/**
|
|
6369
6318
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
6371
6320
|
*/
|
|
6372
6321
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6373
6322
|
/**
|
|
6374
6323
|
* Prefer `.textContent` over `.innerText`.
|
|
6375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
6376
6325
|
*/
|
|
6377
6326
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6378
6327
|
/**
|
|
6379
6328
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
6381
6330
|
*/
|
|
6382
6331
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6383
6332
|
/**
|
|
6384
6333
|
* Prefer `export…from` when re-exporting.
|
|
6385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
6386
6335
|
*/
|
|
6387
6336
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6388
6337
|
/**
|
|
6389
6338
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
6391
6340
|
*/
|
|
6392
6341
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6393
6342
|
/**
|
|
6394
6343
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
6396
6345
|
*/
|
|
6397
6346
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6398
6347
|
/**
|
|
6399
6348
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
6401
6350
|
*/
|
|
6402
6351
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6403
6352
|
/**
|
|
6404
6353
|
* Prefer reading a JSON file as a buffer.
|
|
6405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
6406
6355
|
*/
|
|
6407
6356
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6408
6357
|
/**
|
|
6409
6358
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
6411
6360
|
*/
|
|
6412
6361
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6413
6362
|
/**
|
|
6414
6363
|
* Prefer using a logical operator over a ternary.
|
|
6415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6416
6365
|
*/
|
|
6417
6366
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6418
6367
|
/**
|
|
6419
6368
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
6421
6370
|
*/
|
|
6422
6371
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6423
6372
|
/**
|
|
6424
6373
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
6426
6375
|
*/
|
|
6427
6376
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6428
6377
|
/**
|
|
6429
6378
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
6431
6380
|
*/
|
|
6432
6381
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6433
6382
|
/**
|
|
6434
6383
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
6436
6385
|
*/
|
|
6437
6386
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6438
6387
|
/**
|
|
6439
6388
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
6441
6390
|
*/
|
|
6442
6391
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6443
6392
|
/**
|
|
6444
6393
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
6446
6395
|
*/
|
|
6447
6396
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6448
6397
|
/**
|
|
6449
6398
|
* Prefer negative index over `.length - index` when possible.
|
|
6450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
6451
6400
|
*/
|
|
6452
6401
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6453
6402
|
/**
|
|
6454
6403
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
6456
6405
|
*/
|
|
6457
6406
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6458
6407
|
/**
|
|
6459
6408
|
* Prefer `Number` static properties over global ones.
|
|
6460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
6461
6410
|
*/
|
|
6462
6411
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6463
6412
|
/**
|
|
6464
6413
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
6466
6415
|
*/
|
|
6467
6416
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6468
6417
|
/**
|
|
6469
6418
|
* Prefer omitting the `catch` binding parameter.
|
|
6470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
6471
6420
|
*/
|
|
6472
6421
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6473
6422
|
/**
|
|
6474
6423
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
6476
6425
|
*/
|
|
6477
6426
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6478
6427
|
/**
|
|
6479
6428
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
6481
6430
|
*/
|
|
6482
6431
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6483
6432
|
/**
|
|
6484
6433
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
6486
6435
|
*/
|
|
6487
6436
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6488
6437
|
/**
|
|
6489
6438
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
6491
6440
|
*/
|
|
6492
6441
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6493
6442
|
/**
|
|
6494
6443
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
6496
6445
|
*/
|
|
6497
6446
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6498
6447
|
/**
|
|
6499
6448
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
6501
6450
|
*/
|
|
6502
6451
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6503
6452
|
/**
|
|
6504
6453
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
6506
6455
|
*/
|
|
6507
6456
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6508
6457
|
/**
|
|
6509
6458
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
6511
6460
|
*/
|
|
6512
6461
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6513
6462
|
/**
|
|
6514
6463
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
6516
6465
|
*/
|
|
6517
6466
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6518
6467
|
/**
|
|
6519
6468
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
6521
6470
|
*/
|
|
6522
6471
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6523
6472
|
/**
|
|
6524
6473
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
6526
6475
|
*/
|
|
6527
6476
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6528
6477
|
/**
|
|
6529
6478
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
6531
6480
|
*/
|
|
6532
6481
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6533
6482
|
/**
|
|
6534
6483
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
6536
6485
|
*/
|
|
6537
6486
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6538
6487
|
/**
|
|
6539
6488
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
6541
6490
|
*/
|
|
6542
6491
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6543
6492
|
/**
|
|
6544
6493
|
* Prefer `switch` over multiple `else-if`.
|
|
6545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
6546
6495
|
*/
|
|
6547
6496
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6548
6497
|
/**
|
|
6549
6498
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
6551
6500
|
*/
|
|
6552
6501
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6553
6502
|
/**
|
|
6554
6503
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
6556
6505
|
*/
|
|
6557
6506
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6558
6507
|
/**
|
|
6559
6508
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
6561
6510
|
*/
|
|
6562
6511
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6563
6512
|
/**
|
|
6564
6513
|
* Prevent abbreviations.
|
|
6565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
6566
6515
|
*/
|
|
6567
6516
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6568
6517
|
/**
|
|
6569
6518
|
* Enforce consistent relative URL style.
|
|
6570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
6571
6520
|
*/
|
|
6572
6521
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6573
6522
|
/**
|
|
6574
6523
|
* Enforce using the separator argument with `Array#join()`.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
6576
6525
|
*/
|
|
6577
6526
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6578
6527
|
/**
|
|
6579
6528
|
* Require non-empty module attributes for imports and exports
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
6581
6530
|
*/
|
|
6582
6531
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6583
6532
|
/**
|
|
6584
6533
|
* Require non-empty specifier list in import and export statements.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
6586
6535
|
*/
|
|
6587
6536
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6588
6537
|
/**
|
|
6589
6538
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6591
6540
|
*/
|
|
6592
6541
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6593
6542
|
/**
|
|
6594
6543
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
6596
6545
|
*/
|
|
6597
6546
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6598
6547
|
/**
|
|
6599
6548
|
* Enforce better string content.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
6601
6550
|
*/
|
|
6602
6551
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6603
6552
|
/**
|
|
6604
6553
|
* Enforce consistent brace style for `case` clauses.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
6606
6555
|
*/
|
|
6607
6556
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6608
6557
|
/**
|
|
6609
6558
|
* Fix whitespace-insensitive template indentation.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
6611
6560
|
*/
|
|
6612
6561
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6613
6562
|
/**
|
|
6614
6563
|
* Enforce consistent case for text encoding identifiers.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
6616
6565
|
*/
|
|
6617
6566
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
6618
6567
|
/**
|
|
6619
6568
|
* Require `new` when creating an error.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.
|
|
6569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
6621
6570
|
*/
|
|
6622
6571
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6623
6572
|
/**
|
|
@@ -7025,7 +6974,6 @@ interface RuleOptions {
|
|
|
7025
6974
|
*/
|
|
7026
6975
|
'yoda'?: Linter.RuleEntry<Yoda>;
|
|
7027
6976
|
}
|
|
7028
|
-
|
|
7029
6977
|
/* ======= Declarations ======= */
|
|
7030
6978
|
// ----- @eslint-community/eslint-comments/disable-enable-pair -----
|
|
7031
6979
|
type EslintCommunityEslintCommentsDisableEnablePair = [] | [{
|
|
@@ -10322,6 +10270,7 @@ type JsdocRequireJsdoc = [] | [{
|
|
|
10322
10270
|
enableFixer?: boolean;
|
|
10323
10271
|
exemptEmptyConstructors?: boolean;
|
|
10324
10272
|
exemptEmptyFunctions?: boolean;
|
|
10273
|
+
exemptOverloadedImplementations?: boolean;
|
|
10325
10274
|
fixerMessage?: string;
|
|
10326
10275
|
minLineCount?: number;
|
|
10327
10276
|
publicOnly?: (boolean | {
|
|
@@ -10338,6 +10287,7 @@ type JsdocRequireJsdoc = [] | [{
|
|
|
10338
10287
|
FunctionExpression?: boolean;
|
|
10339
10288
|
MethodDefinition?: boolean;
|
|
10340
10289
|
};
|
|
10290
|
+
skipInterveningOverloadedDeclarations?: boolean;
|
|
10341
10291
|
}];
|
|
10342
10292
|
// ----- jsdoc/require-param -----
|
|
10343
10293
|
type JsdocRequireParam = [] | [{
|
|
@@ -10490,6 +10440,21 @@ type JsdocTextEscaping = [] | [{
|
|
|
10490
10440
|
escapeHTML?: boolean;
|
|
10491
10441
|
escapeMarkdown?: boolean;
|
|
10492
10442
|
}];
|
|
10443
|
+
// ----- jsdoc/type-formatting -----
|
|
10444
|
+
type JsdocTypeFormatting = [] | [{
|
|
10445
|
+
arrayBrackets?: ("angle" | "square");
|
|
10446
|
+
enableFixer?: boolean;
|
|
10447
|
+
genericDot?: boolean;
|
|
10448
|
+
objectFieldIndent?: string;
|
|
10449
|
+
objectFieldQuote?: ("double" | "single" | null);
|
|
10450
|
+
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
10451
|
+
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
10452
|
+
propertyQuotes?: ("double" | "single" | null);
|
|
10453
|
+
separatorForSingleObjectField?: boolean;
|
|
10454
|
+
stringQuotes?: ("double" | "single");
|
|
10455
|
+
typeBracketSpacing?: string;
|
|
10456
|
+
unionSpacing?: string;
|
|
10457
|
+
}];
|
|
10493
10458
|
// ----- jsdoc/valid-types -----
|
|
10494
10459
|
type JsdocValidTypes = [] | [{
|
|
10495
10460
|
allowEmptyNamepaths?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -479,13 +479,13 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
479
479
|
];
|
|
480
480
|
const featureConfigs = await Promise.all([
|
|
481
481
|
isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
|
|
482
|
-
isReactEnabled && unwrap(import("./react-
|
|
482
|
+
isReactEnabled && unwrap(import("./react-ChUgu27j.js")),
|
|
483
483
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
|
|
484
484
|
isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
|
|
485
485
|
isJestEnabled && unwrap(import("./jest-G-dRTY_j.js")),
|
|
486
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
486
|
+
isVitestEnabled && unwrap(import("./vitest-Bl4MomP6.js")),
|
|
487
487
|
isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
|
|
488
|
-
isPlaywrightEnabled && unwrap(import("./playwright-
|
|
488
|
+
isPlaywrightEnabled && unwrap(import("./playwright-Bbcb5Jsi.js")),
|
|
489
489
|
isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
|
|
490
490
|
isNextjsEnabled && unwrap(import("./nextjs-X6g9xH_I.js"))
|
|
491
491
|
]);
|
|
@@ -3,11 +3,11 @@ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
|
|
|
3
3
|
|
|
4
4
|
//#region src/rules/playwright.ts
|
|
5
5
|
const playwrightRules = async () => {
|
|
6
|
-
const playwrightPlugin = await interopDefault(import("eslint-plugin-playwright"));
|
|
7
6
|
return {
|
|
8
|
-
...
|
|
7
|
+
...(await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"].rules,
|
|
9
8
|
"playwright/expect-expect": "error",
|
|
10
9
|
"playwright/max-nested-describe": "error",
|
|
10
|
+
"playwright/no-commented-out-tests": "error",
|
|
11
11
|
"playwright/no-conditional-expect": "error",
|
|
12
12
|
"playwright/no-conditional-in-test": "error",
|
|
13
13
|
"playwright/no-element-handle": "error",
|
|
@@ -34,9 +34,8 @@ const playwrightRules = async () => {
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/configs/playwright.ts
|
|
36
36
|
async function playwrightConfig() {
|
|
37
|
-
const playwrightPlugin = await interopDefault(import("eslint-plugin-playwright"));
|
|
38
37
|
return [{
|
|
39
|
-
...
|
|
38
|
+
...(await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"],
|
|
40
39
|
files: GLOB_PLAYWRIGHT,
|
|
41
40
|
name: "jimmy.codes/playwright",
|
|
42
41
|
rules: await playwrightRules()
|
|
@@ -24,14 +24,12 @@ const reactRules = async () => {
|
|
|
24
24
|
const [{ configs: reactConfigs }, jsxA11yPlugin] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-jsx-a11y"))]);
|
|
25
25
|
const isUsingNextjs = hasNext();
|
|
26
26
|
const isUsingVite = hasVite();
|
|
27
|
-
const
|
|
28
|
-
const reactPluginRules = isUsingTypesScript ? reactConfigs["recommended-type-checked"].rules : reactConfigs.recommended.rules;
|
|
27
|
+
const reactPluginRules = hasTypescript() ? reactConfigs["recommended-type-checked"].rules : reactConfigs.recommended.rules;
|
|
29
28
|
return {
|
|
30
29
|
...jsxA11yPlugin.flatConfigs.recommended.rules,
|
|
31
30
|
...upwarn(reactPluginRules),
|
|
32
31
|
"@eslint-react/dom/no-string-style-prop": "error",
|
|
33
32
|
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
34
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
35
33
|
"@eslint-react/jsx-key-before-spread": "error",
|
|
36
34
|
"@eslint-react/jsx-shorthand-boolean": "error",
|
|
37
35
|
"@eslint-react/jsx-shorthand-fragment": "error",
|
|
@@ -3,9 +3,8 @@ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
|
|
|
3
3
|
|
|
4
4
|
//#region src/rules/vitest.ts
|
|
5
5
|
const vitestRules = async () => {
|
|
6
|
-
const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
|
|
7
6
|
return {
|
|
8
|
-
...
|
|
7
|
+
...(await interopDefault(import("@vitest/eslint-plugin"))).configs.recommended.rules,
|
|
9
8
|
"vitest/consistent-test-it": ["error", {
|
|
10
9
|
fn: "test",
|
|
11
10
|
withinDescribe: "it"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
|
-
"@eslint-react/eslint-plugin": "2.0.0-next.
|
|
43
|
+
"@eslint-react/eslint-plugin": "2.0.0-next.181",
|
|
44
44
|
"@eslint/js": "^9.35.0",
|
|
45
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
45
|
+
"@next/eslint-plugin-next": "^15.5.3",
|
|
46
46
|
"@stylistic/eslint-plugin": "^5.3.1",
|
|
47
47
|
"@tanstack/eslint-plugin-query": "^5.86.0",
|
|
48
48
|
"@types/eslint": "9.6.1",
|
|
49
|
-
"@typescript-eslint/parser": "^8.
|
|
50
|
-
"@typescript-eslint/utils": "^8.
|
|
49
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
50
|
+
"@typescript-eslint/utils": "^8.43.0",
|
|
51
51
|
"@vitest/eslint-plugin": "^1.3.9",
|
|
52
52
|
"astro-eslint-parser": "^1.2.2",
|
|
53
53
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"eslint-plugin-import-x": "^4.16.1",
|
|
58
58
|
"eslint-plugin-jest": "^29.0.1",
|
|
59
59
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
60
|
-
"eslint-plugin-jsdoc": "^
|
|
60
|
+
"eslint-plugin-jsdoc": "^57.0.3",
|
|
61
61
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
62
62
|
"eslint-plugin-n": "^17.21.3",
|
|
63
63
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"eslint-plugin-react-refresh": "0.4.20",
|
|
68
68
|
"eslint-plugin-regexp": "^2.10.0",
|
|
69
69
|
"eslint-plugin-storybook": "0.12.0",
|
|
70
|
-
"eslint-plugin-testing-library": "^7.
|
|
71
|
-
"eslint-plugin-unicorn": "^61.0.
|
|
72
|
-
"globals": "^16.
|
|
70
|
+
"eslint-plugin-testing-library": "^7.7.0",
|
|
71
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
72
|
+
"globals": "^16.4.0",
|
|
73
73
|
"local-pkg": "^1.1.2",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typescript-eslint": "^8.43.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"eslint": "^9.10.0"
|