@antfu/eslint-config 5.2.2 → 5.3.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/cli.js CHANGED
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
9
9
  import { execSync } from "node:child_process";
10
10
 
11
11
  //#region package.json
12
- var version = "5.2.2";
12
+ var version = "5.3.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
@@ -179,15 +179,15 @@ async function updateEslintFiles(result) {
179
179
  const versionsMap = {
180
180
  "@eslint-react/eslint-plugin": "^1.53.0",
181
181
  "@next/eslint-plugin-next": "^15.5.2",
182
- "@unocss/eslint-plugin": "^66.5.0",
182
+ "@unocss/eslint-plugin": "^66.5.1",
183
183
  "astro-eslint-parser": "^1.2.2",
184
- "eslint": "^9.34.0",
184
+ "eslint": "^9.35.0",
185
185
  "eslint-plugin-astro": "^1.3.1",
186
186
  "eslint-plugin-format": "^1.0.1",
187
187
  "eslint-plugin-react-hooks": "^5.2.0",
188
188
  "eslint-plugin-react-refresh": "^0.4.20",
189
189
  "eslint-plugin-solid": "^0.14.5",
190
- "eslint-plugin-svelte": "^3.12.1",
190
+ "eslint-plugin-svelte": "^3.12.2",
191
191
  "prettier-plugin-astro": "^0.14.1",
192
192
  "prettier-plugin-slidev": "^1.0.5",
193
193
  "svelte-eslint-parser": "^1.3.1"
package/dist/index.d.ts CHANGED
@@ -708,7 +708,7 @@ interface RuleOptions {
708
708
  * Reports invalid alignment of JSDoc block asterisks.
709
709
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
710
710
  */
711
- 'jsdoc/check-alignment'?: Linter.RuleEntry<[]>;
711
+ 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
712
712
  /**
713
713
  * Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
714
714
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
@@ -2989,6 +2989,11 @@ interface RuleOptions {
2989
2989
  * @see https://eslint.org/docs/latest/rules/prefer-template
2990
2990
  */
2991
2991
  'prefer-template'?: Linter.RuleEntry<[]>;
2992
+ /**
2993
+ * Disallow losing originally caught error when re-throwing custom errors
2994
+ * @see https://eslint.org/docs/latest/rules/preserve-caught-error
2995
+ */
2996
+ 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
2992
2997
  /**
2993
2998
  * Require quotes around object literal property names
2994
2999
  * @see https://eslint.org/docs/latest/rules/quote-props
@@ -6178,690 +6183,710 @@ interface RuleOptions {
6178
6183
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
6179
6184
  /**
6180
6185
  * Improve regexes by making them shorter, consistent, and safer.
6181
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
6186
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
6182
6187
  */
6183
6188
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
6184
6189
  /**
6185
6190
  * Enforce a specific parameter name in catch clauses.
6186
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
6191
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
6187
6192
  */
6188
6193
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
6189
6194
  /**
6190
6195
  * Enforce consistent assertion style with `node:assert`.
6191
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
6196
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
6192
6197
  */
6193
6198
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
6194
6199
  /**
6195
6200
  * Prefer passing `Date` directly to the constructor when cloning.
6196
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
6201
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
6197
6202
  */
6198
6203
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
6199
6204
  /**
6200
6205
  * Use destructured variables over properties.
6201
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
6206
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
6202
6207
  */
6203
6208
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
6204
6209
  /**
6205
6210
  * Prefer consistent types when spreading a ternary in an array literal.
6206
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
6211
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
6207
6212
  */
6208
6213
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
6209
6214
  /**
6210
6215
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
6211
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
6216
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
6212
6217
  */
6213
6218
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
6214
6219
  /**
6215
6220
  * Move function definitions to the highest possible scope.
6216
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
6221
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
6217
6222
  */
6218
6223
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
6219
6224
  /**
6220
6225
  * Enforce correct `Error` subclassing.
6221
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
6226
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
6222
6227
  */
6223
6228
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
6224
6229
  /**
6225
6230
  * Enforce no spaces between braces.
6226
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
6231
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
6227
6232
  */
6228
6233
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
6229
6234
  /**
6230
6235
  * Enforce passing a `message` value when creating a built-in error.
6231
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
6236
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
6232
6237
  */
6233
6238
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
6234
6239
  /**
6235
6240
  * Require escape sequences to use uppercase or lowercase values.
6236
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
6241
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
6237
6242
  */
6238
6243
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
6239
6244
  /**
6240
6245
  * Add expiration conditions to TODO comments.
6241
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
6246
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
6242
6247
  */
6243
6248
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
6244
6249
  /**
6245
6250
  * Enforce explicitly comparing the `length` or `size` property of a value.
6246
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
6251
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
6247
6252
  */
6248
6253
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
6249
6254
  /**
6250
6255
  * Enforce a case style for filenames.
6251
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
6256
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
6252
6257
  */
6253
6258
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
6254
6259
  /**
6255
6260
  * Enforce specific import styles per module.
6256
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
6261
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
6257
6262
  */
6258
6263
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
6259
6264
  /**
6260
6265
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
6261
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
6266
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
6262
6267
  */
6263
6268
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
6264
6269
  /**
6265
6270
  * Enforce specifying rules to disable in `eslint-disable` comments.
6266
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
6271
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
6267
6272
  */
6268
6273
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6269
6274
  /**
6270
6275
  * Disallow recursive access to `this` within getters and setters.
6271
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
6276
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
6272
6277
  */
6273
6278
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
6274
6279
  /**
6275
6280
  * Disallow anonymous functions and classes as the default export.
6276
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
6281
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
6277
6282
  */
6278
6283
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6279
6284
  /**
6280
6285
  * Prevent passing a function reference directly to iterator methods.
6281
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
6286
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
6282
6287
  */
6283
6288
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
6284
6289
  /**
6285
6290
  * Prefer `for…of` over the `forEach` method.
6286
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
6291
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
6287
6292
  */
6288
6293
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
6289
6294
  /**
6290
6295
  * Disallow using the `this` argument in array methods.
6291
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
6296
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
6292
6297
  */
6293
6298
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6294
6299
  /**
6295
6300
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6296
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
6301
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
6297
6302
  * @deprecated
6298
6303
  */
6299
6304
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6300
6305
  /**
6301
6306
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6302
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
6307
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
6303
6308
  */
6304
6309
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6305
6310
  /**
6306
6311
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6307
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
6312
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
6308
6313
  */
6309
6314
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
6315
+ /**
6316
+ * Prefer `Array#toSorted()` over `Array#sort()`.
6317
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
6318
+ */
6319
+ 'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
6310
6320
  /**
6311
6321
  * Disallow member access from await expression.
6312
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
6322
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
6313
6323
  */
6314
6324
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
6315
6325
  /**
6316
6326
  * Disallow using `await` in `Promise` method parameters.
6317
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
6327
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
6318
6328
  */
6319
6329
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
6320
6330
  /**
6321
6331
  * Do not use leading/trailing space between `console.log` parameters.
6322
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
6332
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
6323
6333
  */
6324
6334
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
6325
6335
  /**
6326
6336
  * Do not use `document.cookie` directly.
6327
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
6337
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
6328
6338
  */
6329
6339
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
6330
6340
  /**
6331
6341
  * Disallow empty files.
6332
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
6342
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
6333
6343
  */
6334
6344
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
6335
6345
  /**
6336
6346
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
6337
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
6347
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
6338
6348
  */
6339
6349
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
6340
6350
  /**
6341
6351
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
6342
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
6352
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
6343
6353
  */
6344
6354
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
6345
6355
  /**
6346
6356
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
6347
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
6357
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
6348
6358
  * @deprecated
6349
6359
  */
6350
6360
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
6351
6361
  /**
6352
6362
  * Disallow `instanceof` with built-in objects
6353
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
6363
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
6354
6364
  */
6355
6365
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
6356
6366
  /**
6357
6367
  * Disallow invalid options in `fetch()` and `new Request()`.
6358
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
6368
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
6359
6369
  */
6360
6370
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
6361
6371
  /**
6362
6372
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
6363
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
6373
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
6364
6374
  */
6365
6375
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
6366
6376
  /**
6367
6377
  * Disallow identifiers starting with `new` or `class`.
6368
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
6378
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
6369
6379
  */
6370
6380
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
6371
6381
  /**
6372
6382
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
6373
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
6383
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
6374
6384
  * @deprecated
6375
6385
  */
6376
6386
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
6377
6387
  /**
6378
6388
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
6379
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
6389
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
6380
6390
  */
6381
6391
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
6382
6392
  /**
6383
6393
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
6384
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
6394
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
6385
6395
  */
6386
6396
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
6387
6397
  /**
6388
6398
  * Disallow named usage of default import and export.
6389
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
6399
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
6390
6400
  */
6391
6401
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
6392
6402
  /**
6393
6403
  * Disallow negated conditions.
6394
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
6404
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
6395
6405
  */
6396
6406
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
6397
6407
  /**
6398
6408
  * Disallow negated expression in equality check.
6399
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
6409
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
6400
6410
  */
6401
6411
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
6402
6412
  /**
6403
6413
  * Disallow nested ternary expressions.
6404
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
6414
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
6405
6415
  */
6406
6416
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
6407
6417
  /**
6408
6418
  * Disallow `new Array()`.
6409
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
6419
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
6410
6420
  */
6411
6421
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
6412
6422
  /**
6413
6423
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
6414
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
6424
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
6415
6425
  */
6416
6426
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
6417
6427
  /**
6418
6428
  * Disallow the use of the `null` literal.
6419
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
6429
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
6420
6430
  */
6421
6431
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
6422
6432
  /**
6423
6433
  * Disallow the use of objects as default parameters.
6424
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
6434
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
6425
6435
  */
6426
6436
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
6427
6437
  /**
6428
6438
  * Disallow `process.exit()`.
6429
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
6439
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
6430
6440
  */
6431
6441
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
6432
6442
  /**
6433
6443
  * Disallow passing single-element arrays to `Promise` methods.
6434
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
6444
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
6435
6445
  */
6436
6446
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
6437
6447
  /**
6438
6448
  * Disallow classes that only have static members.
6439
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
6449
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
6440
6450
  */
6441
6451
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
6442
6452
  /**
6443
6453
  * Disallow `then` property.
6444
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
6454
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
6445
6455
  */
6446
6456
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
6447
6457
  /**
6448
6458
  * Disallow assigning `this` to a variable.
6449
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
6459
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
6450
6460
  */
6451
6461
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
6452
6462
  /**
6453
6463
  * Disallow comparing `undefined` using `typeof`.
6454
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
6464
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
6455
6465
  */
6456
6466
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
6457
6467
  /**
6458
6468
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
6459
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
6469
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
6460
6470
  */
6461
6471
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
6462
6472
  /**
6463
6473
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
6464
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
6474
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
6465
6475
  */
6466
6476
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
6467
6477
  /**
6468
6478
  * Disallow awaiting non-promise values.
6469
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
6479
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
6470
6480
  */
6471
6481
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
6472
6482
  /**
6473
6483
  * Enforce the use of built-in methods instead of unnecessary polyfills.
6474
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
6484
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
6475
6485
  */
6476
6486
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
6477
6487
  /**
6478
6488
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
6479
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
6489
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
6480
6490
  */
6481
6491
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
6482
6492
  /**
6483
6493
  * Disallow unreadable array destructuring.
6484
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
6494
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
6485
6495
  */
6486
6496
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
6487
6497
  /**
6488
6498
  * Disallow unreadable IIFEs.
6489
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
6499
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
6490
6500
  */
6491
6501
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
6492
6502
  /**
6493
6503
  * Disallow unused object properties.
6494
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
6504
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
6495
6505
  */
6496
6506
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
6497
6507
  /**
6498
6508
  * Disallow unnecessary `Error.captureStackTrace(…)`.
6499
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
6509
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
6500
6510
  */
6501
6511
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
6502
6512
  /**
6503
6513
  * Disallow useless fallback when spreading in object literals.
6504
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
6514
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
6505
6515
  */
6506
6516
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
6507
6517
  /**
6508
6518
  * Disallow useless array length check.
6509
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
6519
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
6510
6520
  */
6511
6521
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
6512
6522
  /**
6513
6523
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
6514
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
6524
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
6515
6525
  */
6516
6526
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
6517
6527
  /**
6518
6528
  * Disallow unnecessary spread.
6519
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
6529
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
6520
6530
  */
6521
6531
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
6522
6532
  /**
6523
6533
  * Disallow useless case in switch statements.
6524
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
6534
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
6525
6535
  */
6526
6536
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
6527
6537
  /**
6528
6538
  * Disallow useless `undefined`.
6529
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
6539
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
6530
6540
  */
6531
6541
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
6532
6542
  /**
6533
6543
  * Disallow number literals with zero fractions or dangling dots.
6534
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
6544
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
6535
6545
  */
6536
6546
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
6537
6547
  /**
6538
6548
  * Enforce proper case for numeric literals.
6539
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
6549
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
6540
6550
  */
6541
6551
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
6542
6552
  /**
6543
6553
  * Enforce the style of numeric separators by correctly grouping digits.
6544
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
6554
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
6545
6555
  */
6546
6556
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
6547
6557
  /**
6548
6558
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
6549
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
6559
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
6550
6560
  */
6551
6561
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
6552
6562
  /**
6553
6563
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
6554
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
6564
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
6555
6565
  */
6556
6566
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
6557
6567
  /**
6558
6568
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
6559
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
6569
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
6560
6570
  */
6561
6571
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
6562
6572
  /**
6563
6573
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
6564
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
6574
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
6565
6575
  */
6566
6576
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
6567
6577
  /**
6568
6578
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
6569
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
6579
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
6570
6580
  */
6571
6581
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
6572
6582
  /**
6573
6583
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
6574
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
6584
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
6575
6585
  */
6576
6586
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
6577
6587
  /**
6578
6588
  * Prefer `.at()` method for index access and `String#charAt()`.
6579
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
6589
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
6580
6590
  */
6581
6591
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
6592
+ /**
6593
+ * Prefer `BigInt` literals over the constructor.
6594
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
6595
+ */
6596
+ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
6582
6597
  /**
6583
6598
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
6584
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
6599
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
6585
6600
  */
6586
6601
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
6587
6602
  /**
6588
6603
  * Prefer class field declarations over `this` assignments in constructors.
6589
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
6604
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
6590
6605
  */
6591
6606
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
6607
+ /**
6608
+ * Prefer using `Element#classList.toggle()` to toggle class names.
6609
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
6610
+ */
6611
+ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
6592
6612
  /**
6593
6613
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
6594
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
6614
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
6595
6615
  */
6596
6616
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
6597
6617
  /**
6598
6618
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
6599
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
6619
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
6600
6620
  */
6601
6621
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
6602
6622
  /**
6603
6623
  * Prefer default parameters over reassignment.
6604
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
6624
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
6605
6625
  */
6606
6626
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
6607
6627
  /**
6608
6628
  * Prefer `Node#append()` over `Node#appendChild()`.
6609
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
6629
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
6610
6630
  */
6611
6631
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
6612
6632
  /**
6613
6633
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
6614
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
6634
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
6615
6635
  */
6616
6636
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
6617
6637
  /**
6618
6638
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
6619
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
6639
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
6620
6640
  */
6621
6641
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
6622
6642
  /**
6623
6643
  * Prefer `.textContent` over `.innerText`.
6624
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
6644
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
6625
6645
  */
6626
6646
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
6627
6647
  /**
6628
6648
  * Prefer `EventTarget` over `EventEmitter`.
6629
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
6649
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
6630
6650
  */
6631
6651
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
6632
6652
  /**
6633
6653
  * Prefer `export…from` when re-exporting.
6634
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
6654
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
6635
6655
  */
6636
6656
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
6637
6657
  /**
6638
6658
  * Prefer `globalThis` over `window`, `self`, and `global`.
6639
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
6659
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
6640
6660
  */
6641
6661
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
6642
6662
  /**
6643
6663
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
6644
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
6664
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
6645
6665
  */
6646
6666
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
6647
6667
  /**
6648
6668
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
6649
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
6669
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
6650
6670
  */
6651
6671
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
6652
6672
  /**
6653
6673
  * Prefer reading a JSON file as a buffer.
6654
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
6674
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
6655
6675
  */
6656
6676
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
6657
6677
  /**
6658
6678
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
6659
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
6679
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
6660
6680
  */
6661
6681
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
6662
6682
  /**
6663
6683
  * Prefer using a logical operator over a ternary.
6664
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
6684
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
6665
6685
  */
6666
6686
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
6667
6687
  /**
6668
6688
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
6669
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
6689
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
6670
6690
  */
6671
6691
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
6672
6692
  /**
6673
6693
  * Enforce the use of `Math.trunc` instead of bitwise operators.
6674
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
6694
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
6675
6695
  */
6676
6696
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
6677
6697
  /**
6678
6698
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
6679
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
6699
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
6680
6700
  */
6681
6701
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
6682
6702
  /**
6683
6703
  * Prefer modern `Math` APIs over legacy patterns.
6684
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
6704
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
6685
6705
  */
6686
6706
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
6687
6707
  /**
6688
6708
  * Prefer JavaScript modules (ESM) over CommonJS.
6689
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
6709
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
6690
6710
  */
6691
6711
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
6692
6712
  /**
6693
6713
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
6694
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
6714
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
6695
6715
  */
6696
6716
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
6697
6717
  /**
6698
6718
  * Prefer negative index over `.length - index` when possible.
6699
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
6719
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
6700
6720
  */
6701
6721
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
6702
6722
  /**
6703
6723
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
6704
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
6724
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
6705
6725
  */
6706
6726
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
6707
6727
  /**
6708
6728
  * Prefer `Number` static properties over global ones.
6709
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
6729
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
6710
6730
  */
6711
6731
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
6712
6732
  /**
6713
6733
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
6714
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
6734
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
6715
6735
  */
6716
6736
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
6717
6737
  /**
6718
6738
  * Prefer omitting the `catch` binding parameter.
6719
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
6739
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
6720
6740
  */
6721
6741
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
6722
6742
  /**
6723
6743
  * Prefer borrowing methods from the prototype instead of the instance.
6724
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
6744
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
6725
6745
  */
6726
6746
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
6727
6747
  /**
6728
6748
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
6729
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
6749
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
6730
6750
  */
6731
6751
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
6732
6752
  /**
6733
6753
  * Prefer `Reflect.apply()` over `Function#apply()`.
6734
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
6754
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
6735
6755
  */
6736
6756
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
6737
6757
  /**
6738
6758
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
6739
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
6759
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
6740
6760
  */
6741
6761
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
6742
6762
  /**
6743
6763
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
6744
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
6764
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
6745
6765
  */
6746
6766
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
6747
6767
  /**
6748
6768
  * Prefer using `Set#size` instead of `Array#length`.
6749
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
6769
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
6750
6770
  */
6751
6771
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
6752
6772
  /**
6753
6773
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
6754
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
6774
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
6755
6775
  */
6756
6776
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
6757
6777
  /**
6758
6778
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
6759
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
6779
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
6760
6780
  */
6761
6781
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
6762
6782
  /**
6763
6783
  * Prefer using the `String.raw` tag to avoid escaping `\`.
6764
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
6784
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
6765
6785
  */
6766
6786
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
6767
6787
  /**
6768
6788
  * Prefer `String#replaceAll()` over regex searches with the global flag.
6769
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
6789
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
6770
6790
  */
6771
6791
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
6772
6792
  /**
6773
6793
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
6774
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
6794
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
6775
6795
  */
6776
6796
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
6777
6797
  /**
6778
6798
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
6779
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
6799
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
6780
6800
  */
6781
6801
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
6782
6802
  /**
6783
6803
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
6784
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
6804
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
6785
6805
  */
6786
6806
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
6787
6807
  /**
6788
6808
  * Prefer using `structuredClone` to create a deep clone.
6789
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
6809
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
6790
6810
  */
6791
6811
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
6792
6812
  /**
6793
6813
  * Prefer `switch` over multiple `else-if`.
6794
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
6814
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
6795
6815
  */
6796
6816
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
6797
6817
  /**
6798
6818
  * Prefer ternary expressions over simple `if-else` statements.
6799
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
6819
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
6800
6820
  */
6801
6821
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
6802
6822
  /**
6803
6823
  * Prefer top-level await over top-level promises and async function calls.
6804
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
6824
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
6805
6825
  */
6806
6826
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
6807
6827
  /**
6808
6828
  * Enforce throwing `TypeError` in type checking conditions.
6809
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
6829
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
6810
6830
  */
6811
6831
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
6812
6832
  /**
6813
6833
  * Prevent abbreviations.
6814
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
6834
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
6815
6835
  */
6816
6836
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
6817
6837
  /**
6818
6838
  * Enforce consistent relative URL style.
6819
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
6839
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
6820
6840
  */
6821
6841
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
6822
6842
  /**
6823
6843
  * Enforce using the separator argument with `Array#join()`.
6824
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
6844
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
6825
6845
  */
6826
6846
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
6847
+ /**
6848
+ * Require non-empty module attributes for imports and exports
6849
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
6850
+ */
6851
+ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
6827
6852
  /**
6828
6853
  * Require non-empty specifier list in import and export statements.
6829
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
6854
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
6830
6855
  */
6831
6856
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
6832
6857
  /**
6833
6858
  * Enforce using the digits argument with `Number#toFixed()`.
6834
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
6859
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
6835
6860
  */
6836
6861
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
6837
6862
  /**
6838
6863
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
6839
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
6864
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
6840
6865
  */
6841
6866
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
6842
6867
  /**
6843
6868
  * Enforce better string content.
6844
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
6869
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
6845
6870
  */
6846
6871
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
6847
6872
  /**
6848
6873
  * Enforce consistent brace style for `case` clauses.
6849
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
6874
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
6850
6875
  */
6851
6876
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
6852
6877
  /**
6853
6878
  * Fix whitespace-insensitive template indentation.
6854
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
6879
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
6855
6880
  */
6856
6881
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
6857
6882
  /**
6858
6883
  * Enforce consistent case for text encoding identifiers.
6859
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
6884
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
6860
6885
  */
6861
6886
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
6862
6887
  /**
6863
6888
  * Require `new` when creating an error.
6864
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
6889
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
6865
6890
  */
6866
6891
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
6867
6892
  /**
@@ -8871,6 +8896,10 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
8871
8896
  type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
8872
8897
  ignoreForLoopInit?: boolean;
8873
8898
  }]);
8899
+ // ----- jsdoc/check-alignment -----
8900
+ type JsdocCheckAlignment = [] | [{
8901
+ innerIndent?: number;
8902
+ }];
8874
8903
  // ----- jsdoc/check-examples -----
8875
8904
  type JsdocCheckExamples = [] | [{
8876
8905
  allowInlineConfig?: boolean;
@@ -9160,6 +9189,7 @@ type JsdocRequireJsdoc = [] | [{
9160
9189
  enableFixer?: boolean;
9161
9190
  exemptEmptyConstructors?: boolean;
9162
9191
  exemptEmptyFunctions?: boolean;
9192
+ exemptOverloadedImplementations?: boolean;
9163
9193
  fixerMessage?: string;
9164
9194
  minLineCount?: number;
9165
9195
  publicOnly?: (boolean | {
@@ -9176,6 +9206,7 @@ type JsdocRequireJsdoc = [] | [{
9176
9206
  FunctionExpression?: boolean;
9177
9207
  MethodDefinition?: boolean;
9178
9208
  };
9209
+ skipInterveningOverloadedDeclarations?: boolean;
9179
9210
  }];
9180
9211
  // ----- jsdoc/require-param -----
9181
9212
  type JsdocRequireParam = [] | [{
@@ -9266,6 +9297,7 @@ type JsdocRequireReturnsType = [] | [{
9266
9297
  }];
9267
9298
  // ----- jsdoc/require-template -----
9268
9299
  type JsdocRequireTemplate = [] | [{
9300
+ exemptedBy?: string[];
9269
9301
  requireSeparateTemplates?: boolean;
9270
9302
  }];
9271
9303
  // ----- jsdoc/require-throws -----
@@ -12891,6 +12923,10 @@ type PreferReflect = [] | [{
12891
12923
  type PreferRegexLiterals = [] | [{
12892
12924
  disallowRedundantWrapping?: boolean;
12893
12925
  }];
12926
+ // ----- preserve-caught-error -----
12927
+ type PreserveCaughtError = [] | [{
12928
+ requireCatchParameter?: boolean;
12929
+ }];
12894
12930
  // ----- quote-props -----
12895
12931
  type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
12896
12932
  keywords?: boolean;
@@ -15819,6 +15855,10 @@ type UnicornNoArrayReduce = [] | [{
15819
15855
  type UnicornNoArrayReverse = [] | [{
15820
15856
  allowExpressionStatement?: boolean;
15821
15857
  }];
15858
+ // ----- unicorn/no-array-sort -----
15859
+ type UnicornNoArraySort = [] | [{
15860
+ allowExpressionStatement?: boolean;
15861
+ }];
15822
15862
  // ----- unicorn/no-instanceof-builtins -----
15823
15863
  type UnicornNoInstanceofBuiltins = [] | [{
15824
15864
  useErrorIsError?: boolean;
package/dist/index.js CHANGED
@@ -582,7 +582,7 @@ async function javascript(options = {}) {
582
582
  const { isInEditor = false, overrides = {} } = options;
583
583
  return [{
584
584
  languageOptions: {
585
- ecmaVersion: 2022,
585
+ ecmaVersion: "latest",
586
586
  globals: {
587
587
  ...globals.browser,
588
588
  ...globals.es2021,
@@ -593,7 +593,7 @@ async function javascript(options = {}) {
593
593
  },
594
594
  parserOptions: {
595
595
  ecmaFeatures: { jsx: true },
596
- ecmaVersion: 2022,
596
+ ecmaVersion: "latest",
597
597
  sourceType: "module"
598
598
  },
599
599
  sourceType: "module"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "5.2.2",
4
+ "version": "5.3.0",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -104,7 +104,7 @@
104
104
  "@stylistic/eslint-plugin": "^5.3.1",
105
105
  "@typescript-eslint/eslint-plugin": "^8.42.0",
106
106
  "@typescript-eslint/parser": "^8.42.0",
107
- "@vitest/eslint-plugin": "^1.3.8",
107
+ "@vitest/eslint-plugin": "^1.3.9",
108
108
  "ansis": "^4.1.0",
109
109
  "cac": "^6.7.14",
110
110
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -113,7 +113,7 @@
113
113
  "eslint-plugin-antfu": "^3.1.1",
114
114
  "eslint-plugin-command": "^3.3.1",
115
115
  "eslint-plugin-import-lite": "^0.3.0",
116
- "eslint-plugin-jsdoc": "^52.0.4",
116
+ "eslint-plugin-jsdoc": "^54.5.0",
117
117
  "eslint-plugin-jsonc": "^2.20.1",
118
118
  "eslint-plugin-n": "^17.21.3",
119
119
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -121,7 +121,7 @@
121
121
  "eslint-plugin-pnpm": "^1.1.1",
122
122
  "eslint-plugin-regexp": "^2.10.0",
123
123
  "eslint-plugin-toml": "^0.12.0",
124
- "eslint-plugin-unicorn": "^60.0.0",
124
+ "eslint-plugin-unicorn": "^61.0.2",
125
125
  "eslint-plugin-unused-imports": "^4.2.0",
126
126
  "eslint-plugin-vue": "^10.4.0",
127
127
  "eslint-plugin-yml": "^1.18.0",
@@ -141,18 +141,18 @@
141
141
  "@next/eslint-plugin-next": "^15.5.2",
142
142
  "@prettier/plugin-xml": "^3.4.2",
143
143
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
144
- "@types/node": "^24.3.0",
145
- "@unocss/eslint-plugin": "^66.5.0",
144
+ "@types/node": "^24.3.1",
145
+ "@unocss/eslint-plugin": "^66.5.1",
146
146
  "astro-eslint-parser": "^1.2.2",
147
147
  "bumpp": "^10.2.3",
148
- "eslint": "^9.34.0",
148
+ "eslint": "^9.35.0",
149
149
  "eslint-plugin-astro": "^1.3.1",
150
150
  "eslint-plugin-format": "^1.0.1",
151
151
  "eslint-plugin-jsx-a11y": "^6.10.2",
152
152
  "eslint-plugin-react-hooks": "^5.2.0",
153
153
  "eslint-plugin-react-refresh": "^0.4.20",
154
154
  "eslint-plugin-solid": "^0.14.5",
155
- "eslint-plugin-svelte": "^3.12.1",
155
+ "eslint-plugin-svelte": "^3.12.2",
156
156
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
157
157
  "eslint-typegen": "^2.3.0",
158
158
  "execa": "^9.6.0",
@@ -162,15 +162,15 @@
162
162
  "prettier-plugin-astro": "^0.14.1",
163
163
  "prettier-plugin-slidev": "^1.0.5",
164
164
  "simple-git-hooks": "^2.13.1",
165
- "svelte": "^5.38.6",
165
+ "svelte": "^5.38.7",
166
166
  "svelte-eslint-parser": "^1.3.1",
167
- "tinyglobby": "^0.2.14",
167
+ "tinyglobby": "^0.2.15",
168
168
  "tsdown": "^0.14.2",
169
169
  "tsx": "^4.20.5",
170
170
  "typescript": "^5.9.2",
171
171
  "vitest": "^3.2.4",
172
172
  "vue": "^3.5.21",
173
- "@antfu/eslint-config": "5.2.2"
173
+ "@antfu/eslint-config": "5.3.0"
174
174
  },
175
175
  "resolutions": {
176
176
  "eslint": "catalog:peer"