@jimmy.codes/eslint-config 6.8.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
@@ -3006,7 +2935,7 @@ interface RuleOptions {
3006
2935
  * Reports invalid alignment of JSDoc block asterisks.
3007
2936
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
3008
2937
  */
3009
- 'jsdoc/check-alignment'?: Linter.RuleEntry<[]>;
2938
+ 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
3010
2939
  /**
3011
2940
  * Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
3012
2941
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
@@ -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
@@ -5122,6 +5071,11 @@ interface RuleOptions {
5122
5071
  * @see https://eslint.org/docs/latest/rules/prefer-template
5123
5072
  */
5124
5073
  'prefer-template'?: Linter.RuleEntry<[]>;
5074
+ /**
5075
+ * Disallow losing originally caught error when re-throwing custom errors
5076
+ * @see https://eslint.org/docs/latest/rules/preserve-caught-error
5077
+ */
5078
+ 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
5125
5079
  /**
5126
5080
  * Require quotes around object literal property names
5127
5081
  * @see https://eslint.org/docs/latest/rules/quote-props
@@ -5909,690 +5863,710 @@ interface RuleOptions {
5909
5863
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
5910
5864
  /**
5911
5865
  * Improve regexes by making them shorter, consistent, and safer.
5912
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
5866
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
5913
5867
  */
5914
5868
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
5915
5869
  /**
5916
5870
  * Enforce a specific parameter name in catch clauses.
5917
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
5871
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
5918
5872
  */
5919
5873
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
5920
5874
  /**
5921
5875
  * Enforce consistent assertion style with `node:assert`.
5922
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
5876
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
5923
5877
  */
5924
5878
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
5925
5879
  /**
5926
5880
  * Prefer passing `Date` directly to the constructor when cloning.
5927
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
5881
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
5928
5882
  */
5929
5883
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
5930
5884
  /**
5931
5885
  * Use destructured variables over properties.
5932
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
5886
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
5933
5887
  */
5934
5888
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
5935
5889
  /**
5936
5890
  * Prefer consistent types when spreading a ternary in an array literal.
5937
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
5891
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
5938
5892
  */
5939
5893
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
5940
5894
  /**
5941
5895
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
5942
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
5896
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
5943
5897
  */
5944
5898
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
5945
5899
  /**
5946
5900
  * Move function definitions to the highest possible scope.
5947
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
5901
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
5948
5902
  */
5949
5903
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
5950
5904
  /**
5951
5905
  * Enforce correct `Error` subclassing.
5952
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
5906
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
5953
5907
  */
5954
5908
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
5955
5909
  /**
5956
5910
  * Enforce no spaces between braces.
5957
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
5911
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
5958
5912
  */
5959
5913
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
5960
5914
  /**
5961
5915
  * Enforce passing a `message` value when creating a built-in error.
5962
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
5916
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
5963
5917
  */
5964
5918
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
5965
5919
  /**
5966
5920
  * Require escape sequences to use uppercase or lowercase values.
5967
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
5921
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
5968
5922
  */
5969
5923
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
5970
5924
  /**
5971
5925
  * Add expiration conditions to TODO comments.
5972
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
5926
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
5973
5927
  */
5974
5928
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
5975
5929
  /**
5976
5930
  * Enforce explicitly comparing the `length` or `size` property of a value.
5977
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
5931
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
5978
5932
  */
5979
5933
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
5980
5934
  /**
5981
5935
  * Enforce a case style for filenames.
5982
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
5936
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
5983
5937
  */
5984
5938
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
5985
5939
  /**
5986
5940
  * Enforce specific import styles per module.
5987
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
5941
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
5988
5942
  */
5989
5943
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
5990
5944
  /**
5991
5945
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
5992
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
5946
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
5993
5947
  */
5994
5948
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
5995
5949
  /**
5996
5950
  * Enforce specifying rules to disable in `eslint-disable` comments.
5997
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
5951
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
5998
5952
  */
5999
5953
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6000
5954
  /**
6001
5955
  * Disallow recursive access to `this` within getters and setters.
6002
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
5956
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
6003
5957
  */
6004
5958
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
6005
5959
  /**
6006
5960
  * Disallow anonymous functions and classes as the default export.
6007
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
5961
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
6008
5962
  */
6009
5963
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6010
5964
  /**
6011
5965
  * Prevent passing a function reference directly to iterator methods.
6012
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
5966
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
6013
5967
  */
6014
5968
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
6015
5969
  /**
6016
5970
  * Prefer `for…of` over the `forEach` method.
6017
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
5971
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
6018
5972
  */
6019
5973
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
6020
5974
  /**
6021
5975
  * Disallow using the `this` argument in array methods.
6022
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
5976
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
6023
5977
  */
6024
5978
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6025
5979
  /**
6026
5980
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6027
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
5981
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
6028
5982
  * @deprecated
6029
5983
  */
6030
5984
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6031
5985
  /**
6032
5986
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6033
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
5987
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
6034
5988
  */
6035
5989
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6036
5990
  /**
6037
5991
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6038
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
5992
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
6039
5993
  */
6040
5994
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
5995
+ /**
5996
+ * Prefer `Array#toSorted()` over `Array#sort()`.
5997
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
5998
+ */
5999
+ 'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
6041
6000
  /**
6042
6001
  * Disallow member access from await expression.
6043
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
6002
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
6044
6003
  */
6045
6004
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
6046
6005
  /**
6047
6006
  * Disallow using `await` in `Promise` method parameters.
6048
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
6007
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
6049
6008
  */
6050
6009
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
6051
6010
  /**
6052
6011
  * Do not use leading/trailing space between `console.log` parameters.
6053
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
6012
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
6054
6013
  */
6055
6014
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
6056
6015
  /**
6057
6016
  * Do not use `document.cookie` directly.
6058
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
6017
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
6059
6018
  */
6060
6019
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
6061
6020
  /**
6062
6021
  * Disallow empty files.
6063
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
6022
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
6064
6023
  */
6065
6024
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
6066
6025
  /**
6067
6026
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
6068
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
6027
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
6069
6028
  */
6070
6029
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
6071
6030
  /**
6072
6031
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
6073
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
6032
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
6074
6033
  */
6075
6034
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
6076
6035
  /**
6077
6036
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
6078
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
6037
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
6079
6038
  * @deprecated
6080
6039
  */
6081
6040
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
6082
6041
  /**
6083
6042
  * Disallow `instanceof` with built-in objects
6084
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
6043
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
6085
6044
  */
6086
6045
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
6087
6046
  /**
6088
6047
  * Disallow invalid options in `fetch()` and `new Request()`.
6089
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
6048
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
6090
6049
  */
6091
6050
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
6092
6051
  /**
6093
6052
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
6094
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
6053
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
6095
6054
  */
6096
6055
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
6097
6056
  /**
6098
6057
  * Disallow identifiers starting with `new` or `class`.
6099
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
6058
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
6100
6059
  */
6101
6060
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
6102
6061
  /**
6103
6062
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
6104
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
6063
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
6105
6064
  * @deprecated
6106
6065
  */
6107
6066
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
6108
6067
  /**
6109
6068
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
6110
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
6069
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
6111
6070
  */
6112
6071
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
6113
6072
  /**
6114
6073
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
6115
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
6074
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
6116
6075
  */
6117
6076
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
6118
6077
  /**
6119
6078
  * Disallow named usage of default import and export.
6120
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
6079
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
6121
6080
  */
6122
6081
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
6123
6082
  /**
6124
6083
  * Disallow negated conditions.
6125
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
6084
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
6126
6085
  */
6127
6086
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
6128
6087
  /**
6129
6088
  * Disallow negated expression in equality check.
6130
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
6089
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
6131
6090
  */
6132
6091
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
6133
6092
  /**
6134
6093
  * Disallow nested ternary expressions.
6135
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
6094
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
6136
6095
  */
6137
6096
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
6138
6097
  /**
6139
6098
  * Disallow `new Array()`.
6140
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
6099
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
6141
6100
  */
6142
6101
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
6143
6102
  /**
6144
6103
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
6145
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
6104
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
6146
6105
  */
6147
6106
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
6148
6107
  /**
6149
6108
  * Disallow the use of the `null` literal.
6150
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
6109
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
6151
6110
  */
6152
6111
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
6153
6112
  /**
6154
6113
  * Disallow the use of objects as default parameters.
6155
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
6114
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
6156
6115
  */
6157
6116
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
6158
6117
  /**
6159
6118
  * Disallow `process.exit()`.
6160
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
6119
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
6161
6120
  */
6162
6121
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
6163
6122
  /**
6164
6123
  * Disallow passing single-element arrays to `Promise` methods.
6165
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
6124
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
6166
6125
  */
6167
6126
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
6168
6127
  /**
6169
6128
  * Disallow classes that only have static members.
6170
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
6129
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
6171
6130
  */
6172
6131
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
6173
6132
  /**
6174
6133
  * Disallow `then` property.
6175
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
6134
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
6176
6135
  */
6177
6136
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
6178
6137
  /**
6179
6138
  * Disallow assigning `this` to a variable.
6180
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
6139
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
6181
6140
  */
6182
6141
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
6183
6142
  /**
6184
6143
  * Disallow comparing `undefined` using `typeof`.
6185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
6144
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
6186
6145
  */
6187
6146
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
6188
6147
  /**
6189
6148
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
6190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
6149
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
6191
6150
  */
6192
6151
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
6193
6152
  /**
6194
6153
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
6195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
6154
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
6196
6155
  */
6197
6156
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
6198
6157
  /**
6199
6158
  * Disallow awaiting non-promise values.
6200
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
6159
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
6201
6160
  */
6202
6161
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
6203
6162
  /**
6204
6163
  * Enforce the use of built-in methods instead of unnecessary polyfills.
6205
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
6164
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
6206
6165
  */
6207
6166
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
6208
6167
  /**
6209
6168
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
6210
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
6169
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
6211
6170
  */
6212
6171
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
6213
6172
  /**
6214
6173
  * Disallow unreadable array destructuring.
6215
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
6174
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
6216
6175
  */
6217
6176
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
6218
6177
  /**
6219
6178
  * Disallow unreadable IIFEs.
6220
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
6179
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
6221
6180
  */
6222
6181
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
6223
6182
  /**
6224
6183
  * Disallow unused object properties.
6225
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
6184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
6226
6185
  */
6227
6186
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
6228
6187
  /**
6229
6188
  * Disallow unnecessary `Error.captureStackTrace(…)`.
6230
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
6189
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
6231
6190
  */
6232
6191
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
6233
6192
  /**
6234
6193
  * Disallow useless fallback when spreading in object literals.
6235
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
6194
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
6236
6195
  */
6237
6196
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
6238
6197
  /**
6239
6198
  * Disallow useless array length check.
6240
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
6199
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
6241
6200
  */
6242
6201
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
6243
6202
  /**
6244
6203
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
6245
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
6204
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
6246
6205
  */
6247
6206
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
6248
6207
  /**
6249
6208
  * Disallow unnecessary spread.
6250
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
6209
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
6251
6210
  */
6252
6211
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
6253
6212
  /**
6254
6213
  * Disallow useless case in switch statements.
6255
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
6214
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
6256
6215
  */
6257
6216
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
6258
6217
  /**
6259
6218
  * Disallow useless `undefined`.
6260
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
6219
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
6261
6220
  */
6262
6221
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
6263
6222
  /**
6264
6223
  * Disallow number literals with zero fractions or dangling dots.
6265
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
6224
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
6266
6225
  */
6267
6226
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
6268
6227
  /**
6269
6228
  * Enforce proper case for numeric literals.
6270
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
6229
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
6271
6230
  */
6272
6231
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
6273
6232
  /**
6274
6233
  * Enforce the style of numeric separators by correctly grouping digits.
6275
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
6234
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
6276
6235
  */
6277
6236
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
6278
6237
  /**
6279
6238
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
6280
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
6239
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
6281
6240
  */
6282
6241
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
6283
6242
  /**
6284
6243
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
6285
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
6244
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
6286
6245
  */
6287
6246
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
6288
6247
  /**
6289
6248
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
6290
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
6249
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
6291
6250
  */
6292
6251
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
6293
6252
  /**
6294
6253
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
6295
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
6254
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
6296
6255
  */
6297
6256
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
6298
6257
  /**
6299
6258
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
6300
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
6259
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
6301
6260
  */
6302
6261
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
6303
6262
  /**
6304
6263
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
6305
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
6264
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
6306
6265
  */
6307
6266
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
6308
6267
  /**
6309
6268
  * Prefer `.at()` method for index access and `String#charAt()`.
6310
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
6269
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
6311
6270
  */
6312
6271
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
6272
+ /**
6273
+ * Prefer `BigInt` literals over the constructor.
6274
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
6275
+ */
6276
+ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
6313
6277
  /**
6314
6278
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
6315
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
6279
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
6316
6280
  */
6317
6281
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
6318
6282
  /**
6319
6283
  * Prefer class field declarations over `this` assignments in constructors.
6320
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
6284
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
6321
6285
  */
6322
6286
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
6287
+ /**
6288
+ * Prefer using `Element#classList.toggle()` to toggle class names.
6289
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
6290
+ */
6291
+ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
6323
6292
  /**
6324
6293
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
6325
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
6294
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
6326
6295
  */
6327
6296
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
6328
6297
  /**
6329
6298
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
6330
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
6299
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
6331
6300
  */
6332
6301
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
6333
6302
  /**
6334
6303
  * Prefer default parameters over reassignment.
6335
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
6304
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
6336
6305
  */
6337
6306
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
6338
6307
  /**
6339
6308
  * Prefer `Node#append()` over `Node#appendChild()`.
6340
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
6309
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
6341
6310
  */
6342
6311
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
6343
6312
  /**
6344
6313
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
6345
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
6314
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
6346
6315
  */
6347
6316
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
6348
6317
  /**
6349
6318
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
6350
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
6319
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
6351
6320
  */
6352
6321
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
6353
6322
  /**
6354
6323
  * Prefer `.textContent` over `.innerText`.
6355
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
6324
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
6356
6325
  */
6357
6326
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
6358
6327
  /**
6359
6328
  * Prefer `EventTarget` over `EventEmitter`.
6360
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
6329
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
6361
6330
  */
6362
6331
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
6363
6332
  /**
6364
6333
  * Prefer `export…from` when re-exporting.
6365
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
6334
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
6366
6335
  */
6367
6336
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
6368
6337
  /**
6369
6338
  * Prefer `globalThis` over `window`, `self`, and `global`.
6370
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
6339
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
6371
6340
  */
6372
6341
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
6373
6342
  /**
6374
6343
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
6375
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
6344
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
6376
6345
  */
6377
6346
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
6378
6347
  /**
6379
6348
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
6380
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
6349
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
6381
6350
  */
6382
6351
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
6383
6352
  /**
6384
6353
  * Prefer reading a JSON file as a buffer.
6385
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
6354
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
6386
6355
  */
6387
6356
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
6388
6357
  /**
6389
6358
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
6390
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
6359
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
6391
6360
  */
6392
6361
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
6393
6362
  /**
6394
6363
  * Prefer using a logical operator over a ternary.
6395
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
6364
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
6396
6365
  */
6397
6366
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
6398
6367
  /**
6399
6368
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
6400
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
6369
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
6401
6370
  */
6402
6371
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
6403
6372
  /**
6404
6373
  * Enforce the use of `Math.trunc` instead of bitwise operators.
6405
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
6374
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
6406
6375
  */
6407
6376
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
6408
6377
  /**
6409
6378
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
6410
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
6379
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
6411
6380
  */
6412
6381
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
6413
6382
  /**
6414
6383
  * Prefer modern `Math` APIs over legacy patterns.
6415
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
6384
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
6416
6385
  */
6417
6386
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
6418
6387
  /**
6419
6388
  * Prefer JavaScript modules (ESM) over CommonJS.
6420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
6389
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
6421
6390
  */
6422
6391
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
6423
6392
  /**
6424
6393
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
6425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
6394
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
6426
6395
  */
6427
6396
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
6428
6397
  /**
6429
6398
  * Prefer negative index over `.length - index` when possible.
6430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
6399
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
6431
6400
  */
6432
6401
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
6433
6402
  /**
6434
6403
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
6435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
6404
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
6436
6405
  */
6437
6406
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
6438
6407
  /**
6439
6408
  * Prefer `Number` static properties over global ones.
6440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
6409
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
6441
6410
  */
6442
6411
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
6443
6412
  /**
6444
6413
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
6445
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
6414
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
6446
6415
  */
6447
6416
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
6448
6417
  /**
6449
6418
  * Prefer omitting the `catch` binding parameter.
6450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
6419
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
6451
6420
  */
6452
6421
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
6453
6422
  /**
6454
6423
  * Prefer borrowing methods from the prototype instead of the instance.
6455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
6424
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
6456
6425
  */
6457
6426
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
6458
6427
  /**
6459
6428
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
6460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
6429
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
6461
6430
  */
6462
6431
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
6463
6432
  /**
6464
6433
  * Prefer `Reflect.apply()` over `Function#apply()`.
6465
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
6434
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
6466
6435
  */
6467
6436
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
6468
6437
  /**
6469
6438
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
6470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
6439
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
6471
6440
  */
6472
6441
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
6473
6442
  /**
6474
6443
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
6475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
6444
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
6476
6445
  */
6477
6446
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
6478
6447
  /**
6479
6448
  * Prefer using `Set#size` instead of `Array#length`.
6480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
6449
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
6481
6450
  */
6482
6451
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
6483
6452
  /**
6484
6453
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
6485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
6454
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
6486
6455
  */
6487
6456
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
6488
6457
  /**
6489
6458
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
6490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
6459
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
6491
6460
  */
6492
6461
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
6493
6462
  /**
6494
6463
  * Prefer using the `String.raw` tag to avoid escaping `\`.
6495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
6464
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
6496
6465
  */
6497
6466
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
6498
6467
  /**
6499
6468
  * Prefer `String#replaceAll()` over regex searches with the global flag.
6500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
6469
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
6501
6470
  */
6502
6471
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
6503
6472
  /**
6504
6473
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
6505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
6474
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
6506
6475
  */
6507
6476
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
6508
6477
  /**
6509
6478
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
6510
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
6479
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
6511
6480
  */
6512
6481
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
6513
6482
  /**
6514
6483
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
6515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
6484
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
6516
6485
  */
6517
6486
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
6518
6487
  /**
6519
6488
  * Prefer using `structuredClone` to create a deep clone.
6520
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
6489
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
6521
6490
  */
6522
6491
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
6523
6492
  /**
6524
6493
  * Prefer `switch` over multiple `else-if`.
6525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
6494
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
6526
6495
  */
6527
6496
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
6528
6497
  /**
6529
6498
  * Prefer ternary expressions over simple `if-else` statements.
6530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
6499
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
6531
6500
  */
6532
6501
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
6533
6502
  /**
6534
6503
  * Prefer top-level await over top-level promises and async function calls.
6535
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
6504
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
6536
6505
  */
6537
6506
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
6538
6507
  /**
6539
6508
  * Enforce throwing `TypeError` in type checking conditions.
6540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
6509
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
6541
6510
  */
6542
6511
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
6543
6512
  /**
6544
6513
  * Prevent abbreviations.
6545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
6514
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
6546
6515
  */
6547
6516
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
6548
6517
  /**
6549
6518
  * Enforce consistent relative URL style.
6550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
6519
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
6551
6520
  */
6552
6521
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
6553
6522
  /**
6554
6523
  * Enforce using the separator argument with `Array#join()`.
6555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
6524
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
6556
6525
  */
6557
6526
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
6527
+ /**
6528
+ * Require non-empty module attributes for imports and exports
6529
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
6530
+ */
6531
+ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
6558
6532
  /**
6559
6533
  * Require non-empty specifier list in import and export statements.
6560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
6534
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
6561
6535
  */
6562
6536
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
6563
6537
  /**
6564
6538
  * Enforce using the digits argument with `Number#toFixed()`.
6565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
6539
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
6566
6540
  */
6567
6541
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
6568
6542
  /**
6569
6543
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
6570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
6544
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
6571
6545
  */
6572
6546
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
6573
6547
  /**
6574
6548
  * Enforce better string content.
6575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
6549
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
6576
6550
  */
6577
6551
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
6578
6552
  /**
6579
6553
  * Enforce consistent brace style for `case` clauses.
6580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
6554
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
6581
6555
  */
6582
6556
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
6583
6557
  /**
6584
6558
  * Fix whitespace-insensitive template indentation.
6585
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
6559
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
6586
6560
  */
6587
6561
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
6588
6562
  /**
6589
6563
  * Enforce consistent case for text encoding identifiers.
6590
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
6564
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
6591
6565
  */
6592
6566
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
6593
6567
  /**
6594
6568
  * Require `new` when creating an error.
6595
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
6569
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
6596
6570
  */
6597
6571
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
6598
6572
  /**
@@ -7000,7 +6974,6 @@ interface RuleOptions {
7000
6974
  */
7001
6975
  'yoda'?: Linter.RuleEntry<Yoda>;
7002
6976
  }
7003
-
7004
6977
  /* ======= Declarations ======= */
7005
6978
  // ----- @eslint-community/eslint-comments/disable-enable-pair -----
7006
6979
  type EslintCommunityEslintCommentsDisableEnablePair = [] | [{
@@ -10004,6 +9977,10 @@ type JestValidTitle = [] | [{
10004
9977
  [k: string]: (string | [string] | [string, string]) | undefined;
10005
9978
  });
10006
9979
  }];
9980
+ // ----- jsdoc/check-alignment -----
9981
+ type JsdocCheckAlignment = [] | [{
9982
+ innerIndent?: number;
9983
+ }];
10007
9984
  // ----- jsdoc/check-examples -----
10008
9985
  type JsdocCheckExamples = [] | [{
10009
9986
  allowInlineConfig?: boolean;
@@ -10293,6 +10270,7 @@ type JsdocRequireJsdoc = [] | [{
10293
10270
  enableFixer?: boolean;
10294
10271
  exemptEmptyConstructors?: boolean;
10295
10272
  exemptEmptyFunctions?: boolean;
10273
+ exemptOverloadedImplementations?: boolean;
10296
10274
  fixerMessage?: string;
10297
10275
  minLineCount?: number;
10298
10276
  publicOnly?: (boolean | {
@@ -10309,6 +10287,7 @@ type JsdocRequireJsdoc = [] | [{
10309
10287
  FunctionExpression?: boolean;
10310
10288
  MethodDefinition?: boolean;
10311
10289
  };
10290
+ skipInterveningOverloadedDeclarations?: boolean;
10312
10291
  }];
10313
10292
  // ----- jsdoc/require-param -----
10314
10293
  type JsdocRequireParam = [] | [{
@@ -10461,6 +10440,21 @@ type JsdocTextEscaping = [] | [{
10461
10440
  escapeHTML?: boolean;
10462
10441
  escapeMarkdown?: boolean;
10463
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
+ }];
10464
10458
  // ----- jsdoc/valid-types -----
10465
10459
  type JsdocValidTypes = [] | [{
10466
10460
  allowEmptyNamepaths?: boolean;
@@ -13783,6 +13777,10 @@ type PreferReflect = [] | [{
13783
13777
  type PreferRegexLiterals = [] | [{
13784
13778
  disallowRedundantWrapping?: boolean;
13785
13779
  }];
13780
+ // ----- preserve-caught-error -----
13781
+ type PreserveCaughtError = [] | [{
13782
+ requireCatchParameter?: boolean;
13783
+ }];
13786
13784
  // ----- quote-props -----
13787
13785
  type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
13788
13786
  keywords?: boolean;
@@ -14168,6 +14166,10 @@ type UnicornNoArrayReduce = [] | [{
14168
14166
  type UnicornNoArrayReverse = [] | [{
14169
14167
  allowExpressionStatement?: boolean;
14170
14168
  }];
14169
+ // ----- unicorn/no-array-sort -----
14170
+ type UnicornNoArraySort = [] | [{
14171
+ allowExpressionStatement?: boolean;
14172
+ }];
14171
14173
  // ----- unicorn/no-instanceof-builtins -----
14172
14174
  type UnicornNoInstanceofBuiltins = [] | [{
14173
14175
  useErrorIsError?: boolean;
package/dist/index.js CHANGED
@@ -164,6 +164,7 @@ const additionalRules = {
164
164
  "prefer-rest-params": "error",
165
165
  "prefer-spread": "error",
166
166
  "prefer-template": "error",
167
+ "preserve-caught-error": "error",
167
168
  "radix": "error",
168
169
  "require-await": "error",
169
170
  "strict": ["error", "safe"],
@@ -478,13 +479,13 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
478
479
  ];
479
480
  const featureConfigs = await Promise.all([
480
481
  isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
481
- isReactEnabled && unwrap(import("./react-DD9VDtyi.js")),
482
+ isReactEnabled && unwrap(import("./react-ChUgu27j.js")),
482
483
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
483
484
  isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
484
485
  isJestEnabled && unwrap(import("./jest-G-dRTY_j.js")),
485
- isVitestEnabled && unwrap(import("./vitest-C38KvCT7.js")),
486
+ isVitestEnabled && unwrap(import("./vitest-Bl4MomP6.js")),
486
487
  isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
487
- isPlaywrightEnabled && unwrap(import("./playwright-ywSmTTAR.js")),
488
+ isPlaywrightEnabled && unwrap(import("./playwright-Bbcb5Jsi.js")),
488
489
  isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
489
490
  isNextjsEnabled && unwrap(import("./nextjs-X6g9xH_I.js"))
490
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
- ...playwrightPlugin.configs["flat/recommended"].rules,
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
- ...playwrightPlugin.configs["flat/recommended"],
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 isUsingTypesScript = hasTypescript();
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
- ...vitestPlugin.configs.recommended.rules,
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.8.0",
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,15 +40,15 @@
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.166",
44
- "@eslint/js": "^9.34.0",
45
- "@next/eslint-plugin-next": "^15.5.2",
43
+ "@eslint-react/eslint-plugin": "2.0.0-next.181",
44
+ "@eslint/js": "^9.35.0",
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.42.0",
50
- "@typescript-eslint/utils": "^8.42.0",
51
- "@vitest/eslint-plugin": "^1.3.8",
49
+ "@typescript-eslint/parser": "^8.43.0",
50
+ "@typescript-eslint/utils": "^8.43.0",
51
+ "@vitest/eslint-plugin": "^1.3.9",
52
52
  "astro-eslint-parser": "^1.2.2",
53
53
  "eslint-config-flat-gitignore": "^2.1.0",
54
54
  "eslint-config-prettier": "^10.1.8",
@@ -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": "^54.3.1",
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.6.8",
71
- "eslint-plugin-unicorn": "^60.0.0",
72
- "globals": "^16.3.0",
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.42.0"
74
+ "typescript-eslint": "^8.43.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "eslint": "^9.10.0"