@ntnyq/eslint-config 5.4.2 → 5.5.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +187 -139
  2. package/dist/index.js +106 -87
  3. package/package.json +9 -9
package/dist/index.d.ts CHANGED
@@ -514,10 +514,19 @@ type ConfigImportXOptions = Pick<OptionsShareable, 'typescript'> & OptionsOverri
514
514
  declare const configImportX: (options?: ConfigImportXOptions) => TypedConfigItem[];
515
515
  //#endregion
516
516
  //#region src/configs/unicorn.d.ts
517
+ /**
518
+ * Built-in presets of `eslint-plugin-unicorn`
519
+ */
520
+ declare const PLUGIN_UNICORN_PRESET: readonly ["all", "recommended", "unopinionated"];
517
521
  /**
518
522
  * Options type of {@link configUnicorn}
519
523
  */
520
- type ConfigUnicornOptions = OptionsOverrides;
524
+ type ConfigUnicornOptions = OptionsOverrides & {
525
+ /**
526
+ * Use a built-in preset
527
+ */
528
+ preset?: (typeof PLUGIN_UNICORN_PRESET)[number];
529
+ };
521
530
  /**
522
531
  * Config for powerful rules
523
532
  *
@@ -2954,7 +2963,7 @@ interface RuleOptions {
2954
2963
  * Reports invalid alignment of JSDoc block asterisks.
2955
2964
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header
2956
2965
  */
2957
- 'jsdoc/check-alignment'?: Linter.RuleEntry<[]>;
2966
+ 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
2958
2967
  /**
2959
2968
  * Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
2960
2969
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
@@ -5013,6 +5022,11 @@ interface RuleOptions {
5013
5022
  * @see https://eslint.org/docs/latest/rules/prefer-template
5014
5023
  */
5015
5024
  'prefer-template'?: Linter.RuleEntry<[]>;
5025
+ /**
5026
+ * Disallow losing originally caught error when re-throwing custom errors
5027
+ * @see https://eslint.org/docs/latest/rules/preserve-caught-error
5028
+ */
5029
+ 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError>;
5016
5030
  /**
5017
5031
  * @see https://github.com/prettier/eslint-plugin-prettier#options
5018
5032
  */
@@ -6083,690 +6097,710 @@ interface RuleOptions {
6083
6097
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
6084
6098
  /**
6085
6099
  * Improve regexes by making them shorter, consistent, and safer.
6086
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
6100
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/better-regex.md
6087
6101
  */
6088
6102
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
6089
6103
  /**
6090
6104
  * Enforce a specific parameter name in catch clauses.
6091
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
6105
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/catch-error-name.md
6092
6106
  */
6093
6107
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
6094
6108
  /**
6095
6109
  * Enforce consistent assertion style with `node:assert`.
6096
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
6110
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-assert.md
6097
6111
  */
6098
6112
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
6099
6113
  /**
6100
6114
  * Prefer passing `Date` directly to the constructor when cloning.
6101
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
6115
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-date-clone.md
6102
6116
  */
6103
6117
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
6104
6118
  /**
6105
6119
  * Use destructured variables over properties.
6106
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
6120
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-destructuring.md
6107
6121
  */
6108
6122
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
6109
6123
  /**
6110
6124
  * Prefer consistent types when spreading a ternary in an array literal.
6111
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
6125
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-empty-array-spread.md
6112
6126
  */
6113
6127
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
6114
6128
  /**
6115
6129
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
6116
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
6130
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-existence-index-check.md
6117
6131
  */
6118
6132
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
6119
6133
  /**
6120
6134
  * Move function definitions to the highest possible scope.
6121
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
6135
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/consistent-function-scoping.md
6122
6136
  */
6123
6137
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
6124
6138
  /**
6125
6139
  * Enforce correct `Error` subclassing.
6126
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
6140
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/custom-error-definition.md
6127
6141
  */
6128
6142
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
6129
6143
  /**
6130
6144
  * Enforce no spaces between braces.
6131
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
6145
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/empty-brace-spaces.md
6132
6146
  */
6133
6147
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
6134
6148
  /**
6135
6149
  * Enforce passing a `message` value when creating a built-in error.
6136
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
6150
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/error-message.md
6137
6151
  */
6138
6152
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
6139
6153
  /**
6140
6154
  * Require escape sequences to use uppercase or lowercase values.
6141
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
6155
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/escape-case.md
6142
6156
  */
6143
6157
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
6144
6158
  /**
6145
6159
  * Add expiration conditions to TODO comments.
6146
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
6160
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/expiring-todo-comments.md
6147
6161
  */
6148
6162
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
6149
6163
  /**
6150
6164
  * Enforce explicitly comparing the `length` or `size` property of a value.
6151
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
6165
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/explicit-length-check.md
6152
6166
  */
6153
6167
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
6154
6168
  /**
6155
6169
  * Enforce a case style for filenames.
6156
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
6170
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/filename-case.md
6157
6171
  */
6158
6172
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
6159
6173
  /**
6160
6174
  * Enforce specific import styles per module.
6161
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
6175
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/import-style.md
6162
6176
  */
6163
6177
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
6164
6178
  /**
6165
6179
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
6166
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
6180
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/new-for-builtins.md
6167
6181
  */
6168
6182
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
6169
6183
  /**
6170
6184
  * Enforce specifying rules to disable in `eslint-disable` comments.
6171
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
6185
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-abusive-eslint-disable.md
6172
6186
  */
6173
6187
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6174
6188
  /**
6175
6189
  * Disallow recursive access to `this` within getters and setters.
6176
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
6190
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-accessor-recursion.md
6177
6191
  */
6178
6192
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
6179
6193
  /**
6180
6194
  * Disallow anonymous functions and classes as the default export.
6181
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
6195
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-anonymous-default-export.md
6182
6196
  */
6183
6197
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6184
6198
  /**
6185
6199
  * Prevent passing a function reference directly to iterator methods.
6186
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
6200
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-callback-reference.md
6187
6201
  */
6188
6202
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
6189
6203
  /**
6190
6204
  * Prefer `for…of` over the `forEach` method.
6191
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
6205
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-for-each.md
6192
6206
  */
6193
6207
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
6194
6208
  /**
6195
6209
  * Disallow using the `this` argument in array methods.
6196
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
6210
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-method-this-argument.md
6197
6211
  */
6198
6212
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6199
6213
  /**
6200
6214
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6201
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
6215
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-array-push-push
6202
6216
  * @deprecated
6203
6217
  */
6204
6218
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6205
6219
  /**
6206
6220
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6207
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
6221
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reduce.md
6208
6222
  */
6209
6223
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6210
6224
  /**
6211
6225
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6212
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
6226
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-reverse.md
6213
6227
  */
6214
6228
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
6229
+ /**
6230
+ * Prefer `Array#toSorted()` over `Array#sort()`.
6231
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-array-sort.md
6232
+ */
6233
+ 'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
6215
6234
  /**
6216
6235
  * Disallow member access from await expression.
6217
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
6236
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-expression-member.md
6218
6237
  */
6219
6238
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
6220
6239
  /**
6221
6240
  * Disallow using `await` in `Promise` method parameters.
6222
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
6241
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-await-in-promise-methods.md
6223
6242
  */
6224
6243
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
6225
6244
  /**
6226
6245
  * Do not use leading/trailing space between `console.log` parameters.
6227
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
6246
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-console-spaces.md
6228
6247
  */
6229
6248
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
6230
6249
  /**
6231
6250
  * Do not use `document.cookie` directly.
6232
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
6251
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-document-cookie.md
6233
6252
  */
6234
6253
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
6235
6254
  /**
6236
6255
  * Disallow empty files.
6237
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
6256
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-empty-file.md
6238
6257
  */
6239
6258
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
6240
6259
  /**
6241
6260
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
6242
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
6261
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-for-loop.md
6243
6262
  */
6244
6263
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
6245
6264
  /**
6246
6265
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
6247
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
6266
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-hex-escape.md
6248
6267
  */
6249
6268
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
6250
6269
  /**
6251
6270
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
6252
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
6271
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-instanceof-array
6253
6272
  * @deprecated
6254
6273
  */
6255
6274
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
6256
6275
  /**
6257
6276
  * Disallow `instanceof` with built-in objects
6258
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
6277
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-instanceof-builtins.md
6259
6278
  */
6260
6279
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
6261
6280
  /**
6262
6281
  * Disallow invalid options in `fetch()` and `new Request()`.
6263
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
6282
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-fetch-options.md
6264
6283
  */
6265
6284
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
6266
6285
  /**
6267
6286
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
6268
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
6287
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-invalid-remove-event-listener.md
6269
6288
  */
6270
6289
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
6271
6290
  /**
6272
6291
  * Disallow identifiers starting with `new` or `class`.
6273
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
6292
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-keyword-prefix.md
6274
6293
  */
6275
6294
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
6276
6295
  /**
6277
6296
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
6278
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
6297
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/deprecated-rules.md#no-length-as-slice-end
6279
6298
  * @deprecated
6280
6299
  */
6281
6300
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
6282
6301
  /**
6283
6302
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
6284
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
6303
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-lonely-if.md
6285
6304
  */
6286
6305
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
6287
6306
  /**
6288
6307
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
6289
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
6308
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-magic-array-flat-depth.md
6290
6309
  */
6291
6310
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
6292
6311
  /**
6293
6312
  * Disallow named usage of default import and export.
6294
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
6313
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-named-default.md
6295
6314
  */
6296
6315
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
6297
6316
  /**
6298
6317
  * Disallow negated conditions.
6299
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
6318
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negated-condition.md
6300
6319
  */
6301
6320
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
6302
6321
  /**
6303
6322
  * Disallow negated expression in equality check.
6304
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
6323
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-negation-in-equality-check.md
6305
6324
  */
6306
6325
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
6307
6326
  /**
6308
6327
  * Disallow nested ternary expressions.
6309
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
6328
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-nested-ternary.md
6310
6329
  */
6311
6330
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
6312
6331
  /**
6313
6332
  * Disallow `new Array()`.
6314
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
6333
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-array.md
6315
6334
  */
6316
6335
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
6317
6336
  /**
6318
6337
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
6319
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
6338
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-new-buffer.md
6320
6339
  */
6321
6340
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
6322
6341
  /**
6323
6342
  * Disallow the use of the `null` literal.
6324
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
6343
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-null.md
6325
6344
  */
6326
6345
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
6327
6346
  /**
6328
6347
  * Disallow the use of objects as default parameters.
6329
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
6348
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-object-as-default-parameter.md
6330
6349
  */
6331
6350
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
6332
6351
  /**
6333
6352
  * Disallow `process.exit()`.
6334
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
6353
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-process-exit.md
6335
6354
  */
6336
6355
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
6337
6356
  /**
6338
6357
  * Disallow passing single-element arrays to `Promise` methods.
6339
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
6358
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-single-promise-in-promise-methods.md
6340
6359
  */
6341
6360
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
6342
6361
  /**
6343
6362
  * Disallow classes that only have static members.
6344
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
6363
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-static-only-class.md
6345
6364
  */
6346
6365
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
6347
6366
  /**
6348
6367
  * Disallow `then` property.
6349
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
6368
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-thenable.md
6350
6369
  */
6351
6370
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
6352
6371
  /**
6353
6372
  * Disallow assigning `this` to a variable.
6354
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
6373
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-this-assignment.md
6355
6374
  */
6356
6375
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
6357
6376
  /**
6358
6377
  * Disallow comparing `undefined` using `typeof`.
6359
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
6378
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-typeof-undefined.md
6360
6379
  */
6361
6380
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
6362
6381
  /**
6363
6382
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
6364
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
6383
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-flat-depth.md
6365
6384
  */
6366
6385
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
6367
6386
  /**
6368
6387
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
6369
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
6388
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-array-splice-count.md
6370
6389
  */
6371
6390
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
6372
6391
  /**
6373
6392
  * Disallow awaiting non-promise values.
6374
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
6393
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-await.md
6375
6394
  */
6376
6395
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
6377
6396
  /**
6378
6397
  * Enforce the use of built-in methods instead of unnecessary polyfills.
6379
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
6398
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-polyfills.md
6380
6399
  */
6381
6400
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
6382
6401
  /**
6383
6402
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
6384
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
6403
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unnecessary-slice-end.md
6385
6404
  */
6386
6405
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
6387
6406
  /**
6388
6407
  * Disallow unreadable array destructuring.
6389
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
6408
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-array-destructuring.md
6390
6409
  */
6391
6410
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
6392
6411
  /**
6393
6412
  * Disallow unreadable IIFEs.
6394
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
6413
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unreadable-iife.md
6395
6414
  */
6396
6415
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
6397
6416
  /**
6398
6417
  * Disallow unused object properties.
6399
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
6418
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-unused-properties.md
6400
6419
  */
6401
6420
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
6402
6421
  /**
6403
6422
  * Disallow unnecessary `Error.captureStackTrace(…)`.
6404
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
6423
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-error-capture-stack-trace.md
6405
6424
  */
6406
6425
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
6407
6426
  /**
6408
6427
  * Disallow useless fallback when spreading in object literals.
6409
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
6428
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-fallback-in-spread.md
6410
6429
  */
6411
6430
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
6412
6431
  /**
6413
6432
  * Disallow useless array length check.
6414
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
6433
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-length-check.md
6415
6434
  */
6416
6435
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
6417
6436
  /**
6418
6437
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
6419
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
6438
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-promise-resolve-reject.md
6420
6439
  */
6421
6440
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
6422
6441
  /**
6423
6442
  * Disallow unnecessary spread.
6424
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
6443
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-spread.md
6425
6444
  */
6426
6445
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
6427
6446
  /**
6428
6447
  * Disallow useless case in switch statements.
6429
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
6448
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-switch-case.md
6430
6449
  */
6431
6450
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
6432
6451
  /**
6433
6452
  * Disallow useless `undefined`.
6434
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
6453
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-useless-undefined.md
6435
6454
  */
6436
6455
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
6437
6456
  /**
6438
6457
  * Disallow number literals with zero fractions or dangling dots.
6439
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
6458
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/no-zero-fractions.md
6440
6459
  */
6441
6460
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
6442
6461
  /**
6443
6462
  * Enforce proper case for numeric literals.
6444
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
6463
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/number-literal-case.md
6445
6464
  */
6446
6465
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
6447
6466
  /**
6448
6467
  * Enforce the style of numeric separators by correctly grouping digits.
6449
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
6468
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/numeric-separators-style.md
6450
6469
  */
6451
6470
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
6452
6471
  /**
6453
6472
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
6454
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
6473
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-add-event-listener.md
6455
6474
  */
6456
6475
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
6457
6476
  /**
6458
6477
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
6459
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
6478
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-find.md
6460
6479
  */
6461
6480
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
6462
6481
  /**
6463
6482
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
6464
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
6483
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat.md
6465
6484
  */
6466
6485
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
6467
6486
  /**
6468
6487
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
6469
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
6488
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-flat-map.md
6470
6489
  */
6471
6490
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
6472
6491
  /**
6473
6492
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
6474
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
6493
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-index-of.md
6475
6494
  */
6476
6495
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
6477
6496
  /**
6478
6497
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
6479
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
6498
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-array-some.md
6480
6499
  */
6481
6500
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
6482
6501
  /**
6483
6502
  * Prefer `.at()` method for index access and `String#charAt()`.
6484
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
6503
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-at.md
6485
6504
  */
6486
6505
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
6506
+ /**
6507
+ * Prefer `BigInt` literals over the constructor.
6508
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-bigint-literals.md
6509
+ */
6510
+ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
6487
6511
  /**
6488
6512
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
6489
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
6513
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-blob-reading-methods.md
6490
6514
  */
6491
6515
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
6492
6516
  /**
6493
6517
  * Prefer class field declarations over `this` assignments in constructors.
6494
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
6518
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-class-fields.md
6495
6519
  */
6496
6520
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
6521
+ /**
6522
+ * Prefer using `Element#classList.toggle()` to toggle class names.
6523
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-classlist-toggle.md
6524
+ */
6525
+ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
6497
6526
  /**
6498
6527
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
6499
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
6528
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-code-point.md
6500
6529
  */
6501
6530
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
6502
6531
  /**
6503
6532
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
6504
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
6533
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-date-now.md
6505
6534
  */
6506
6535
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
6507
6536
  /**
6508
6537
  * Prefer default parameters over reassignment.
6509
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
6538
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-default-parameters.md
6510
6539
  */
6511
6540
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
6512
6541
  /**
6513
6542
  * Prefer `Node#append()` over `Node#appendChild()`.
6514
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
6543
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-append.md
6515
6544
  */
6516
6545
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
6517
6546
  /**
6518
6547
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
6519
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
6548
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-dataset.md
6520
6549
  */
6521
6550
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
6522
6551
  /**
6523
6552
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
6524
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
6553
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-remove.md
6525
6554
  */
6526
6555
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
6527
6556
  /**
6528
6557
  * Prefer `.textContent` over `.innerText`.
6529
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
6558
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-dom-node-text-content.md
6530
6559
  */
6531
6560
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
6532
6561
  /**
6533
6562
  * Prefer `EventTarget` over `EventEmitter`.
6534
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
6563
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-event-target.md
6535
6564
  */
6536
6565
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
6537
6566
  /**
6538
6567
  * Prefer `export…from` when re-exporting.
6539
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
6568
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-export-from.md
6540
6569
  */
6541
6570
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
6542
6571
  /**
6543
6572
  * Prefer `globalThis` over `window`, `self`, and `global`.
6544
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
6573
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-global-this.md
6545
6574
  */
6546
6575
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
6547
6576
  /**
6548
6577
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
6549
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
6578
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-import-meta-properties.md
6550
6579
  */
6551
6580
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
6552
6581
  /**
6553
6582
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
6554
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
6583
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-includes.md
6555
6584
  */
6556
6585
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
6557
6586
  /**
6558
6587
  * Prefer reading a JSON file as a buffer.
6559
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
6588
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-json-parse-buffer.md
6560
6589
  */
6561
6590
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
6562
6591
  /**
6563
6592
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
6564
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
6593
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-keyboard-event-key.md
6565
6594
  */
6566
6595
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
6567
6596
  /**
6568
6597
  * Prefer using a logical operator over a ternary.
6569
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
6598
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-logical-operator-over-ternary.md
6570
6599
  */
6571
6600
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
6572
6601
  /**
6573
6602
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
6574
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
6603
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-min-max.md
6575
6604
  */
6576
6605
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
6577
6606
  /**
6578
6607
  * Enforce the use of `Math.trunc` instead of bitwise operators.
6579
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
6608
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-math-trunc.md
6580
6609
  */
6581
6610
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
6582
6611
  /**
6583
6612
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
6584
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
6613
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-dom-apis.md
6585
6614
  */
6586
6615
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
6587
6616
  /**
6588
6617
  * Prefer modern `Math` APIs over legacy patterns.
6589
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
6618
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-modern-math-apis.md
6590
6619
  */
6591
6620
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
6592
6621
  /**
6593
6622
  * Prefer JavaScript modules (ESM) over CommonJS.
6594
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
6623
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-module.md
6595
6624
  */
6596
6625
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
6597
6626
  /**
6598
6627
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
6599
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
6628
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-native-coercion-functions.md
6600
6629
  */
6601
6630
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
6602
6631
  /**
6603
6632
  * Prefer negative index over `.length - index` when possible.
6604
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
6633
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-negative-index.md
6605
6634
  */
6606
6635
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
6607
6636
  /**
6608
6637
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
6609
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
6638
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-node-protocol.md
6610
6639
  */
6611
6640
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
6612
6641
  /**
6613
6642
  * Prefer `Number` static properties over global ones.
6614
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
6643
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-number-properties.md
6615
6644
  */
6616
6645
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
6617
6646
  /**
6618
6647
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
6619
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
6648
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-object-from-entries.md
6620
6649
  */
6621
6650
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
6622
6651
  /**
6623
6652
  * Prefer omitting the `catch` binding parameter.
6624
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
6653
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-optional-catch-binding.md
6625
6654
  */
6626
6655
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
6627
6656
  /**
6628
6657
  * Prefer borrowing methods from the prototype instead of the instance.
6629
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
6658
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-prototype-methods.md
6630
6659
  */
6631
6660
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
6632
6661
  /**
6633
6662
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
6634
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
6663
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-query-selector.md
6635
6664
  */
6636
6665
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
6637
6666
  /**
6638
6667
  * Prefer `Reflect.apply()` over `Function#apply()`.
6639
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
6668
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-reflect-apply.md
6640
6669
  */
6641
6670
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
6642
6671
  /**
6643
6672
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
6644
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
6673
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-regexp-test.md
6645
6674
  */
6646
6675
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
6647
6676
  /**
6648
6677
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
6649
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
6678
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-has.md
6650
6679
  */
6651
6680
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
6652
6681
  /**
6653
6682
  * Prefer using `Set#size` instead of `Array#length`.
6654
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
6683
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-set-size.md
6655
6684
  */
6656
6685
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
6657
6686
  /**
6658
6687
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
6659
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
6688
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-single-call.md
6660
6689
  */
6661
6690
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
6662
6691
  /**
6663
6692
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
6664
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
6693
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-spread.md
6665
6694
  */
6666
6695
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
6667
6696
  /**
6668
6697
  * Prefer using the `String.raw` tag to avoid escaping `\`.
6669
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
6698
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-raw.md
6670
6699
  */
6671
6700
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
6672
6701
  /**
6673
6702
  * Prefer `String#replaceAll()` over regex searches with the global flag.
6674
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
6703
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-replace-all.md
6675
6704
  */
6676
6705
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
6677
6706
  /**
6678
6707
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
6679
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
6708
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-slice.md
6680
6709
  */
6681
6710
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
6682
6711
  /**
6683
6712
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
6684
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
6713
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-starts-ends-with.md
6685
6714
  */
6686
6715
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
6687
6716
  /**
6688
6717
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
6689
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
6718
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-string-trim-start-end.md
6690
6719
  */
6691
6720
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
6692
6721
  /**
6693
6722
  * Prefer using `structuredClone` to create a deep clone.
6694
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
6723
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-structured-clone.md
6695
6724
  */
6696
6725
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
6697
6726
  /**
6698
6727
  * Prefer `switch` over multiple `else-if`.
6699
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
6728
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-switch.md
6700
6729
  */
6701
6730
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
6702
6731
  /**
6703
6732
  * Prefer ternary expressions over simple `if-else` statements.
6704
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
6733
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-ternary.md
6705
6734
  */
6706
6735
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
6707
6736
  /**
6708
6737
  * Prefer top-level await over top-level promises and async function calls.
6709
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
6738
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-top-level-await.md
6710
6739
  */
6711
6740
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
6712
6741
  /**
6713
6742
  * Enforce throwing `TypeError` in type checking conditions.
6714
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
6743
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prefer-type-error.md
6715
6744
  */
6716
6745
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
6717
6746
  /**
6718
6747
  * Prevent abbreviations.
6719
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
6748
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/prevent-abbreviations.md
6720
6749
  */
6721
6750
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
6722
6751
  /**
6723
6752
  * Enforce consistent relative URL style.
6724
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
6753
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/relative-url-style.md
6725
6754
  */
6726
6755
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
6727
6756
  /**
6728
6757
  * Enforce using the separator argument with `Array#join()`.
6729
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
6758
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-array-join-separator.md
6730
6759
  */
6731
6760
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
6761
+ /**
6762
+ * Require non-empty module attributes for imports and exports
6763
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-attributes.md
6764
+ */
6765
+ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
6732
6766
  /**
6733
6767
  * Require non-empty specifier list in import and export statements.
6734
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
6768
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-module-specifiers.md
6735
6769
  */
6736
6770
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
6737
6771
  /**
6738
6772
  * Enforce using the digits argument with `Number#toFixed()`.
6739
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
6773
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-number-to-fixed-digits-argument.md
6740
6774
  */
6741
6775
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
6742
6776
  /**
6743
6777
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
6744
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
6778
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/require-post-message-target-origin.md
6745
6779
  */
6746
6780
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
6747
6781
  /**
6748
6782
  * Enforce better string content.
6749
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
6783
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/string-content.md
6750
6784
  */
6751
6785
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
6752
6786
  /**
6753
6787
  * Enforce consistent brace style for `case` clauses.
6754
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
6788
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/switch-case-braces.md
6755
6789
  */
6756
6790
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
6757
6791
  /**
6758
6792
  * Fix whitespace-insensitive template indentation.
6759
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
6793
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/template-indent.md
6760
6794
  */
6761
6795
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
6762
6796
  /**
6763
6797
  * Enforce consistent case for text encoding identifiers.
6764
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
6798
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/text-encoding-identifier-case.md
6765
6799
  */
6766
6800
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
6767
6801
  /**
6768
6802
  * Require `new` when creating an error.
6769
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
6803
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.1/docs/rules/throw-new-error.md
6770
6804
  */
6771
6805
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
6772
6806
  /**
@@ -10316,6 +10350,10 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
10316
10350
  type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
10317
10351
  ignoreForLoopInit?: boolean;
10318
10352
  }]);
10353
+ // ----- jsdoc/check-alignment -----
10354
+ type JsdocCheckAlignment = [] | [{
10355
+ innerIndent?: number;
10356
+ }];
10319
10357
  // ----- jsdoc/check-examples -----
10320
10358
  type JsdocCheckExamples = [] | [{
10321
10359
  allowInlineConfig?: boolean;
@@ -10605,6 +10643,7 @@ type JsdocRequireJsdoc = [] | [{
10605
10643
  enableFixer?: boolean;
10606
10644
  exemptEmptyConstructors?: boolean;
10607
10645
  exemptEmptyFunctions?: boolean;
10646
+ exemptOverloadedImplementations?: boolean;
10608
10647
  fixerMessage?: string;
10609
10648
  minLineCount?: number;
10610
10649
  publicOnly?: (boolean | {
@@ -10621,6 +10660,7 @@ type JsdocRequireJsdoc = [] | [{
10621
10660
  FunctionExpression?: boolean;
10622
10661
  MethodDefinition?: boolean;
10623
10662
  };
10663
+ skipInterveningOverloadedDeclarations?: boolean;
10624
10664
  }];
10625
10665
  // ----- jsdoc/require-param -----
10626
10666
  type JsdocRequireParam = [] | [{
@@ -14178,6 +14218,10 @@ type PreferReflect = [] | [{
14178
14218
  type PreferRegexLiterals = [] | [{
14179
14219
  disallowRedundantWrapping?: boolean;
14180
14220
  }];
14221
+ // ----- preserve-caught-error -----
14222
+ type PreserveCaughtError = [] | [{
14223
+ requireCatchParameter?: boolean;
14224
+ }];
14181
14225
  // ----- prettier/prettier -----
14182
14226
  type PrettierPrettier = [] | [{
14183
14227
  [k: string]: unknown | undefined;
@@ -15299,6 +15343,10 @@ type UnicornNoArrayReduce = [] | [{
15299
15343
  type UnicornNoArrayReverse = [] | [{
15300
15344
  allowExpressionStatement?: boolean;
15301
15345
  }];
15346
+ // ----- unicorn/no-array-sort -----
15347
+ type UnicornNoArraySort = [] | [{
15348
+ allowExpressionStatement?: boolean;
15349
+ }];
15302
15350
  // ----- unicorn/no-instanceof-builtins -----
15303
15351
  type UnicornNoInstanceofBuiltins = [] | [{
15304
15352
  useErrorIsError?: boolean;
package/dist/index.js CHANGED
@@ -162,7 +162,7 @@ const sharedRules = {
162
162
  ...pluginVue.configs["strongly-recommended"].rules,
163
163
  ...pluginVue.configs.recommended.rules
164
164
  };
165
- const disabledRules$1 = {
165
+ const disabledRules = {
166
166
  "vue/multi-word-component-names": "off",
167
167
  "vue/no-setup-props-reactivity-loss": "off",
168
168
  "vue/no-v-html": "off",
@@ -448,7 +448,7 @@ const configVue = (options = {}) => {
448
448
  "shorthand",
449
449
  { sameNameShorthand: "always" }
450
450
  ],
451
- ...disabledRules$1,
451
+ ...disabledRules,
452
452
  ...extensionRules,
453
453
  ...unCategorizedRules,
454
454
  ...options.overrides
@@ -2046,15 +2046,14 @@ const configImportX = (options = {}) => {
2046
2046
 
2047
2047
  //#endregion
2048
2048
  //#region src/configs/unicorn.ts
2049
- const disabledRules = {
2050
- "unicorn/better-regex": "off",
2051
- "unicorn/explicit-length-check": "off",
2052
- "unicorn/no-array-callback-reference": "off",
2053
- "unicorn/no-array-reverse": "off",
2054
- "unicorn/prefer-global-this": "off",
2055
- "unicorn/prefer-top-level-await": "off",
2056
- "unicorn/require-module-specifiers": "off"
2057
- };
2049
+ /**
2050
+ * Built-in presets of `eslint-plugin-unicorn`
2051
+ */
2052
+ const PLUGIN_UNICORN_PRESET = [
2053
+ "all",
2054
+ "recommended",
2055
+ "unopinionated"
2056
+ ];
2058
2057
  /**
2059
2058
  * Config for powerful rules
2060
2059
  *
@@ -2063,82 +2062,102 @@ const disabledRules = {
2063
2062
  * @param options - {@link ConfigUnicornOptions}
2064
2063
  * @returns ESLint configs
2065
2064
  */
2066
- const configUnicorn = (options = {}) => [{
2067
- name: "ntnyq/unicorn",
2068
- plugins: { unicorn: pluginUnicorn },
2069
- rules: {
2070
- "unicorn/consistent-assert": "error",
2071
- "unicorn/consistent-existence-index-check": "error",
2072
- "unicorn/error-message": "error",
2073
- "unicorn/escape-case": "error",
2074
- "unicorn/new-for-builtins": "error",
2075
- "unicorn/no-accessor-recursion": "error",
2076
- "unicorn/no-console-spaces": "error",
2077
- "unicorn/no-for-loop": "error",
2078
- "unicorn/no-hex-escape": "error",
2079
- "unicorn/no-instanceof-builtins": "error",
2080
- "unicorn/no-lonely-if": "error",
2081
- "unicorn/no-new-buffer": "error",
2082
- "unicorn/no-static-only-class": "error",
2083
- "unicorn/no-typeof-undefined": "error",
2084
- "unicorn/no-unnecessary-await": "error",
2085
- "unicorn/prefer-class-fields": "error",
2086
- "unicorn/prefer-import-meta-properties": "error",
2087
- "unicorn/prefer-includes": "error",
2088
- "unicorn/prefer-keyboard-event-key": "error",
2089
- "unicorn/prefer-math-min-max": "error",
2090
- "unicorn/prefer-math-trunc": "error",
2091
- "unicorn/prefer-modern-math-apis": "error",
2092
- "unicorn/prefer-negative-index": "error",
2093
- "unicorn/prefer-node-protocol": "error",
2094
- "unicorn/prefer-optional-catch-binding": "error",
2095
- "unicorn/prefer-prototype-methods": "error",
2096
- "unicorn/prefer-reflect-apply": "error",
2097
- "unicorn/prefer-structured-clone": "error",
2098
- "unicorn/switch-case-braces": ["error", "avoid"],
2099
- "unicorn/catch-error-name": ["error", {
2100
- name: "err",
2101
- ignore: ["^_."]
2102
- }],
2103
- "unicorn/custom-error-definition": "error",
2104
- "unicorn/no-useless-error-capture-stack-trace": "error",
2105
- "unicorn/prefer-type-error": "error",
2106
- "unicorn/throw-new-error": "error",
2107
- "unicorn/no-zero-fractions": "error",
2108
- "unicorn/number-literal-case": "error",
2109
- "unicorn/prefer-number-properties": "error",
2110
- "unicorn/prefer-regexp-test": "error",
2111
- "unicorn/consistent-date-clone": "error",
2112
- "unicorn/prefer-date-now": "error",
2113
- "unicorn/prefer-code-point": "error",
2114
- "unicorn/prefer-string-slice": "error",
2115
- "unicorn/prefer-string-starts-ends-with": "error",
2116
- "unicorn/prefer-string-trim-start-end": "error",
2117
- "unicorn/no-invalid-remove-event-listener": "error",
2118
- "unicorn/prefer-add-event-listener": "error",
2119
- "unicorn/prefer-dom-node-append": "error",
2120
- "unicorn/prefer-dom-node-dataset": "error",
2121
- "unicorn/prefer-dom-node-remove": "error",
2122
- "unicorn/prefer-dom-node-text-content": "error",
2123
- "unicorn/prefer-modern-dom-apis": "error",
2124
- "unicorn/prefer-query-selector": "error",
2125
- "unicorn/no-array-method-this-argument": "error",
2126
- "unicorn/no-new-array": "error",
2127
- "unicorn/no-unnecessary-array-flat-depth": "error",
2128
- "unicorn/no-unnecessary-array-splice-count": "error",
2129
- "unicorn/no-unnecessary-slice-end": "error",
2130
- "unicorn/prefer-array-find": "error",
2131
- "unicorn/prefer-array-flat-map": "error",
2132
- "unicorn/prefer-array-index-of": "error",
2133
- "unicorn/prefer-array-some": "error",
2134
- "unicorn/prefer-single-call": "error",
2135
- "unicorn/require-array-join-separator": "error",
2136
- "unicorn/prefer-set-has": "error",
2137
- "unicorn/prefer-set-size": "error",
2138
- ...disabledRules,
2139
- ...options.overrides
2140
- }
2141
- }];
2065
+ const configUnicorn = (options = {}) => {
2066
+ if (options.preset && PLUGIN_UNICORN_PRESET.includes(options.preset)) return [{
2067
+ name: `ntnyq/unicorn/${options.preset}`,
2068
+ plugins: { unicorn: pluginUnicorn },
2069
+ rules: {
2070
+ ...pluginUnicorn.configs[options.preset].rules,
2071
+ ...options.overrides
2072
+ }
2073
+ }];
2074
+ return [{
2075
+ name: "ntnyq/unicorn",
2076
+ plugins: { unicorn: pluginUnicorn },
2077
+ rules: {
2078
+ "unicorn/explicit-length-check": "off",
2079
+ "unicorn/prefer-global-this": "off",
2080
+ "unicorn/prefer-top-level-await": "off",
2081
+ "unicorn/consistent-assert": "error",
2082
+ "unicorn/consistent-existence-index-check": "error",
2083
+ "unicorn/error-message": "error",
2084
+ "unicorn/escape-case": "error",
2085
+ "unicorn/new-for-builtins": "error",
2086
+ "unicorn/no-accessor-recursion": "error",
2087
+ "unicorn/no-console-spaces": "error",
2088
+ "unicorn/no-for-loop": "error",
2089
+ "unicorn/no-hex-escape": "error",
2090
+ "unicorn/no-instanceof-builtins": "error",
2091
+ "unicorn/no-lonely-if": "error",
2092
+ "unicorn/no-new-buffer": "error",
2093
+ "unicorn/no-static-only-class": "error",
2094
+ "unicorn/no-typeof-undefined": "error",
2095
+ "unicorn/no-unnecessary-await": "error",
2096
+ "unicorn/prefer-class-fields": "error",
2097
+ "unicorn/prefer-import-meta-properties": "error",
2098
+ "unicorn/prefer-includes": "error",
2099
+ "unicorn/prefer-keyboard-event-key": "error",
2100
+ "unicorn/prefer-math-min-max": "error",
2101
+ "unicorn/prefer-math-trunc": "error",
2102
+ "unicorn/prefer-modern-math-apis": "error",
2103
+ "unicorn/prefer-negative-index": "error",
2104
+ "unicorn/prefer-node-protocol": "error",
2105
+ "unicorn/prefer-optional-catch-binding": "error",
2106
+ "unicorn/prefer-prototype-methods": "error",
2107
+ "unicorn/prefer-reflect-apply": "error",
2108
+ "unicorn/prefer-structured-clone": "error",
2109
+ "unicorn/switch-case-braces": ["error", "avoid"],
2110
+ "unicorn/catch-error-name": ["error", {
2111
+ name: "err",
2112
+ ignore: ["^_."]
2113
+ }],
2114
+ "unicorn/custom-error-definition": "error",
2115
+ "unicorn/no-useless-error-capture-stack-trace": "error",
2116
+ "unicorn/prefer-type-error": "error",
2117
+ "unicorn/throw-new-error": "error",
2118
+ "unicorn/no-zero-fractions": "error",
2119
+ "unicorn/number-literal-case": "error",
2120
+ "unicorn/prefer-number-properties": "error",
2121
+ "unicorn/prefer-bigint-literals": "error",
2122
+ "unicorn/better-regex": "off",
2123
+ "unicorn/prefer-regexp-test": "error",
2124
+ "unicorn/consistent-date-clone": "error",
2125
+ "unicorn/prefer-date-now": "error",
2126
+ "unicorn/prefer-code-point": "error",
2127
+ "unicorn/prefer-string-slice": "error",
2128
+ "unicorn/prefer-string-starts-ends-with": "error",
2129
+ "unicorn/prefer-string-trim-start-end": "error",
2130
+ "unicorn/no-invalid-remove-event-listener": "error",
2131
+ "unicorn/prefer-add-event-listener": "error",
2132
+ "unicorn/prefer-classlist-toggle": "error",
2133
+ "unicorn/prefer-dom-node-append": "error",
2134
+ "unicorn/prefer-dom-node-dataset": "error",
2135
+ "unicorn/prefer-dom-node-remove": "error",
2136
+ "unicorn/prefer-dom-node-text-content": "error",
2137
+ "unicorn/prefer-modern-dom-apis": "error",
2138
+ "unicorn/prefer-query-selector": "error",
2139
+ "unicorn/no-array-callback-reference": "off",
2140
+ "unicorn/no-array-reverse": "off",
2141
+ "unicorn/no-array-sort": "off",
2142
+ "unicorn/no-array-method-this-argument": "error",
2143
+ "unicorn/no-new-array": "error",
2144
+ "unicorn/no-unnecessary-array-flat-depth": "error",
2145
+ "unicorn/no-unnecessary-array-splice-count": "error",
2146
+ "unicorn/no-unnecessary-slice-end": "error",
2147
+ "unicorn/prefer-array-find": "error",
2148
+ "unicorn/prefer-array-flat-map": "error",
2149
+ "unicorn/prefer-array-index-of": "error",
2150
+ "unicorn/prefer-array-some": "error",
2151
+ "unicorn/prefer-single-call": "error",
2152
+ "unicorn/require-array-join-separator": "error",
2153
+ "unicorn/prefer-set-has": "error",
2154
+ "unicorn/prefer-set-size": "error",
2155
+ "unicorn/require-module-specifiers": "off",
2156
+ "unicorn/require-module-attributes": "error",
2157
+ ...options.overrides
2158
+ }
2159
+ }];
2160
+ };
2142
2161
 
2143
2162
  //#endregion
2144
2163
  //#region src/configs/deMorgan.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "5.4.2",
4
+ "version": "5.5.0",
5
5
  "description": "An opinionated ESLint config preset of ntnyq",
6
6
  "keywords": [
7
7
  "eslint",
@@ -88,10 +88,10 @@
88
88
  "@antfu/install-pkg": "^1.1.0",
89
89
  "@clack/prompts": "^0.11.0",
90
90
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
91
- "@eslint/js": "^9.34.0",
91
+ "@eslint/js": "^9.35.0",
92
92
  "@eslint/markdown": "^7.2.0",
93
- "@unocss/eslint-plugin": "^66.5.0",
94
- "@vitest/eslint-plugin": "^1.3.7",
93
+ "@unocss/eslint-plugin": "^66.5.1",
94
+ "@vitest/eslint-plugin": "^1.3.9",
95
95
  "eslint-config-flat-gitignore": "^2.1.0",
96
96
  "eslint-flat-config-utils": "^2.1.1",
97
97
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -103,7 +103,7 @@
103
103
  "eslint-plugin-depend": "^1.2.0",
104
104
  "eslint-plugin-github-action": "^0.0.16",
105
105
  "eslint-plugin-import-x": "^4.16.1",
106
- "eslint-plugin-jsdoc": "^54.3.0",
106
+ "eslint-plugin-jsdoc": "^54.5.0",
107
107
  "eslint-plugin-jsonc": "^2.20.1",
108
108
  "eslint-plugin-n": "^17.21.3",
109
109
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -114,7 +114,7 @@
114
114
  "eslint-plugin-regexp": "^2.10.0",
115
115
  "eslint-plugin-svgo": "^0.11.1",
116
116
  "eslint-plugin-toml": "^0.12.0",
117
- "eslint-plugin-unicorn": "^60.0.0",
117
+ "eslint-plugin-unicorn": "^61.0.1",
118
118
  "eslint-plugin-vue": "^10.4.0",
119
119
  "eslint-plugin-yml": "^1.18.0",
120
120
  "eslint-processor-vue-blocks": "^2.0.0",
@@ -128,18 +128,18 @@
128
128
  },
129
129
  "devDependencies": {
130
130
  "@ntnyq/prettier-config": "^3.0.1",
131
- "@types/node": "^24.3.0",
131
+ "@types/node": "^24.3.1",
132
132
  "@typescript-eslint/utils": "^8.42.0",
133
133
  "bumpp": "^10.2.3",
134
134
  "consola": "^3.4.2",
135
- "eslint": "^9.34.0",
135
+ "eslint": "^9.35.0",
136
136
  "eslint-typegen": "^2.3.0",
137
137
  "husky": "^9.1.7",
138
138
  "jiti": "^2.5.1",
139
139
  "nano-staged": "^0.8.0",
140
140
  "npm-run-all2": "^8.0.4",
141
141
  "prettier": "^3.6.2",
142
- "tinyglobby": "^0.2.14",
142
+ "tinyglobby": "^0.2.15",
143
143
  "tsdown": "^0.14.2",
144
144
  "tsx": "^4.20.5",
145
145
  "typescript": "^5.9.2",