@vinicunca/eslint-config 3.23.0 → 3.24.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
@@ -716,7 +716,7 @@ interface RuleOptions {
716
716
  * Reports invalid alignment of JSDoc block asterisks.
717
717
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
718
718
  */
719
- 'jsdoc/check-alignment'?: Linter.RuleEntry<[]>;
719
+ 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
720
720
  /**
721
721
  * Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
722
722
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
@@ -2695,6 +2695,11 @@ interface RuleOptions {
2695
2695
  * @see https://eslint.org/docs/latest/rules/prefer-template
2696
2696
  */
2697
2697
  'prefer-template'?: Linter.RuleEntry<[]>;
2698
+ /**
2699
+ * Disallow losing originally caught error when re-throwing custom errors
2700
+ * @see https://eslint.org/docs/latest/rules/preserve-caught-error
2701
+ */
2702
+ 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
2698
2703
  /**
2699
2704
  * Require quotes around object literal property names
2700
2705
  * @see https://eslint.org/docs/latest/rules/quote-props
@@ -5363,8 +5368,9 @@ interface RuleOptions {
5363
5368
  */
5364
5369
  'style/jsx-pascal-case'?: Linter.RuleEntry<StyleJsxPascalCase>;
5365
5370
  /**
5366
- * Disallow multiple spaces between inline JSX props
5371
+ * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead.
5367
5372
  * @see https://eslint.style/rules/jsx-props-no-multi-spaces
5373
+ * @deprecated
5368
5374
  */
5369
5375
  'style/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>;
5370
5376
  /**
@@ -6093,6 +6099,11 @@ interface RuleOptions {
6093
6099
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
6094
6100
  */
6095
6101
  'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>;
6102
+ /**
6103
+ * enforce hoisted APIs to be on top of the file
6104
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
6105
+ */
6106
+ 'test/hoisted-apis-on-top'?: Linter.RuleEntry<[]>;
6096
6107
  /**
6097
6108
  * enforce a maximum number of expect per test
6098
6109
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -6299,6 +6310,11 @@ interface RuleOptions {
6299
6310
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
6300
6311
  */
6301
6312
  'test/prefer-expect-resolves'?: Linter.RuleEntry<[]>;
6313
+ /**
6314
+ * enforce using `expectTypeOf` instead of `expect(typeof ...)`
6315
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
6316
+ */
6317
+ 'test/prefer-expect-type-of'?: Linter.RuleEntry<[]>;
6302
6318
  /**
6303
6319
  * enforce having hooks in consistent order
6304
6320
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
@@ -7214,690 +7230,710 @@ interface RuleOptions {
7214
7230
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
7215
7231
  /**
7216
7232
  * Improve regexes by making them shorter, consistent, and safer.
7217
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
7233
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
7218
7234
  */
7219
7235
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
7220
7236
  /**
7221
7237
  * Enforce a specific parameter name in catch clauses.
7222
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
7238
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
7223
7239
  */
7224
7240
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
7225
7241
  /**
7226
7242
  * Enforce consistent assertion style with `node:assert`.
7227
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
7243
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
7228
7244
  */
7229
7245
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
7230
7246
  /**
7231
7247
  * Prefer passing `Date` directly to the constructor when cloning.
7232
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
7248
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
7233
7249
  */
7234
7250
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
7235
7251
  /**
7236
7252
  * Use destructured variables over properties.
7237
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
7253
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
7238
7254
  */
7239
7255
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
7240
7256
  /**
7241
7257
  * Prefer consistent types when spreading a ternary in an array literal.
7242
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
7258
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
7243
7259
  */
7244
7260
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
7245
7261
  /**
7246
7262
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
7247
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
7263
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
7248
7264
  */
7249
7265
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
7250
7266
  /**
7251
7267
  * Move function definitions to the highest possible scope.
7252
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
7268
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
7253
7269
  */
7254
7270
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
7255
7271
  /**
7256
7272
  * Enforce correct `Error` subclassing.
7257
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
7273
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
7258
7274
  */
7259
7275
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
7260
7276
  /**
7261
7277
  * Enforce no spaces between braces.
7262
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
7278
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
7263
7279
  */
7264
7280
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
7265
7281
  /**
7266
7282
  * Enforce passing a `message` value when creating a built-in error.
7267
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
7283
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
7268
7284
  */
7269
7285
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
7270
7286
  /**
7271
7287
  * Require escape sequences to use uppercase or lowercase values.
7272
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
7288
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
7273
7289
  */
7274
7290
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
7275
7291
  /**
7276
7292
  * Add expiration conditions to TODO comments.
7277
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
7293
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
7278
7294
  */
7279
7295
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
7280
7296
  /**
7281
7297
  * Enforce explicitly comparing the `length` or `size` property of a value.
7282
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
7298
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
7283
7299
  */
7284
7300
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
7285
7301
  /**
7286
7302
  * Enforce a case style for filenames.
7287
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
7303
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
7288
7304
  */
7289
7305
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
7290
7306
  /**
7291
7307
  * Enforce specific import styles per module.
7292
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
7308
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
7293
7309
  */
7294
7310
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
7295
7311
  /**
7296
7312
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
7297
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
7313
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
7298
7314
  */
7299
7315
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
7300
7316
  /**
7301
7317
  * Enforce specifying rules to disable in `eslint-disable` comments.
7302
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
7318
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
7303
7319
  */
7304
7320
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
7305
7321
  /**
7306
7322
  * Disallow recursive access to `this` within getters and setters.
7307
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
7323
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
7308
7324
  */
7309
7325
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
7310
7326
  /**
7311
7327
  * Disallow anonymous functions and classes as the default export.
7312
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
7328
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
7313
7329
  */
7314
7330
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
7315
7331
  /**
7316
7332
  * Prevent passing a function reference directly to iterator methods.
7317
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
7333
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
7318
7334
  */
7319
7335
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
7320
7336
  /**
7321
7337
  * Prefer `for…of` over the `forEach` method.
7322
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
7338
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
7323
7339
  */
7324
7340
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
7325
7341
  /**
7326
7342
  * Disallow using the `this` argument in array methods.
7327
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
7343
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
7328
7344
  */
7329
7345
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
7330
7346
  /**
7331
7347
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
7332
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
7348
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
7333
7349
  * @deprecated
7334
7350
  */
7335
7351
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
7336
7352
  /**
7337
7353
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
7338
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
7354
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
7339
7355
  */
7340
7356
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
7341
7357
  /**
7342
7358
  * Prefer `Array#toReversed()` over `Array#reverse()`.
7343
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
7359
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
7344
7360
  */
7345
7361
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
7362
+ /**
7363
+ * Prefer `Array#toSorted()` over `Array#sort()`.
7364
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
7365
+ */
7366
+ 'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
7346
7367
  /**
7347
7368
  * Disallow member access from await expression.
7348
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
7369
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
7349
7370
  */
7350
7371
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
7351
7372
  /**
7352
7373
  * Disallow using `await` in `Promise` method parameters.
7353
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
7374
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
7354
7375
  */
7355
7376
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
7356
7377
  /**
7357
7378
  * Do not use leading/trailing space between `console.log` parameters.
7358
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
7379
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
7359
7380
  */
7360
7381
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
7361
7382
  /**
7362
7383
  * Do not use `document.cookie` directly.
7363
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
7384
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
7364
7385
  */
7365
7386
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
7366
7387
  /**
7367
7388
  * Disallow empty files.
7368
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
7389
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
7369
7390
  */
7370
7391
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
7371
7392
  /**
7372
7393
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
7373
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
7394
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
7374
7395
  */
7375
7396
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
7376
7397
  /**
7377
7398
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
7378
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
7399
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
7379
7400
  */
7380
7401
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
7381
7402
  /**
7382
7403
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
7383
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
7404
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
7384
7405
  * @deprecated
7385
7406
  */
7386
7407
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
7387
7408
  /**
7388
7409
  * Disallow `instanceof` with built-in objects
7389
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
7410
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
7390
7411
  */
7391
7412
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
7392
7413
  /**
7393
7414
  * Disallow invalid options in `fetch()` and `new Request()`.
7394
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
7415
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
7395
7416
  */
7396
7417
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
7397
7418
  /**
7398
7419
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
7399
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
7420
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
7400
7421
  */
7401
7422
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
7402
7423
  /**
7403
7424
  * Disallow identifiers starting with `new` or `class`.
7404
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
7425
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
7405
7426
  */
7406
7427
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
7407
7428
  /**
7408
7429
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
7409
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
7430
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
7410
7431
  * @deprecated
7411
7432
  */
7412
7433
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
7413
7434
  /**
7414
7435
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
7415
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
7436
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
7416
7437
  */
7417
7438
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
7418
7439
  /**
7419
7440
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
7420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
7441
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
7421
7442
  */
7422
7443
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
7423
7444
  /**
7424
7445
  * Disallow named usage of default import and export.
7425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
7446
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
7426
7447
  */
7427
7448
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
7428
7449
  /**
7429
7450
  * Disallow negated conditions.
7430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
7451
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
7431
7452
  */
7432
7453
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
7433
7454
  /**
7434
7455
  * Disallow negated expression in equality check.
7435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
7456
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
7436
7457
  */
7437
7458
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
7438
7459
  /**
7439
7460
  * Disallow nested ternary expressions.
7440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
7461
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
7441
7462
  */
7442
7463
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
7443
7464
  /**
7444
7465
  * Disallow `new Array()`.
7445
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
7466
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
7446
7467
  */
7447
7468
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
7448
7469
  /**
7449
7470
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
7450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
7471
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
7451
7472
  */
7452
7473
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
7453
7474
  /**
7454
7475
  * Disallow the use of the `null` literal.
7455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
7476
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
7456
7477
  */
7457
7478
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
7458
7479
  /**
7459
7480
  * Disallow the use of objects as default parameters.
7460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
7481
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
7461
7482
  */
7462
7483
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
7463
7484
  /**
7464
7485
  * Disallow `process.exit()`.
7465
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
7486
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
7466
7487
  */
7467
7488
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
7468
7489
  /**
7469
7490
  * Disallow passing single-element arrays to `Promise` methods.
7470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
7491
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
7471
7492
  */
7472
7493
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
7473
7494
  /**
7474
7495
  * Disallow classes that only have static members.
7475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
7496
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
7476
7497
  */
7477
7498
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
7478
7499
  /**
7479
7500
  * Disallow `then` property.
7480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
7501
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
7481
7502
  */
7482
7503
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
7483
7504
  /**
7484
7505
  * Disallow assigning `this` to a variable.
7485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
7506
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
7486
7507
  */
7487
7508
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
7488
7509
  /**
7489
7510
  * Disallow comparing `undefined` using `typeof`.
7490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
7511
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
7491
7512
  */
7492
7513
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
7493
7514
  /**
7494
7515
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
7495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7516
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
7496
7517
  */
7497
7518
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
7498
7519
  /**
7499
7520
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
7500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
7521
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
7501
7522
  */
7502
7523
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
7503
7524
  /**
7504
7525
  * Disallow awaiting non-promise values.
7505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
7526
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
7506
7527
  */
7507
7528
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
7508
7529
  /**
7509
7530
  * Enforce the use of built-in methods instead of unnecessary polyfills.
7510
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
7531
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
7511
7532
  */
7512
7533
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
7513
7534
  /**
7514
7535
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
7515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
7536
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
7516
7537
  */
7517
7538
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
7518
7539
  /**
7519
7540
  * Disallow unreadable array destructuring.
7520
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
7541
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
7521
7542
  */
7522
7543
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
7523
7544
  /**
7524
7545
  * Disallow unreadable IIFEs.
7525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
7546
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
7526
7547
  */
7527
7548
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
7528
7549
  /**
7529
7550
  * Disallow unused object properties.
7530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
7551
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
7531
7552
  */
7532
7553
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
7533
7554
  /**
7534
7555
  * Disallow unnecessary `Error.captureStackTrace(…)`.
7535
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7556
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
7536
7557
  */
7537
7558
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
7538
7559
  /**
7539
7560
  * Disallow useless fallback when spreading in object literals.
7540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
7561
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
7541
7562
  */
7542
7563
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
7543
7564
  /**
7544
7565
  * Disallow useless array length check.
7545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
7566
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
7546
7567
  */
7547
7568
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
7548
7569
  /**
7549
7570
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
7550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
7571
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
7551
7572
  */
7552
7573
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
7553
7574
  /**
7554
7575
  * Disallow unnecessary spread.
7555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
7576
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
7556
7577
  */
7557
7578
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
7558
7579
  /**
7559
7580
  * Disallow useless case in switch statements.
7560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
7581
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
7561
7582
  */
7562
7583
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
7563
7584
  /**
7564
7585
  * Disallow useless `undefined`.
7565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
7586
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
7566
7587
  */
7567
7588
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
7568
7589
  /**
7569
7590
  * Disallow number literals with zero fractions or dangling dots.
7570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
7591
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
7571
7592
  */
7572
7593
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
7573
7594
  /**
7574
7595
  * Enforce proper case for numeric literals.
7575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
7596
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
7576
7597
  */
7577
7598
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
7578
7599
  /**
7579
7600
  * Enforce the style of numeric separators by correctly grouping digits.
7580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
7601
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
7581
7602
  */
7582
7603
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
7583
7604
  /**
7584
7605
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
7585
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
7606
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
7586
7607
  */
7587
7608
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
7588
7609
  /**
7589
7610
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
7590
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
7611
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
7591
7612
  */
7592
7613
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
7593
7614
  /**
7594
7615
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
7595
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
7616
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
7596
7617
  */
7597
7618
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
7598
7619
  /**
7599
7620
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
7600
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
7621
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
7601
7622
  */
7602
7623
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
7603
7624
  /**
7604
7625
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
7605
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
7626
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
7606
7627
  */
7607
7628
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
7608
7629
  /**
7609
7630
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
7610
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
7631
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
7611
7632
  */
7612
7633
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
7613
7634
  /**
7614
7635
  * Prefer `.at()` method for index access and `String#charAt()`.
7615
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
7636
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
7616
7637
  */
7617
7638
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
7639
+ /**
7640
+ * Prefer `BigInt` literals over the constructor.
7641
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
7642
+ */
7643
+ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
7618
7644
  /**
7619
7645
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
7620
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
7646
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
7621
7647
  */
7622
7648
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
7623
7649
  /**
7624
7650
  * Prefer class field declarations over `this` assignments in constructors.
7625
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
7651
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
7626
7652
  */
7627
7653
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
7654
+ /**
7655
+ * Prefer using `Element#classList.toggle()` to toggle class names.
7656
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
7657
+ */
7658
+ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
7628
7659
  /**
7629
7660
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
7630
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
7661
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
7631
7662
  */
7632
7663
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
7633
7664
  /**
7634
7665
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
7635
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
7666
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
7636
7667
  */
7637
7668
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
7638
7669
  /**
7639
7670
  * Prefer default parameters over reassignment.
7640
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
7671
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
7641
7672
  */
7642
7673
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
7643
7674
  /**
7644
7675
  * Prefer `Node#append()` over `Node#appendChild()`.
7645
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
7676
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
7646
7677
  */
7647
7678
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
7648
7679
  /**
7649
7680
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
7650
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
7681
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
7651
7682
  */
7652
7683
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
7653
7684
  /**
7654
7685
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
7655
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
7686
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
7656
7687
  */
7657
7688
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
7658
7689
  /**
7659
7690
  * Prefer `.textContent` over `.innerText`.
7660
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
7691
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
7661
7692
  */
7662
7693
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
7663
7694
  /**
7664
7695
  * Prefer `EventTarget` over `EventEmitter`.
7665
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
7696
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
7666
7697
  */
7667
7698
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
7668
7699
  /**
7669
7700
  * Prefer `export…from` when re-exporting.
7670
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
7701
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
7671
7702
  */
7672
7703
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
7673
7704
  /**
7674
7705
  * Prefer `globalThis` over `window`, `self`, and `global`.
7675
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
7706
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
7676
7707
  */
7677
7708
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
7678
7709
  /**
7679
7710
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
7680
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
7711
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
7681
7712
  */
7682
7713
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
7683
7714
  /**
7684
7715
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
7685
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
7716
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
7686
7717
  */
7687
7718
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
7688
7719
  /**
7689
7720
  * Prefer reading a JSON file as a buffer.
7690
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
7721
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
7691
7722
  */
7692
7723
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
7693
7724
  /**
7694
7725
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
7695
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
7726
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
7696
7727
  */
7697
7728
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
7698
7729
  /**
7699
7730
  * Prefer using a logical operator over a ternary.
7700
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
7731
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
7701
7732
  */
7702
7733
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
7703
7734
  /**
7704
7735
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
7705
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
7736
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
7706
7737
  */
7707
7738
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
7708
7739
  /**
7709
7740
  * Enforce the use of `Math.trunc` instead of bitwise operators.
7710
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
7741
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
7711
7742
  */
7712
7743
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
7713
7744
  /**
7714
7745
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
7715
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
7746
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
7716
7747
  */
7717
7748
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
7718
7749
  /**
7719
7750
  * Prefer modern `Math` APIs over legacy patterns.
7720
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
7751
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
7721
7752
  */
7722
7753
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
7723
7754
  /**
7724
7755
  * Prefer JavaScript modules (ESM) over CommonJS.
7725
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
7756
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
7726
7757
  */
7727
7758
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
7728
7759
  /**
7729
7760
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
7730
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
7761
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
7731
7762
  */
7732
7763
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
7733
7764
  /**
7734
7765
  * Prefer negative index over `.length - index` when possible.
7735
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
7766
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
7736
7767
  */
7737
7768
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
7738
7769
  /**
7739
7770
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
7740
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
7771
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
7741
7772
  */
7742
7773
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
7743
7774
  /**
7744
7775
  * Prefer `Number` static properties over global ones.
7745
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
7776
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
7746
7777
  */
7747
7778
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
7748
7779
  /**
7749
7780
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
7750
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
7781
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
7751
7782
  */
7752
7783
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
7753
7784
  /**
7754
7785
  * Prefer omitting the `catch` binding parameter.
7755
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
7786
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
7756
7787
  */
7757
7788
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
7758
7789
  /**
7759
7790
  * Prefer borrowing methods from the prototype instead of the instance.
7760
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
7791
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
7761
7792
  */
7762
7793
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
7763
7794
  /**
7764
7795
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
7765
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
7796
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
7766
7797
  */
7767
7798
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
7768
7799
  /**
7769
7800
  * Prefer `Reflect.apply()` over `Function#apply()`.
7770
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
7801
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
7771
7802
  */
7772
7803
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
7773
7804
  /**
7774
7805
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
7775
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
7806
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
7776
7807
  */
7777
7808
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
7778
7809
  /**
7779
7810
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
7780
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
7811
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
7781
7812
  */
7782
7813
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
7783
7814
  /**
7784
7815
  * Prefer using `Set#size` instead of `Array#length`.
7785
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
7816
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
7786
7817
  */
7787
7818
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
7788
7819
  /**
7789
7820
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
7790
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
7821
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
7791
7822
  */
7792
7823
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
7793
7824
  /**
7794
7825
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
7795
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
7826
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
7796
7827
  */
7797
7828
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
7798
7829
  /**
7799
7830
  * Prefer using the `String.raw` tag to avoid escaping `\`.
7800
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
7831
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
7801
7832
  */
7802
7833
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
7803
7834
  /**
7804
7835
  * Prefer `String#replaceAll()` over regex searches with the global flag.
7805
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
7836
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
7806
7837
  */
7807
7838
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
7808
7839
  /**
7809
7840
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
7810
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
7841
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
7811
7842
  */
7812
7843
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
7813
7844
  /**
7814
7845
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
7815
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
7846
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
7816
7847
  */
7817
7848
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
7818
7849
  /**
7819
7850
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
7820
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
7851
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
7821
7852
  */
7822
7853
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
7823
7854
  /**
7824
7855
  * Prefer using `structuredClone` to create a deep clone.
7825
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
7856
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
7826
7857
  */
7827
7858
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
7828
7859
  /**
7829
7860
  * Prefer `switch` over multiple `else-if`.
7830
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
7861
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
7831
7862
  */
7832
7863
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
7833
7864
  /**
7834
7865
  * Prefer ternary expressions over simple `if-else` statements.
7835
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
7866
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
7836
7867
  */
7837
7868
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
7838
7869
  /**
7839
7870
  * Prefer top-level await over top-level promises and async function calls.
7840
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
7871
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
7841
7872
  */
7842
7873
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
7843
7874
  /**
7844
7875
  * Enforce throwing `TypeError` in type checking conditions.
7845
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
7876
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
7846
7877
  */
7847
7878
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
7848
7879
  /**
7849
7880
  * Prevent abbreviations.
7850
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
7881
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
7851
7882
  */
7852
7883
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
7853
7884
  /**
7854
7885
  * Enforce consistent relative URL style.
7855
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
7886
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
7856
7887
  */
7857
7888
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
7858
7889
  /**
7859
7890
  * Enforce using the separator argument with `Array#join()`.
7860
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
7891
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
7861
7892
  */
7862
7893
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
7894
+ /**
7895
+ * Require non-empty module attributes for imports and exports
7896
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
7897
+ */
7898
+ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
7863
7899
  /**
7864
7900
  * Require non-empty specifier list in import and export statements.
7865
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
7901
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
7866
7902
  */
7867
7903
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
7868
7904
  /**
7869
7905
  * Enforce using the digits argument with `Number#toFixed()`.
7870
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
7906
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
7871
7907
  */
7872
7908
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
7873
7909
  /**
7874
7910
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
7875
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
7911
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
7876
7912
  */
7877
7913
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
7878
7914
  /**
7879
7915
  * Enforce better string content.
7880
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
7916
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
7881
7917
  */
7882
7918
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
7883
7919
  /**
7884
7920
  * Enforce consistent brace style for `case` clauses.
7885
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
7921
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
7886
7922
  */
7887
7923
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
7888
7924
  /**
7889
7925
  * Fix whitespace-insensitive template indentation.
7890
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
7926
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
7891
7927
  */
7892
7928
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
7893
7929
  /**
7894
7930
  * Enforce consistent case for text encoding identifiers.
7895
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
7931
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
7896
7932
  */
7897
7933
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
7898
7934
  /**
7899
7935
  * Require `new` when creating an error.
7900
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
7936
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
7901
7937
  */
7902
7938
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
7903
7939
  /**
@@ -9725,6 +9761,10 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
9725
9761
  type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
9726
9762
  ignoreForLoopInit?: boolean;
9727
9763
  }]);
9764
+ // ----- jsdoc/check-alignment -----
9765
+ type JsdocCheckAlignment = [] | [{
9766
+ innerIndent?: number;
9767
+ }];
9728
9768
  // ----- jsdoc/check-examples -----
9729
9769
  type JsdocCheckExamples = [] | [{
9730
9770
  allowInlineConfig?: boolean;
@@ -10014,6 +10054,7 @@ type JsdocRequireJsdoc = [] | [{
10014
10054
  enableFixer?: boolean;
10015
10055
  exemptEmptyConstructors?: boolean;
10016
10056
  exemptEmptyFunctions?: boolean;
10057
+ exemptOverloadedImplementations?: boolean;
10017
10058
  fixerMessage?: string;
10018
10059
  minLineCount?: number;
10019
10060
  publicOnly?: (boolean | {
@@ -10030,6 +10071,7 @@ type JsdocRequireJsdoc = [] | [{
10030
10071
  FunctionExpression?: boolean;
10031
10072
  MethodDefinition?: boolean;
10032
10073
  };
10074
+ skipInterveningOverloadedDeclarations?: boolean;
10033
10075
  }];
10034
10076
  // ----- jsdoc/require-param -----
10035
10077
  type JsdocRequireParam = [] | [{
@@ -10120,6 +10162,7 @@ type JsdocRequireReturnsType = [] | [{
10120
10162
  }];
10121
10163
  // ----- jsdoc/require-template -----
10122
10164
  type JsdocRequireTemplate = [] | [{
10165
+ exemptedBy?: string[];
10123
10166
  requireSeparateTemplates?: boolean;
10124
10167
  }];
10125
10168
  // ----- jsdoc/require-throws -----
@@ -13540,6 +13583,10 @@ type PreferReflect = [] | [{
13540
13583
  type PreferRegexLiterals = [] | [{
13541
13584
  disallowRedundantWrapping?: boolean;
13542
13585
  }];
13586
+ // ----- preserve-caught-error -----
13587
+ type PreserveCaughtError = [] | [{
13588
+ requireCatchParameter?: boolean;
13589
+ }];
13543
13590
  // ----- quote-props -----
13544
13591
  type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
13545
13592
  keywords?: boolean;
@@ -14175,6 +14222,7 @@ type StyleIndent = [] | [("tab" | number)] | [("tab" | number), {
14175
14222
  const?: (number | ("first" | "off"));
14176
14223
  using?: (number | ("first" | "off"));
14177
14224
  });
14225
+ assignmentOperator?: (number | "off");
14178
14226
  outerIIFEBody?: (number | "off");
14179
14227
  MemberExpression?: (number | "off");
14180
14228
  FunctionDeclaration?: {
@@ -14407,6 +14455,22 @@ type StyleKeywordSpacing = [] | [{
14407
14455
  before?: boolean;
14408
14456
  after?: boolean;
14409
14457
  };
14458
+ arguments?: {
14459
+ before?: boolean;
14460
+ after?: boolean;
14461
+ };
14462
+ as?: {
14463
+ before?: boolean;
14464
+ after?: boolean;
14465
+ };
14466
+ async?: {
14467
+ before?: boolean;
14468
+ after?: boolean;
14469
+ };
14470
+ await?: {
14471
+ before?: boolean;
14472
+ after?: boolean;
14473
+ };
14410
14474
  boolean?: {
14411
14475
  before?: boolean;
14412
14476
  after?: boolean;
@@ -14471,6 +14535,10 @@ type StyleKeywordSpacing = [] | [{
14471
14535
  before?: boolean;
14472
14536
  after?: boolean;
14473
14537
  };
14538
+ eval?: {
14539
+ before?: boolean;
14540
+ after?: boolean;
14541
+ };
14474
14542
  export?: {
14475
14543
  before?: boolean;
14476
14544
  after?: boolean;
@@ -14499,10 +14567,18 @@ type StyleKeywordSpacing = [] | [{
14499
14567
  before?: boolean;
14500
14568
  after?: boolean;
14501
14569
  };
14570
+ from?: {
14571
+ before?: boolean;
14572
+ after?: boolean;
14573
+ };
14502
14574
  function?: {
14503
14575
  before?: boolean;
14504
14576
  after?: boolean;
14505
14577
  };
14578
+ get?: {
14579
+ before?: boolean;
14580
+ after?: boolean;
14581
+ };
14506
14582
  goto?: {
14507
14583
  before?: boolean;
14508
14584
  after?: boolean;
@@ -14535,6 +14611,10 @@ type StyleKeywordSpacing = [] | [{
14535
14611
  before?: boolean;
14536
14612
  after?: boolean;
14537
14613
  };
14614
+ let?: {
14615
+ before?: boolean;
14616
+ after?: boolean;
14617
+ };
14538
14618
  long?: {
14539
14619
  before?: boolean;
14540
14620
  after?: boolean;
@@ -14551,6 +14631,10 @@ type StyleKeywordSpacing = [] | [{
14551
14631
  before?: boolean;
14552
14632
  after?: boolean;
14553
14633
  };
14634
+ of?: {
14635
+ before?: boolean;
14636
+ after?: boolean;
14637
+ };
14554
14638
  package?: {
14555
14639
  before?: boolean;
14556
14640
  after?: boolean;
@@ -14571,6 +14655,10 @@ type StyleKeywordSpacing = [] | [{
14571
14655
  before?: boolean;
14572
14656
  after?: boolean;
14573
14657
  };
14658
+ set?: {
14659
+ before?: boolean;
14660
+ after?: boolean;
14661
+ };
14574
14662
  short?: {
14575
14663
  before?: boolean;
14576
14664
  after?: boolean;
@@ -14615,59 +14703,43 @@ type StyleKeywordSpacing = [] | [{
14615
14703
  before?: boolean;
14616
14704
  after?: boolean;
14617
14705
  };
14618
- typeof?: {
14619
- before?: boolean;
14620
- after?: boolean;
14621
- };
14622
- var?: {
14623
- before?: boolean;
14624
- after?: boolean;
14625
- };
14626
- void?: {
14627
- before?: boolean;
14628
- after?: boolean;
14629
- };
14630
- volatile?: {
14631
- before?: boolean;
14632
- after?: boolean;
14633
- };
14634
- while?: {
14706
+ type?: {
14635
14707
  before?: boolean;
14636
14708
  after?: boolean;
14637
14709
  };
14638
- with?: {
14710
+ typeof?: {
14639
14711
  before?: boolean;
14640
14712
  after?: boolean;
14641
14713
  };
14642
- accessor?: {
14714
+ using?: {
14643
14715
  before?: boolean;
14644
14716
  after?: boolean;
14645
14717
  };
14646
- as?: {
14718
+ var?: {
14647
14719
  before?: boolean;
14648
14720
  after?: boolean;
14649
14721
  };
14650
- async?: {
14722
+ void?: {
14651
14723
  before?: boolean;
14652
14724
  after?: boolean;
14653
14725
  };
14654
- await?: {
14726
+ volatile?: {
14655
14727
  before?: boolean;
14656
14728
  after?: boolean;
14657
14729
  };
14658
- from?: {
14730
+ while?: {
14659
14731
  before?: boolean;
14660
14732
  after?: boolean;
14661
14733
  };
14662
- get?: {
14734
+ with?: {
14663
14735
  before?: boolean;
14664
14736
  after?: boolean;
14665
14737
  };
14666
- let?: {
14738
+ yield?: {
14667
14739
  before?: boolean;
14668
14740
  after?: boolean;
14669
14741
  };
14670
- of?: {
14742
+ accessor?: {
14671
14743
  before?: boolean;
14672
14744
  after?: boolean;
14673
14745
  };
@@ -14675,22 +14747,6 @@ type StyleKeywordSpacing = [] | [{
14675
14747
  before?: boolean;
14676
14748
  after?: boolean;
14677
14749
  };
14678
- set?: {
14679
- before?: boolean;
14680
- after?: boolean;
14681
- };
14682
- using?: {
14683
- before?: boolean;
14684
- after?: boolean;
14685
- };
14686
- yield?: {
14687
- before?: boolean;
14688
- after?: boolean;
14689
- };
14690
- type?: {
14691
- before?: boolean;
14692
- after?: boolean;
14693
- };
14694
14750
  };
14695
14751
  }];
14696
14752
  // ----- style/line-comment-position -----
@@ -14890,6 +14946,7 @@ type StyleNoExtraParens = ([] | ["functions"] | [] | ["all"] | ["all", {
14890
14946
  LogicalExpression?: boolean;
14891
14947
  AwaitExpression?: boolean;
14892
14948
  };
14949
+ ignoredNodes?: string[];
14893
14950
  }]);
14894
14951
  // ----- style/no-mixed-operators -----
14895
14952
  type StyleNoMixedOperators = [] | [{
@@ -15005,7 +15062,7 @@ type StylePaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
15005
15062
  // ----- style/padding-line-between-statements -----
15006
15063
  type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
15007
15064
  type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementType | [_StylePaddingLineBetweenStatementsStatementType, ...(_StylePaddingLineBetweenStatementsStatementType)[]]);
15008
- type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "return" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using");
15065
+ type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
15009
15066
  type StylePaddingLineBetweenStatements = {
15010
15067
  blankLine: _StylePaddingLineBetweenStatementsPaddingType;
15011
15068
  prev: _StylePaddingLineBetweenStatementsStatementOption;
@@ -16560,6 +16617,10 @@ type UnicornNoArrayReduce = [] | [{
16560
16617
  type UnicornNoArrayReverse = [] | [{
16561
16618
  allowExpressionStatement?: boolean;
16562
16619
  }];
16620
+ // ----- unicorn/no-array-sort -----
16621
+ type UnicornNoArraySort = [] | [{
16622
+ allowExpressionStatement?: boolean;
16623
+ }];
16563
16624
  // ----- unicorn/no-instanceof-builtins -----
16564
16625
  type UnicornNoInstanceofBuiltins = [] | [{
16565
16626
  useErrorIsError?: boolean;
package/dist/index.js CHANGED
@@ -152,8 +152,7 @@ const parserPlain = {
152
152
  * Combine array and non-array configs into a single array.
153
153
  */
154
154
  async function combineConfigs(...configs$1) {
155
- const resolved = await Promise.all(configs$1);
156
- return resolved.flat();
155
+ return (await Promise.all(configs$1)).flat();
157
156
  }
158
157
  /**
159
158
  * Rename plugin prefixes in a rule object.
@@ -218,9 +217,7 @@ async function ensurePackages(packages) {
218
217
  if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
219
218
  const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
220
219
  if (nonExistingPackages.length === 0) return;
221
- const p = await import("@clack/prompts");
222
- const result = await p.confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` });
223
- if (result) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
220
+ if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
224
221
  }
225
222
  function isInEditorEnv() {
226
223
  if (process.env.CI) return false;
@@ -427,10 +424,9 @@ async function formatters(options = {}, stylistic$1 = {}) {
427
424
  quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
428
425
  useTabs: indent === "tab"
429
426
  }, options.dprintOptions || {});
430
- const pluginFormat = await interopDefault(import("eslint-plugin-format"));
431
427
  const configs$1 = [{
432
428
  name: "vinicunca/formatter/setup",
433
- plugins: { format: pluginFormat }
429
+ plugins: { format: await interopDefault(import("eslint-plugin-format")) }
434
430
  }];
435
431
  if (options.css) configs$1.push({
436
432
  files: [GLOB_CSS, GLOB_POSTCSS],
@@ -581,7 +577,7 @@ async function javascript(options = {}) {
581
577
  return [
582
578
  {
583
579
  languageOptions: {
584
- ecmaVersion: 2022,
580
+ ecmaVersion: "latest",
585
581
  globals: {
586
582
  ...globals.browser,
587
583
  ...globals.es2021,
@@ -592,7 +588,7 @@ async function javascript(options = {}) {
592
588
  },
593
589
  parserOptions: {
594
590
  ecmaFeatures: { jsx: true },
595
- ecmaVersion: 2022,
591
+ ecmaVersion: "latest",
596
592
  sourceType: "module"
597
593
  },
598
594
  sourceType: "module"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "3.23.0",
4
+ "version": "3.24.0",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -113,11 +113,11 @@
113
113
  "@clack/prompts": "^0.11.0",
114
114
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
115
115
  "@eslint/markdown": "^7.2.0",
116
- "@stylistic/eslint-plugin": "^5.2.3",
117
- "@typescript-eslint/eslint-plugin": "^8.41.0",
118
- "@typescript-eslint/parser": "^8.41.0",
119
- "@unocss/eslint-plugin": "^66.5.0",
120
- "@vitest/eslint-plugin": "^1.3.5",
116
+ "@stylistic/eslint-plugin": "^5.3.1",
117
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
118
+ "@typescript-eslint/parser": "^8.43.0",
119
+ "@unocss/eslint-plugin": "^66.5.1",
120
+ "@vitest/eslint-plugin": "^1.3.9",
121
121
  "eslint-config-flat-gitignore": "^2.1.0",
122
122
  "eslint-flat-config-utils": "^2.1.1",
123
123
  "eslint-merge-processors": "^2.0.0",
@@ -125,7 +125,7 @@
125
125
  "eslint-plugin-command": "^3.3.1",
126
126
  "eslint-plugin-format": "^1.0.1",
127
127
  "eslint-plugin-import-lite": "^0.3.0",
128
- "eslint-plugin-jsdoc": "^54.1.1",
128
+ "eslint-plugin-jsdoc": "^55.0.2",
129
129
  "eslint-plugin-jsonc": "^2.20.1",
130
130
  "eslint-plugin-n": "^17.21.3",
131
131
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -134,7 +134,7 @@
134
134
  "eslint-plugin-regexp": "^2.10.0",
135
135
  "eslint-plugin-sonarjs": "^3.0.5",
136
136
  "eslint-plugin-toml": "^0.12.0",
137
- "eslint-plugin-unicorn": "^60.0.0",
137
+ "eslint-plugin-unicorn": "^61.0.2",
138
138
  "eslint-plugin-unused-imports": "^4.2.0",
139
139
  "eslint-plugin-vue": "^10.4.0",
140
140
  "eslint-plugin-yml": "^1.18.0",