@shayanthenerd/eslint-config 0.27.2 → 0.28.1
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/configs/css.mjs +6 -2
- package/dist/configs/markdown.mjs +6 -2
- package/dist/rules/css.mjs +8 -3
- package/dist/rules/markdown.mjs +4 -2
- package/dist/rules/stylistic.mjs +22 -4
- package/dist/rules/unicorn.mjs +3 -0
- package/dist/rules/zod.mjs +6 -0
- package/dist/types/eslint-schema.d.mts +438 -336
- package/package.json +9 -9
|
@@ -6179,1670 +6179,1715 @@ interface ESLintSchema {
|
|
|
6179
6179
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6180
6180
|
/**
|
|
6181
6181
|
* Prefer better DOM traversal APIs.
|
|
6182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/better-dom-traversing.md
|
|
6183
6183
|
*/
|
|
6184
6184
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6185
6185
|
/**
|
|
6186
6186
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6188
6188
|
* @deprecated
|
|
6189
6189
|
*/
|
|
6190
6190
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6191
6191
|
/**
|
|
6192
6192
|
* Enforce a specific parameter name in catch clauses.
|
|
6193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/catch-error-name.md
|
|
6194
6194
|
*/
|
|
6195
6195
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6196
6196
|
/**
|
|
6197
6197
|
* Enforce consistent class references in static methods.
|
|
6198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6199
6199
|
*/
|
|
6200
6200
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6201
6201
|
/**
|
|
6202
6202
|
* Enforce better comment content.
|
|
6203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/comment-content.md
|
|
6204
6204
|
*/
|
|
6205
6205
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6206
6206
|
/**
|
|
6207
6207
|
* Enforce consistent assertion style with `node:assert`.
|
|
6208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-assert.md
|
|
6209
6209
|
*/
|
|
6210
6210
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6211
6211
|
/**
|
|
6212
6212
|
* Enforce consistent naming for boolean names.
|
|
6213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-boolean-name.md
|
|
6214
6214
|
*/
|
|
6215
6215
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6216
6216
|
/**
|
|
6217
6217
|
* Enforce consistent class member order.
|
|
6218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-class-member-order.md
|
|
6219
6219
|
*/
|
|
6220
6220
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6221
6221
|
/**
|
|
6222
6222
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-compound-words.md
|
|
6224
6224
|
*/
|
|
6225
6225
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6226
6226
|
/**
|
|
6227
6227
|
* Enforce consistent conditional object spread style.
|
|
6228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6229
6229
|
*/
|
|
6230
6230
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6231
6231
|
/**
|
|
6232
6232
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-date-clone.md
|
|
6234
6234
|
*/
|
|
6235
6235
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6236
6236
|
/**
|
|
6237
6237
|
* Use destructured variables over properties.
|
|
6238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-destructuring.md
|
|
6239
6239
|
*/
|
|
6240
6240
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6241
6241
|
/**
|
|
6242
6242
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6244
6244
|
*/
|
|
6245
6245
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6246
6246
|
/**
|
|
6247
6247
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-existence-index-check.md
|
|
6249
6249
|
*/
|
|
6250
6250
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6251
6251
|
/**
|
|
6252
6252
|
* Enforce consistent decorator position on exported classes.
|
|
6253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6254
6254
|
*/
|
|
6255
6255
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6256
6256
|
/**
|
|
6257
6257
|
* Move function definitions to the highest possible scope.
|
|
6258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-scoping.md
|
|
6259
6259
|
*/
|
|
6260
6260
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6261
6261
|
/**
|
|
6262
6262
|
* Enforce function syntax by role.
|
|
6263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-style.md
|
|
6264
6264
|
*/
|
|
6265
6265
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6266
6266
|
/**
|
|
6267
6267
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-json-file-read.md
|
|
6269
6269
|
*/
|
|
6270
6270
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6271
6271
|
/**
|
|
6272
6272
|
* Enforce consistent optional chaining for same-base member access.
|
|
6273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-optional-chaining.md
|
|
6274
6274
|
*/
|
|
6275
6275
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6276
6276
|
/**
|
|
6277
6277
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6279
6279
|
*/
|
|
6280
6280
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6281
6281
|
/**
|
|
6282
6282
|
* Enforce consistent labels on tuple type elements.
|
|
6283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-tuple-labels.md
|
|
6284
6284
|
*/
|
|
6285
6285
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6286
6286
|
/**
|
|
6287
6287
|
* Enforce correct `Error` subclassing.
|
|
6288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/custom-error-definition.md
|
|
6289
6289
|
*/
|
|
6290
6290
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6291
6291
|
/**
|
|
6292
6292
|
* Enforce consistent default export declarations.
|
|
6293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/default-export-style.md
|
|
6294
6294
|
*/
|
|
6295
6295
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6296
6296
|
/**
|
|
6297
6297
|
* Enforce consistent style for DOM element dataset access.
|
|
6298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/dom-node-dataset.md
|
|
6299
6299
|
*/
|
|
6300
6300
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6301
6301
|
/**
|
|
6302
6302
|
* Enforce no spaces between braces.
|
|
6303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/empty-brace-spaces.md
|
|
6304
6304
|
*/
|
|
6305
6305
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6306
6306
|
/**
|
|
6307
6307
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/error-message.md
|
|
6309
6309
|
*/
|
|
6310
6310
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6311
6311
|
/**
|
|
6312
6312
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/escape-case.md
|
|
6314
6314
|
*/
|
|
6315
6315
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6316
6316
|
/**
|
|
6317
6317
|
* Add expiration conditions to TODO comments.
|
|
6318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/expiring-todo-comments.md
|
|
6319
6319
|
*/
|
|
6320
6320
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6321
6321
|
/**
|
|
6322
6322
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-length-check.md
|
|
6324
6324
|
*/
|
|
6325
6325
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6326
6326
|
/**
|
|
6327
6327
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-timer-delay.md
|
|
6329
6329
|
*/
|
|
6330
6330
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6331
6331
|
/**
|
|
6332
6332
|
* Enforce a case style for filenames and directory names.
|
|
6333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/filename-case.md
|
|
6334
6334
|
*/
|
|
6335
6335
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6336
6336
|
/**
|
|
6337
6337
|
* Require identifiers to match a specified regular expression.
|
|
6338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/id-match.md
|
|
6339
6339
|
*/
|
|
6340
6340
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6341
6341
|
/**
|
|
6342
6342
|
* Enforce specific import styles per module.
|
|
6343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/import-style.md
|
|
6344
6344
|
*/
|
|
6345
6345
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6346
6346
|
/**
|
|
6347
6347
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/isolated-functions.md
|
|
6349
6349
|
*/
|
|
6350
6350
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6351
6351
|
/**
|
|
6352
6352
|
* Require or disallow logical assignment operator shorthand
|
|
6353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/logical-assignment-operators.md
|
|
6354
6354
|
*/
|
|
6355
6355
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6356
6356
|
/**
|
|
6357
6357
|
* Limit the depth of nested calls.
|
|
6358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/max-nested-calls.md
|
|
6359
6359
|
*/
|
|
6360
6360
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6361
6361
|
/**
|
|
6362
6362
|
* Enforce replacements for variable, property, and filenames.
|
|
6363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/name-replacements.md
|
|
6364
6364
|
*/
|
|
6365
6365
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6366
6366
|
/**
|
|
6367
6367
|
* Enforce correct use of `new` for builtin constructors.
|
|
6368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/new-for-builtins.md
|
|
6369
6369
|
*/
|
|
6370
6370
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6371
6371
|
/**
|
|
6372
6372
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6374
6374
|
*/
|
|
6375
6375
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6376
6376
|
/**
|
|
6377
6377
|
* Disallow recursive access to `this` within getters and setters.
|
|
6378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accessor-recursion.md
|
|
6379
6379
|
*/
|
|
6380
6380
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6381
6381
|
/**
|
|
6382
6382
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6384
6384
|
*/
|
|
6385
6385
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6386
6386
|
/**
|
|
6387
6387
|
* Disallow anonymous functions and classes as the default export.
|
|
6388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-anonymous-default-export.md
|
|
6389
6389
|
*/
|
|
6390
6390
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6391
6391
|
/**
|
|
6392
6392
|
* Prevent passing a function reference directly to iterator methods.
|
|
6393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-callback-reference.md
|
|
6394
6394
|
*/
|
|
6395
6395
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6396
6396
|
/**
|
|
6397
6397
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6399
6399
|
*/
|
|
6400
6400
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6401
6401
|
/**
|
|
6402
6402
|
* Disallow using reference values as `Array#fill()` values.
|
|
6403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6404
6404
|
*/
|
|
6405
6405
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6406
6406
|
/**
|
|
6407
6407
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-from-fill.md
|
|
6409
6409
|
*/
|
|
6410
6410
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6411
6411
|
/**
|
|
6412
6412
|
* Disallow front-of-array mutation.
|
|
6413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-front-mutation.md
|
|
6414
6414
|
*/
|
|
6415
6415
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6416
6416
|
/**
|
|
6417
6417
|
* Disallow using the `this` argument in array methods.
|
|
6418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-method-this-argument.md
|
|
6419
6419
|
*/
|
|
6420
6420
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6421
6421
|
/**
|
|
6422
6422
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6424
6424
|
* @deprecated
|
|
6425
6425
|
*/
|
|
6426
6426
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6427
6427
|
/**
|
|
6428
6428
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reduce.md
|
|
6430
6430
|
*/
|
|
6431
6431
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6432
6432
|
/**
|
|
6433
6433
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reverse.md
|
|
6435
6435
|
*/
|
|
6436
6436
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6437
6437
|
/**
|
|
6438
6438
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort.md
|
|
6440
6440
|
*/
|
|
6441
6441
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6442
6442
|
/**
|
|
6443
6443
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6445
6445
|
*/
|
|
6446
6446
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6447
6447
|
/**
|
|
6448
6448
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-splice.md
|
|
6450
6450
|
*/
|
|
6451
6451
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6452
6452
|
/**
|
|
6453
6453
|
* Disallow asterisk prefixes in documentation comments.
|
|
6454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6455
6455
|
*/
|
|
6456
6456
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6457
6457
|
/**
|
|
6458
6458
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-async-promise-finally.md
|
|
6460
6460
|
*/
|
|
6461
6461
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6462
6462
|
/**
|
|
6463
6463
|
* Disallow member access from await expression.
|
|
6464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-expression-member.md
|
|
6465
6465
|
*/
|
|
6466
6466
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6467
6467
|
/**
|
|
6468
6468
|
* Disallow using `await` in `Promise` method parameters.
|
|
6469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6470
6470
|
*/
|
|
6471
6471
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6472
6472
|
/**
|
|
6473
6473
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-blob-to-file.md
|
|
6475
6475
|
*/
|
|
6476
6476
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6477
6477
|
/**
|
|
6478
6478
|
* Disallow boolean-returning sort comparators.
|
|
6479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6480
6480
|
*/
|
|
6481
6481
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6482
6482
|
/**
|
|
6483
6483
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6485
6485
|
*/
|
|
6486
6486
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6487
6487
|
/**
|
|
6488
6488
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-canvas-to-image.md
|
|
6490
6490
|
*/
|
|
6491
6491
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6492
6492
|
/**
|
|
6493
6493
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-chained-comparison.md
|
|
6495
6495
|
*/
|
|
6496
6496
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6497
6497
|
/**
|
|
6498
6498
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-collection-bracket-access.md
|
|
6500
6500
|
*/
|
|
6501
6501
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6502
6502
|
/**
|
|
6503
6503
|
* Disallow dynamic object property existence checks.
|
|
6504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6505
6505
|
*/
|
|
6506
6506
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6507
6507
|
/**
|
|
6508
6508
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-splice.md
|
|
6510
6510
|
*/
|
|
6511
6511
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6512
6512
|
/**
|
|
6513
6513
|
* Disallow confusing uses of `Array#with()`.
|
|
6514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-with.md
|
|
6515
6515
|
*/
|
|
6516
6516
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6517
6517
|
/**
|
|
6518
6518
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-console-spaces.md
|
|
6520
6520
|
*/
|
|
6521
6521
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6522
6522
|
/**
|
|
6523
6523
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-constant-zero-expression.md
|
|
6525
6525
|
*/
|
|
6526
6526
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6527
6527
|
/**
|
|
6528
6528
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6530
6530
|
*/
|
|
6531
6531
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6532
6532
|
/**
|
|
6533
6533
|
* Do not use `document.cookie` directly.
|
|
6534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-document-cookie.md
|
|
6535
6535
|
*/
|
|
6536
6536
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6537
6537
|
/**
|
|
6538
6538
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-double-comparison.md
|
|
6540
6540
|
*/
|
|
6541
6541
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6542
6542
|
/**
|
|
6543
6543
|
* Disallow duplicate adjacent branches in if chains.
|
|
6544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6545
6545
|
*/
|
|
6546
6546
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6547
6547
|
/**
|
|
6548
6548
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6550
6550
|
*/
|
|
6551
6551
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6552
6552
|
/**
|
|
6553
6553
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-loops.md
|
|
6555
6555
|
*/
|
|
6556
6556
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6557
6557
|
/**
|
|
6558
6558
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-set-values.md
|
|
6560
6560
|
*/
|
|
6561
6561
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6562
6562
|
/**
|
|
6563
6563
|
* Disallow empty files.
|
|
6564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-empty-file.md
|
|
6565
6565
|
*/
|
|
6566
6566
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6567
6567
|
/**
|
|
6568
6568
|
* Disallow assigning to built-in error properties.
|
|
6569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-error-property-assignment.md
|
|
6570
6570
|
*/
|
|
6571
6571
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6572
6572
|
/**
|
|
6573
6573
|
* Disallow exports in scripts.
|
|
6574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-exports-in-scripts.md
|
|
6575
6575
|
*/
|
|
6576
6576
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6577
6577
|
/**
|
|
6578
6578
|
* Prefer `for…of` over the `forEach` method.
|
|
6579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-each.md
|
|
6580
6580
|
*/
|
|
6581
6581
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6582
6582
|
/**
|
|
6583
6583
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-loop.md
|
|
6585
6585
|
*/
|
|
6586
6586
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6587
6587
|
/**
|
|
6588
6588
|
* Disallow assigning properties on the global object.
|
|
6589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6590
6590
|
*/
|
|
6591
6591
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6592
6592
|
/**
|
|
6593
6593
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6595
6595
|
* @deprecated
|
|
6596
6596
|
*/
|
|
6597
6597
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6598
6598
|
/**
|
|
6599
6599
|
* Disallow immediate mutation after variable assignment.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-immediate-mutation.md
|
|
6601
6601
|
*/
|
|
6602
6602
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6603
6603
|
/**
|
|
6604
6604
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6606
6606
|
*/
|
|
6607
6607
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6608
6608
|
/**
|
|
6609
6609
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6611
6611
|
*/
|
|
6612
6612
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6613
6613
|
/**
|
|
6614
6614
|
* Disallow incorrect template literal interpolation syntax.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6616
6616
|
*/
|
|
6617
6617
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6618
6618
|
/**
|
|
6619
6619
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6621
6621
|
* @deprecated
|
|
6622
6622
|
*/
|
|
6623
6623
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6624
6624
|
/**
|
|
6625
6625
|
* Disallow `instanceof` with built-in objects
|
|
6626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-instanceof-builtins.md
|
|
6627
6627
|
*/
|
|
6628
6628
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6629
6629
|
/**
|
|
6630
6630
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-argument-count.md
|
|
6632
6632
|
*/
|
|
6633
6633
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6634
6634
|
/**
|
|
6635
6635
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
6636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6637
6637
|
*/
|
|
6638
6638
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6639
6639
|
/**
|
|
6640
6640
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6642
6642
|
*/
|
|
6643
6643
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6644
6644
|
/**
|
|
6645
6645
|
* Disallow invalid `accept` values on file inputs.
|
|
6646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6647
6647
|
*/
|
|
6648
6648
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6649
6649
|
/**
|
|
6650
6650
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6652
6652
|
*/
|
|
6653
6653
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6654
6654
|
/**
|
|
6655
6655
|
* Disallow invalid implementations of well-known symbol methods.
|
|
6656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6657
6657
|
*/
|
|
6658
6658
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6659
6659
|
/**
|
|
6660
6660
|
* Disallow identifiers starting with `new` or `class`.
|
|
6661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-keyword-prefix.md
|
|
6662
6662
|
*/
|
|
6663
6663
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6664
6664
|
/**
|
|
6665
6665
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-current-target-access.md
|
|
6667
6667
|
*/
|
|
6668
6668
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6669
6669
|
/**
|
|
6670
6670
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
6671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-event-control.md
|
|
6672
6672
|
*/
|
|
6673
6673
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
6674
6674
|
/**
|
|
6675
6675
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6677
6677
|
* @deprecated
|
|
6678
6678
|
*/
|
|
6679
6679
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6680
6680
|
/**
|
|
6681
6681
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-lonely-if.md
|
|
6683
6683
|
*/
|
|
6684
6684
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6685
6685
|
/**
|
|
6686
6686
|
* Disallow mutating a loop iterable during iteration.
|
|
6687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6688
6688
|
*/
|
|
6689
6689
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6690
6690
|
/**
|
|
6691
6691
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6693
6693
|
*/
|
|
6694
6694
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6695
6695
|
/**
|
|
6696
6696
|
* Disallow manually wrapped comments.
|
|
6697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6698
6698
|
*/
|
|
6699
6699
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6700
6700
|
/**
|
|
6701
6701
|
* Disallow checking a Map key before accessing a different key.
|
|
6702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-mismatched-map-key.md
|
|
6703
6703
|
*/
|
|
6704
6704
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6705
6705
|
/**
|
|
6706
6706
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6708
6708
|
*/
|
|
6709
6709
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6710
|
+
/**
|
|
6711
|
+
* Disallow references to missing local resources.
|
|
6712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-missing-local-resource.md
|
|
6713
|
+
*/
|
|
6714
|
+
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
6715
|
+
/**
|
|
6716
|
+
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
6717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
6718
|
+
*/
|
|
6719
|
+
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
6710
6720
|
/**
|
|
6711
6721
|
* Disallow named usage of default import and export.
|
|
6712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-named-default.md
|
|
6713
6723
|
*/
|
|
6714
6724
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6715
6725
|
/**
|
|
6716
6726
|
* Disallow negated array predicate calls.
|
|
6717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-array-predicate.md
|
|
6718
6728
|
*/
|
|
6719
6729
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6720
6730
|
/**
|
|
6721
6731
|
* Disallow negated comparisons.
|
|
6722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-comparison.md
|
|
6723
6733
|
*/
|
|
6724
6734
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6725
6735
|
/**
|
|
6726
6736
|
* Disallow negated conditions.
|
|
6727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-condition.md
|
|
6728
6738
|
*/
|
|
6729
6739
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6730
6740
|
/**
|
|
6731
6741
|
* Disallow negated expression in equality check.
|
|
6732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6733
6743
|
*/
|
|
6734
6744
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6735
6745
|
/**
|
|
6736
6746
|
* Disallow nested ternary expressions.
|
|
6737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nested-ternary.md
|
|
6738
6748
|
*/
|
|
6739
6749
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6740
6750
|
/**
|
|
6741
6751
|
* Disallow `new Array()`.
|
|
6742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-array.md
|
|
6743
6753
|
*/
|
|
6744
6754
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6745
6755
|
/**
|
|
6746
6756
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-buffer.md
|
|
6748
6758
|
*/
|
|
6749
6759
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6750
6760
|
/**
|
|
6751
6761
|
* Disallow non-function values with function-style verb prefixes.
|
|
6752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6753
6763
|
*/
|
|
6754
6764
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6755
6765
|
/**
|
|
6756
6766
|
* Disallow non-standard properties on built-in objects.
|
|
6757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6758
6768
|
*/
|
|
6759
6769
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6760
6770
|
/**
|
|
6761
6771
|
* Disallow the use of the `null` literal.
|
|
6762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-null.md
|
|
6763
6773
|
*/
|
|
6764
6774
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6765
6775
|
/**
|
|
6766
6776
|
* Disallow the use of objects as default parameters.
|
|
6767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6768
6778
|
*/
|
|
6769
6779
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6770
6780
|
/**
|
|
6771
6781
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6773
6783
|
*/
|
|
6774
6784
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6775
6785
|
/**
|
|
6776
6786
|
* Disallow optional chaining on undeclared variables.
|
|
6777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6778
6788
|
*/
|
|
6779
6789
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6780
6790
|
/**
|
|
6781
6791
|
* Disallow `process.exit()`.
|
|
6782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-process-exit.md
|
|
6783
6793
|
*/
|
|
6784
6794
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6785
6795
|
/**
|
|
6786
6796
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-redundant-comparison.md
|
|
6788
6798
|
*/
|
|
6789
6799
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6790
6800
|
/**
|
|
6791
6801
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-return-array-push.md
|
|
6793
6803
|
*/
|
|
6794
6804
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6795
6805
|
/**
|
|
6796
6806
|
* Disallow selector syntax in DOM names.
|
|
6797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6798
6808
|
*/
|
|
6799
6809
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6810
|
+
/**
|
|
6811
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
6812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
6813
|
+
*/
|
|
6814
|
+
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
6800
6815
|
/**
|
|
6801
6816
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6803
6818
|
*/
|
|
6804
6819
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6805
6820
|
/**
|
|
6806
6821
|
* Disallow classes that only have static members.
|
|
6807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-static-only-class.md
|
|
6808
6823
|
*/
|
|
6809
6824
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6810
6825
|
/**
|
|
6811
6826
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-subtraction-comparison.md
|
|
6813
6828
|
*/
|
|
6814
6829
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6815
6830
|
/**
|
|
6816
6831
|
* Disallow `then` property.
|
|
6817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-thenable.md
|
|
6818
6833
|
*/
|
|
6819
6834
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6820
6835
|
/**
|
|
6821
6836
|
* Disallow assigning `this` to a variable.
|
|
6822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-assignment.md
|
|
6823
6838
|
*/
|
|
6824
6839
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6825
6840
|
/**
|
|
6826
6841
|
* Disallow `this` outside of classes.
|
|
6827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-outside-of-class.md
|
|
6828
6843
|
*/
|
|
6829
6844
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6830
6845
|
/**
|
|
6831
6846
|
* Disallow assigning to top-level variables from inside functions.
|
|
6832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6833
6848
|
*/
|
|
6834
6849
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6835
6850
|
/**
|
|
6836
6851
|
* Disallow top-level side effects in exported modules.
|
|
6837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-side-effects.md
|
|
6838
6853
|
*/
|
|
6839
6854
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6855
|
+
/**
|
|
6856
|
+
* Disallow `all` as a transition property.
|
|
6857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-transition-all.md
|
|
6858
|
+
*/
|
|
6859
|
+
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
6840
6860
|
/**
|
|
6841
6861
|
* Disallow comparing `undefined` using `typeof`.
|
|
6842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-typeof-undefined.md
|
|
6843
6863
|
*/
|
|
6844
6864
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6845
6865
|
/**
|
|
6846
6866
|
* Disallow referencing methods without calling them.
|
|
6847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-uncalled-method.md
|
|
6848
6868
|
*/
|
|
6849
6869
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6850
6870
|
/**
|
|
6851
6871
|
* Require class members to be declared.
|
|
6852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-undeclared-class-members.md
|
|
6853
6873
|
*/
|
|
6854
6874
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6855
6875
|
/**
|
|
6856
6876
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6858
6878
|
*/
|
|
6859
6879
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6860
6880
|
/**
|
|
6861
6881
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
6862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
6863
6883
|
*/
|
|
6864
6884
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6865
6885
|
/**
|
|
6866
6886
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6868
6888
|
*/
|
|
6869
6889
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6870
6890
|
/**
|
|
6871
6891
|
* Disallow awaiting non-promise values.
|
|
6872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-await.md
|
|
6873
6893
|
*/
|
|
6874
6894
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6875
6895
|
/**
|
|
6876
6896
|
* Disallow unnecessary comparisons against boolean literals.
|
|
6877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
6878
6898
|
*/
|
|
6879
6899
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6880
6900
|
/**
|
|
6881
6901
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
6882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
6883
6903
|
*/
|
|
6884
6904
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6885
6905
|
/**
|
|
6886
6906
|
* Disallow unnecessary `globalThis` references.
|
|
6887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6888
6908
|
*/
|
|
6889
6909
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6890
6910
|
/**
|
|
6891
6911
|
* Disallow unnecessary nested ternary expressions.
|
|
6892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6893
6913
|
*/
|
|
6894
6914
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6895
6915
|
/**
|
|
6896
6916
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6898
6918
|
*/
|
|
6899
6919
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6900
6920
|
/**
|
|
6901
6921
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6903
6923
|
*/
|
|
6904
6924
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6905
6925
|
/**
|
|
6906
6926
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-splice.md
|
|
6908
6928
|
*/
|
|
6909
6929
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6930
|
+
/**
|
|
6931
|
+
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
6932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
6933
|
+
*/
|
|
6934
|
+
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
6910
6935
|
/**
|
|
6911
6936
|
* Disallow unreadable array destructuring.
|
|
6912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6913
6938
|
*/
|
|
6914
6939
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6915
6940
|
/**
|
|
6916
6941
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6918
6943
|
*/
|
|
6919
6944
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6920
6945
|
/**
|
|
6921
6946
|
* Disallow unreadable IIFEs.
|
|
6922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-iife.md
|
|
6923
6948
|
*/
|
|
6924
6949
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6925
6950
|
/**
|
|
6926
6951
|
* Disallow unreadable `new` expressions.
|
|
6927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6928
6953
|
*/
|
|
6929
6954
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6930
6955
|
/**
|
|
6931
6956
|
* Disallow unreadable object destructuring.
|
|
6932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6933
6958
|
*/
|
|
6934
6959
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6935
6960
|
/**
|
|
6936
6961
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6938
6963
|
*/
|
|
6939
6964
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6940
6965
|
/**
|
|
6941
6966
|
* Disallow unsafe DOM HTML APIs.
|
|
6942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6943
6968
|
*/
|
|
6944
6969
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6945
6970
|
/**
|
|
6946
6971
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
6947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
6948
6973
|
*/
|
|
6949
6974
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
6950
6975
|
/**
|
|
6951
6976
|
* Disallow unsafe values as property keys.
|
|
6952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-property-key.md
|
|
6953
6978
|
*/
|
|
6954
6979
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6955
6980
|
/**
|
|
6956
6981
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6958
6983
|
*/
|
|
6959
6984
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6960
6985
|
/**
|
|
6961
6986
|
* Disallow ignoring the return value of selected array methods.
|
|
6962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-array-method-return.md
|
|
6963
6988
|
*/
|
|
6964
6989
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6965
6990
|
/**
|
|
6966
6991
|
* Disallow unused object properties.
|
|
6967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-properties.md
|
|
6968
6993
|
*/
|
|
6969
6994
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6970
6995
|
/**
|
|
6971
6996
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
6972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-boolean-cast.md
|
|
6973
6998
|
*/
|
|
6974
6999
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
6975
7000
|
/**
|
|
6976
7001
|
* Disallow useless type coercions of values that are already of the target type.
|
|
6977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-coercion.md
|
|
6978
7003
|
*/
|
|
6979
7004
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
6980
7005
|
/**
|
|
6981
7006
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-collection-argument.md
|
|
6983
7008
|
*/
|
|
6984
7009
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6985
7010
|
/**
|
|
6986
7011
|
* Disallow useless compound assignments such as `x += 0`.
|
|
6987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-compound-assignment.md
|
|
6988
7013
|
*/
|
|
6989
7014
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
6990
7015
|
/**
|
|
6991
7016
|
* Disallow useless concatenation of literals.
|
|
6992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-concat.md
|
|
6993
7018
|
*/
|
|
6994
7019
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
6995
7020
|
/**
|
|
6996
7021
|
* Disallow useless `continue` statements.
|
|
6997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-continue.md
|
|
6998
7023
|
*/
|
|
6999
7024
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7000
7025
|
/**
|
|
7001
7026
|
* Disallow unnecessary existence checks before deletion.
|
|
7002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-delete-check.md
|
|
7003
7028
|
*/
|
|
7004
7029
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7005
7030
|
/**
|
|
7006
7031
|
* Disallow `else` after a statement that exits.
|
|
7007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-else.md
|
|
7008
7033
|
*/
|
|
7009
7034
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7010
7035
|
/**
|
|
7011
7036
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7013
7038
|
*/
|
|
7014
7039
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7015
7040
|
/**
|
|
7016
7041
|
* Disallow useless fallback when spreading in object literals.
|
|
7017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7018
7043
|
*/
|
|
7019
7044
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7020
7045
|
/**
|
|
7021
7046
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7023
7048
|
*/
|
|
7024
7049
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7025
7050
|
/**
|
|
7026
7051
|
* Disallow useless array length check.
|
|
7027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-length-check.md
|
|
7028
7053
|
*/
|
|
7029
7054
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7030
7055
|
/**
|
|
7031
7056
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-logical-operand.md
|
|
7033
7058
|
*/
|
|
7034
7059
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7035
7060
|
/**
|
|
7036
7061
|
* Disallow useless overrides of class methods.
|
|
7037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-override.md
|
|
7038
7063
|
*/
|
|
7039
7064
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7040
7065
|
/**
|
|
7041
7066
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7043
7068
|
*/
|
|
7044
7069
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7070
|
+
/**
|
|
7071
|
+
* Disallow redundant re-exports.
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-re-export.md
|
|
7073
|
+
*/
|
|
7074
|
+
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7045
7075
|
/**
|
|
7046
7076
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-recursion.md
|
|
7048
7078
|
*/
|
|
7049
7079
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7050
7080
|
/**
|
|
7051
7081
|
* Disallow unnecessary spread.
|
|
7052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-spread.md
|
|
7053
7083
|
*/
|
|
7054
7084
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7055
7085
|
/**
|
|
7056
7086
|
* Disallow useless case in switch statements.
|
|
7057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-switch-case.md
|
|
7058
7088
|
*/
|
|
7059
7089
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7060
7090
|
/**
|
|
7061
7091
|
* Disallow useless template literal expressions.
|
|
7062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-template-literals.md
|
|
7063
7093
|
*/
|
|
7064
7094
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7065
7095
|
/**
|
|
7066
7096
|
* Disallow useless `undefined`.
|
|
7067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-undefined.md
|
|
7068
7098
|
*/
|
|
7069
7099
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7070
7100
|
/**
|
|
7071
7101
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7073
7103
|
*/
|
|
7074
7104
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7075
7105
|
/**
|
|
7076
7106
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-zero-fractions.md
|
|
7078
7108
|
*/
|
|
7079
7109
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7080
7110
|
/**
|
|
7081
7111
|
* Enforce proper case for numeric literals.
|
|
7082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/number-literal-case.md
|
|
7083
7113
|
*/
|
|
7084
7114
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7085
7115
|
/**
|
|
7086
7116
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/numeric-separators-style.md
|
|
7088
7118
|
*/
|
|
7089
7119
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7090
7120
|
/**
|
|
7091
7121
|
* Require assignment operator shorthand where possible.
|
|
7092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/operator-assignment.md
|
|
7093
7123
|
*/
|
|
7094
7124
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7095
7125
|
/**
|
|
7096
7126
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7098
7128
|
*/
|
|
7099
7129
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7100
7130
|
/**
|
|
7101
7131
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7103
7133
|
*/
|
|
7104
7134
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7105
7135
|
/**
|
|
7106
7136
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener.md
|
|
7108
7138
|
*/
|
|
7109
7139
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7110
7140
|
/**
|
|
7111
7141
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7113
7143
|
*/
|
|
7114
7144
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7115
7145
|
/**
|
|
7116
7146
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-aggregate-error.md
|
|
7118
7148
|
*/
|
|
7119
7149
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7120
7150
|
/**
|
|
7121
7151
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-find.md
|
|
7123
7153
|
*/
|
|
7124
7154
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7125
7155
|
/**
|
|
7126
7156
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat.md
|
|
7128
7158
|
*/
|
|
7129
7159
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7130
7160
|
/**
|
|
7131
7161
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat-map.md
|
|
7133
7163
|
*/
|
|
7134
7164
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7135
7165
|
/**
|
|
7136
7166
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-async.md
|
|
7138
7168
|
*/
|
|
7139
7169
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7140
7170
|
/**
|
|
7141
7171
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-map.md
|
|
7143
7173
|
*/
|
|
7144
7174
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7145
7175
|
/**
|
|
7146
7176
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-range.md
|
|
7148
7178
|
*/
|
|
7149
7179
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7150
7180
|
/**
|
|
7151
7181
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-index-of.md
|
|
7153
7183
|
*/
|
|
7154
7184
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7155
7185
|
/**
|
|
7156
7186
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7158
7188
|
*/
|
|
7159
7189
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7160
7190
|
/**
|
|
7161
7191
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-last-methods.md
|
|
7163
7193
|
*/
|
|
7164
7194
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7165
7195
|
/**
|
|
7166
7196
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-slice.md
|
|
7168
7198
|
*/
|
|
7169
7199
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7170
7200
|
/**
|
|
7171
7201
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-some.md
|
|
7173
7203
|
*/
|
|
7174
7204
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7175
7205
|
/**
|
|
7176
7206
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-at.md
|
|
7178
7208
|
*/
|
|
7179
7209
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7180
7210
|
/**
|
|
7181
7211
|
* Prefer `await` over promise chaining.
|
|
7182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-await.md
|
|
7183
7213
|
*/
|
|
7184
7214
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7185
7215
|
/**
|
|
7186
7216
|
* Prefer `BigInt` literals over the constructor.
|
|
7187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-bigint-literals.md
|
|
7188
7218
|
*/
|
|
7189
7219
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7190
7220
|
/**
|
|
7191
7221
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7193
7223
|
*/
|
|
7194
7224
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7195
7225
|
/**
|
|
7196
7226
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7198
7228
|
*/
|
|
7199
7229
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7200
7230
|
/**
|
|
7201
7231
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-boolean-return.md
|
|
7203
7233
|
*/
|
|
7204
7234
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7205
7235
|
/**
|
|
7206
7236
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-class-fields.md
|
|
7208
7238
|
*/
|
|
7209
7239
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7210
7240
|
/**
|
|
7211
7241
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7213
7243
|
*/
|
|
7214
7244
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7215
7245
|
/**
|
|
7216
7246
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-code-point.md
|
|
7218
7248
|
*/
|
|
7219
7249
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7220
7250
|
/**
|
|
7221
7251
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
7222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-continue.md
|
|
7223
7253
|
*/
|
|
7224
7254
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7225
7255
|
/**
|
|
7226
7256
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-date-now.md
|
|
7228
7258
|
*/
|
|
7229
7259
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7230
7260
|
/**
|
|
7231
7261
|
* Prefer default parameters over reassignment.
|
|
7232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-default-parameters.md
|
|
7233
7263
|
*/
|
|
7234
7264
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7235
7265
|
/**
|
|
7236
7266
|
* Prefer direct iteration over default iterator method calls.
|
|
7237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-direct-iteration.md
|
|
7238
7268
|
*/
|
|
7239
7269
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7240
7270
|
/**
|
|
7241
7271
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dispose.md
|
|
7243
7273
|
*/
|
|
7244
7274
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7245
7275
|
/**
|
|
7246
7276
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-append.md
|
|
7248
7278
|
*/
|
|
7249
7279
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7250
7280
|
/**
|
|
7251
7281
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7253
7283
|
* @deprecated
|
|
7254
7284
|
*/
|
|
7255
7285
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7256
7286
|
/**
|
|
7257
7287
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7259
7289
|
*/
|
|
7260
|
-
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<
|
|
7290
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7261
7291
|
/**
|
|
7262
7292
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7264
7294
|
*/
|
|
7265
7295
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7266
7296
|
/**
|
|
7267
7297
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
7268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7269
7299
|
*/
|
|
7270
7300
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7271
7301
|
/**
|
|
7272
7302
|
* Prefer `.textContent` over `.innerText`.
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7274
7304
|
*/
|
|
7275
7305
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7276
7306
|
/**
|
|
7277
7307
|
* Prefer early returns over full-function conditional wrapping.
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-early-return.md
|
|
7279
7309
|
*/
|
|
7280
7310
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7281
7311
|
/**
|
|
7282
7312
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-else-if.md
|
|
7284
7314
|
*/
|
|
7285
7315
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7286
7316
|
/**
|
|
7287
7317
|
* Prefer `Error.isError()` when checking for errors.
|
|
7288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-error-is-error.md
|
|
7289
7319
|
*/
|
|
7290
7320
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7291
7321
|
/**
|
|
7292
7322
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-event-target.md
|
|
7294
7324
|
*/
|
|
7295
7325
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7326
|
+
/**
|
|
7327
|
+
* Prefer explicit viewport units.
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
7329
|
+
*/
|
|
7330
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
7296
7331
|
/**
|
|
7297
7332
|
* Prefer `export…from` when re-exporting.
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-export-from.md
|
|
7299
7334
|
*/
|
|
7300
7335
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7301
7336
|
/**
|
|
7302
7337
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7304
7339
|
*/
|
|
7305
7340
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7306
7341
|
/**
|
|
7307
7342
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7309
7344
|
*/
|
|
7310
7345
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7311
7346
|
/**
|
|
7312
7347
|
* Prefer global numeric constants over `Number` static properties.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-number-constants.md
|
|
7314
7349
|
*/
|
|
7315
7350
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7316
7351
|
/**
|
|
7317
7352
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-this.md
|
|
7319
7354
|
*/
|
|
7320
7355
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7321
7356
|
/**
|
|
7322
7357
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-group-by.md
|
|
7324
7359
|
*/
|
|
7325
7360
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7326
7361
|
/**
|
|
7327
7362
|
* Prefer `.has()` when checking existence.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-has-check.md
|
|
7329
7364
|
*/
|
|
7330
7365
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7331
7366
|
/**
|
|
7332
7367
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7334
7369
|
*/
|
|
7335
7370
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7336
7371
|
/**
|
|
7337
7372
|
* Prefer HTTPS over HTTP.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-https.md
|
|
7339
7374
|
*/
|
|
7340
7375
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7341
7376
|
/**
|
|
7342
7377
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7344
7379
|
*/
|
|
7345
7380
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7346
7381
|
/**
|
|
7347
7382
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7349
7384
|
*/
|
|
7350
7385
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7351
7386
|
/**
|
|
7352
7387
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes.md
|
|
7354
7389
|
*/
|
|
7355
7390
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7356
7391
|
/**
|
|
7357
7392
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7359
7394
|
*/
|
|
7360
7395
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7361
7396
|
/**
|
|
7362
7397
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7364
7399
|
*/
|
|
7365
7400
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7366
7401
|
/**
|
|
7367
7402
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-concat.md
|
|
7369
7404
|
*/
|
|
7370
7405
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7371
7406
|
/**
|
|
7372
7407
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7374
7409
|
*/
|
|
7375
7410
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7376
7411
|
/**
|
|
7377
7412
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7379
7414
|
*/
|
|
7380
7415
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7381
7416
|
/**
|
|
7382
7417
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7384
7419
|
*/
|
|
7385
7420
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7386
7421
|
/**
|
|
7387
7422
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7389
7424
|
* @deprecated
|
|
7390
7425
|
*/
|
|
7391
7426
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7392
7427
|
/**
|
|
7393
7428
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7395
7430
|
*/
|
|
7396
7431
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7397
7432
|
/**
|
|
7398
7433
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-location-assign.md
|
|
7400
7435
|
*/
|
|
7401
7436
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7402
7437
|
/**
|
|
7403
7438
|
* Prefer using a logical operator over a ternary.
|
|
7404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7405
7440
|
*/
|
|
7406
7441
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7407
7442
|
/**
|
|
7408
7443
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-map-from-entries.md
|
|
7410
7445
|
*/
|
|
7411
7446
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7412
7447
|
/**
|
|
7413
7448
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-abs.md
|
|
7415
7450
|
*/
|
|
7416
7451
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7417
7452
|
/**
|
|
7418
7453
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-constants.md
|
|
7420
7455
|
*/
|
|
7421
7456
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7422
7457
|
/**
|
|
7423
7458
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-min-max.md
|
|
7425
7460
|
*/
|
|
7426
7461
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7427
7462
|
/**
|
|
7428
7463
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-trunc.md
|
|
7430
7465
|
*/
|
|
7431
7466
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7432
7467
|
/**
|
|
7433
7468
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7435
7470
|
*/
|
|
7436
7471
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7437
7472
|
/**
|
|
7438
7473
|
* Prefer modern DOM APIs.
|
|
7439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7440
7475
|
*/
|
|
7441
7476
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7442
7477
|
/**
|
|
7443
7478
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7445
7480
|
*/
|
|
7446
7481
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7447
7482
|
/**
|
|
7448
7483
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-module.md
|
|
7450
7485
|
*/
|
|
7451
7486
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7452
7487
|
/**
|
|
7453
7488
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7455
7490
|
*/
|
|
7456
7491
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7457
7492
|
/**
|
|
7458
7493
|
* Prefer negative index over `.length - index` when possible.
|
|
7459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-negative-index.md
|
|
7460
7495
|
*/
|
|
7461
7496
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7462
7497
|
/**
|
|
7463
7498
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-node-protocol.md
|
|
7465
7500
|
*/
|
|
7466
7501
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7467
7502
|
/**
|
|
7468
7503
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-coercion.md
|
|
7470
7505
|
*/
|
|
7471
7506
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7472
7507
|
/**
|
|
7473
7508
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7475
7510
|
*/
|
|
7476
7511
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7477
7512
|
/**
|
|
7478
7513
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-properties.md
|
|
7480
7515
|
*/
|
|
7481
7516
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7482
7517
|
/**
|
|
7483
7518
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-define-properties.md
|
|
7485
7520
|
*/
|
|
7486
7521
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7487
7522
|
/**
|
|
7488
7523
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7490
7525
|
*/
|
|
7491
7526
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7492
7527
|
/**
|
|
7493
7528
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-from-entries.md
|
|
7495
7530
|
*/
|
|
7496
7531
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7497
7532
|
/**
|
|
7498
7533
|
* Prefer the most specific `Object` iterable method.
|
|
7499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7500
7535
|
*/
|
|
7501
7536
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7502
7537
|
/**
|
|
7503
7538
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-observer-apis.md
|
|
7505
7540
|
*/
|
|
7506
7541
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7507
7542
|
/**
|
|
7508
7543
|
* Prefer omitting the `catch` binding parameter.
|
|
7509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7510
7545
|
*/
|
|
7511
7546
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7512
7547
|
/**
|
|
7513
7548
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-path2d.md
|
|
7515
7550
|
*/
|
|
7516
7551
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7517
7552
|
/**
|
|
7518
7553
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-private-class-fields.md
|
|
7520
7555
|
*/
|
|
7521
7556
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7522
7557
|
/**
|
|
7523
7558
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-try.md
|
|
7525
7560
|
*/
|
|
7526
7561
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7527
7562
|
/**
|
|
7528
7563
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7530
7565
|
*/
|
|
7531
7566
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7532
7567
|
/**
|
|
7533
7568
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-prototype-methods.md
|
|
7535
7570
|
*/
|
|
7536
7571
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7537
7572
|
/**
|
|
7538
7573
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-query-selector.md
|
|
7540
7575
|
*/
|
|
7541
7576
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7542
7577
|
/**
|
|
7543
7578
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-queue-microtask.md
|
|
7545
7580
|
*/
|
|
7546
7581
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7547
7582
|
/**
|
|
7548
7583
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-reflect-apply.md
|
|
7550
7585
|
*/
|
|
7551
7586
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7552
7587
|
/**
|
|
7553
7588
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-escape.md
|
|
7555
7590
|
*/
|
|
7556
7591
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7557
7592
|
/**
|
|
7558
7593
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-test.md
|
|
7560
7595
|
*/
|
|
7561
7596
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7562
7597
|
/**
|
|
7563
7598
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-response-static-json.md
|
|
7565
7600
|
*/
|
|
7566
7601
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7567
7602
|
/**
|
|
7568
7603
|
* Prefer `:scope` when using element query selector methods.
|
|
7569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-scoped-selector.md
|
|
7570
7605
|
*/
|
|
7571
7606
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7572
7607
|
/**
|
|
7573
7608
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-has.md
|
|
7575
7610
|
*/
|
|
7576
7611
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7577
7612
|
/**
|
|
7578
7613
|
* Prefer `Set` methods for Set operations.
|
|
7579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-methods.md
|
|
7580
7615
|
*/
|
|
7581
7616
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7582
7617
|
/**
|
|
7583
7618
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-size.md
|
|
7585
7620
|
*/
|
|
7586
7621
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7587
7622
|
/**
|
|
7588
7623
|
* Prefer arrow function properties over methods with a single return.
|
|
7589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7590
7625
|
*/
|
|
7591
|
-
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<
|
|
7626
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
7592
7627
|
/**
|
|
7593
7628
|
* Prefer simple conditions first in logical expressions.
|
|
7594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7595
7630
|
*/
|
|
7596
7631
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7597
7632
|
/**
|
|
7598
7633
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7600
7635
|
*/
|
|
7601
7636
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7602
7637
|
/**
|
|
7603
7638
|
* Prefer simplified conditions.
|
|
7604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7605
7640
|
*/
|
|
7606
7641
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
7607
7642
|
/**
|
|
7608
7643
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7610
7645
|
*/
|
|
7611
7646
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7612
7647
|
/**
|
|
7613
7648
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-call.md
|
|
7615
7650
|
*/
|
|
7616
7651
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7617
7652
|
/**
|
|
7618
7653
|
* Prefer a single object destructuring declaration per local const source.
|
|
7619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7620
7655
|
*/
|
|
7621
7656
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7622
7657
|
/**
|
|
7623
7658
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-replace.md
|
|
7625
7660
|
*/
|
|
7626
7661
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7627
7662
|
/**
|
|
7628
7663
|
* Prefer declaring variables in the smallest possible scope.
|
|
7629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-smaller-scope.md
|
|
7630
7665
|
*/
|
|
7631
7666
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7632
7667
|
/**
|
|
7633
7668
|
* Prefer `String#split()` with a limit.
|
|
7634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-split-limit.md
|
|
7635
7670
|
*/
|
|
7636
7671
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7637
7672
|
/**
|
|
7638
7673
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-spread.md
|
|
7640
7675
|
*/
|
|
7641
7676
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7642
7677
|
/**
|
|
7643
7678
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-match-all.md
|
|
7645
7680
|
*/
|
|
7646
7681
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7647
7682
|
/**
|
|
7648
7683
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7650
7685
|
*/
|
|
7651
7686
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7652
7687
|
/**
|
|
7653
7688
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-raw.md
|
|
7655
7690
|
*/
|
|
7656
7691
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7657
7692
|
/**
|
|
7658
7693
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-repeat.md
|
|
7660
7695
|
*/
|
|
7661
7696
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7662
7697
|
/**
|
|
7663
7698
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-replace-all.md
|
|
7665
7700
|
*/
|
|
7666
7701
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7667
7702
|
/**
|
|
7668
7703
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-slice.md
|
|
7670
7705
|
*/
|
|
7671
7706
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7672
7707
|
/**
|
|
7673
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over
|
|
7674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7675
7710
|
*/
|
|
7676
7711
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7677
7712
|
/**
|
|
7678
7713
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7680
7715
|
*/
|
|
7681
7716
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7682
7717
|
/**
|
|
7683
7718
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-structured-clone.md
|
|
7685
7720
|
*/
|
|
7686
7721
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7687
7722
|
/**
|
|
7688
7723
|
* Prefer `switch` over multiple `else-if`.
|
|
7689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-switch.md
|
|
7690
7725
|
*/
|
|
7691
7726
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7692
7727
|
/**
|
|
7693
7728
|
* Prefer `Temporal` over `Date`.
|
|
7694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-temporal.md
|
|
7695
7730
|
*/
|
|
7696
7731
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7697
7732
|
/**
|
|
7698
7733
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-ternary.md
|
|
7700
7735
|
*/
|
|
7701
7736
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7737
|
+
/**
|
|
7738
|
+
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-then-catch.md
|
|
7740
|
+
*/
|
|
7741
|
+
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
7702
7742
|
/**
|
|
7703
7743
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7705
7745
|
*/
|
|
7706
7746
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7707
7747
|
/**
|
|
7708
7748
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-top-level-await.md
|
|
7710
7750
|
*/
|
|
7711
7751
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7712
7752
|
/**
|
|
7713
7753
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-error.md
|
|
7715
7755
|
*/
|
|
7716
7756
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7717
7757
|
/**
|
|
7718
7758
|
* Require type literals to be last in union types.
|
|
7719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-literal-last.md
|
|
7720
7760
|
*/
|
|
7721
7761
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7722
7762
|
/**
|
|
7723
7763
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7725
7765
|
*/
|
|
7726
7766
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7727
7767
|
/**
|
|
7728
7768
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unary-minus.md
|
|
7730
7770
|
*/
|
|
7731
7771
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7732
7772
|
/**
|
|
7733
7773
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7735
7775
|
*/
|
|
7736
7776
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7737
7777
|
/**
|
|
7738
7778
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-can-parse.md
|
|
7740
7780
|
*/
|
|
7741
7781
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7742
7782
|
/**
|
|
7743
7783
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-href.md
|
|
7745
7785
|
*/
|
|
7746
7786
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7747
7787
|
/**
|
|
7748
7788
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7750
7790
|
*/
|
|
7751
7791
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7752
7792
|
/**
|
|
7753
7793
|
* Prefer putting the condition in the while statement.
|
|
7754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7755
7795
|
*/
|
|
7756
7796
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7757
7797
|
/**
|
|
7758
7798
|
* Renamed to `unicorn/name-replacements`.
|
|
7759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7760
7800
|
* @deprecated
|
|
7761
7801
|
*/
|
|
7762
7802
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7763
7803
|
/**
|
|
7764
7804
|
* Enforce consistent relative URL style.
|
|
7765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/relative-url-style.md
|
|
7766
7806
|
*/
|
|
7767
7807
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7768
7808
|
/**
|
|
7769
7809
|
* Enforce using the separator argument with `Array#join()`.
|
|
7770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-join-separator.md
|
|
7771
7811
|
*/
|
|
7772
7812
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7773
7813
|
/**
|
|
7774
7814
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-sort-compare.md
|
|
7776
7816
|
*/
|
|
7777
7817
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7778
7818
|
/**
|
|
7779
7819
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-css-escape.md
|
|
7781
7821
|
*/
|
|
7782
7822
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7823
|
+
/**
|
|
7824
|
+
* Require configured YAML frontmatter fields.
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-frontmatter-fields.md
|
|
7826
|
+
*/
|
|
7827
|
+
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
7783
7828
|
/**
|
|
7784
7829
|
* Require non-empty module attributes for imports and exports
|
|
7785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-attributes.md
|
|
7786
7831
|
*/
|
|
7787
7832
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7788
7833
|
/**
|
|
7789
7834
|
* Require non-empty specifier list in import and export statements.
|
|
7790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-specifiers.md
|
|
7791
7836
|
*/
|
|
7792
7837
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7793
7838
|
/**
|
|
7794
7839
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7796
7841
|
*/
|
|
7797
7842
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7798
7843
|
/**
|
|
7799
7844
|
* Require passive event listeners for high-frequency events.
|
|
7800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-passive-events.md
|
|
7801
7846
|
*/
|
|
7802
7847
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7803
7848
|
/**
|
|
7804
7849
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-post-message-target-origin.md
|
|
7806
7851
|
*/
|
|
7807
7852
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7808
7853
|
/**
|
|
7809
7854
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7811
7856
|
*/
|
|
7812
7857
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7813
7858
|
/**
|
|
7814
7859
|
* Enforce better string content.
|
|
7815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/string-content.md
|
|
7816
7861
|
*/
|
|
7817
7862
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7818
7863
|
/**
|
|
7819
7864
|
* Enforce consistent brace style for `case` clauses.
|
|
7820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-braces.md
|
|
7821
7866
|
*/
|
|
7822
7867
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7823
7868
|
/**
|
|
7824
7869
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-break-position.md
|
|
7826
7871
|
*/
|
|
7827
7872
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7828
7873
|
/**
|
|
7829
7874
|
* Fix whitespace-insensitive template indentation.
|
|
7830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/template-indent.md
|
|
7831
7876
|
*/
|
|
7832
7877
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7833
7878
|
/**
|
|
7834
7879
|
* Enforce consistent case for text encoding identifiers.
|
|
7835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7836
7881
|
*/
|
|
7837
7882
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7838
7883
|
/**
|
|
7839
7884
|
* Require `new` when creating an error.
|
|
7840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/throw-new-error.md
|
|
7841
7886
|
*/
|
|
7842
7887
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7843
7888
|
/**
|
|
7844
7889
|
* Limit the complexity of `try` blocks.
|
|
7845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/try-complexity.md
|
|
7846
7891
|
*/
|
|
7847
7892
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7848
7893
|
/**
|
|
@@ -9686,6 +9731,11 @@ interface ESLintSchema {
|
|
|
9686
9731
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-coerce-boolean.md
|
|
9687
9732
|
*/
|
|
9688
9733
|
'zod-mini/no-coerce-boolean'?: Linter.RuleEntry<[]>;
|
|
9734
|
+
/**
|
|
9735
|
+
* Disallow check combinations that can never match, are redundant, or do not apply to the schema type
|
|
9736
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-conflicting-checks.md
|
|
9737
|
+
*/
|
|
9738
|
+
'zod-mini/no-conflicting-checks'?: Linter.RuleEntry<ZodMiniNoConflictingChecks>;
|
|
9689
9739
|
/**
|
|
9690
9740
|
* Disallow calling the same schema method more than once in a single chain
|
|
9691
9741
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-duplicate-schema-methods.md
|
|
@@ -9711,6 +9761,11 @@ interface ESLintSchema {
|
|
|
9711
9761
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-unknown-schema.md
|
|
9712
9762
|
*/
|
|
9713
9763
|
'zod-mini/no-unknown-schema'?: Linter.RuleEntry<[]>;
|
|
9764
|
+
/**
|
|
9765
|
+
* Disallow `z.readonly()` on schemas whose output is already immutable
|
|
9766
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-unnecessary-readonly.md
|
|
9767
|
+
*/
|
|
9768
|
+
'zod-mini/no-unnecessary-readonly'?: Linter.RuleEntry<[]>;
|
|
9714
9769
|
/**
|
|
9715
9770
|
* Prefer `z.enum()` over `z.union()` when all members are string literals.
|
|
9716
9771
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-enum-over-literal-union.md
|
|
@@ -9721,6 +9776,11 @@ interface ESLintSchema {
|
|
|
9721
9776
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-meta.md
|
|
9722
9777
|
*/
|
|
9723
9778
|
'zod-mini/prefer-meta'?: Linter.RuleEntry<[]>;
|
|
9779
|
+
/**
|
|
9780
|
+
* Prefer `z.tuple()` over a length-constrained `z.array()` so the length is preserved in the inferred type.
|
|
9781
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-tuple-over-array-length.md
|
|
9782
|
+
*/
|
|
9783
|
+
'zod-mini/prefer-tuple-over-array-length'?: Linter.RuleEntry<[]>;
|
|
9724
9784
|
/**
|
|
9725
9785
|
* Require type parameter on `.brand()` functions
|
|
9726
9786
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/require-brand-type-parameter.md
|
|
@@ -9776,6 +9836,11 @@ interface ESLintSchema {
|
|
|
9776
9836
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-coerce-boolean.md
|
|
9777
9837
|
*/
|
|
9778
9838
|
'zod/no-coerce-boolean'?: Linter.RuleEntry<[]>;
|
|
9839
|
+
/**
|
|
9840
|
+
* Disallow check combinations that can never match, are redundant, or do not apply to the schema type
|
|
9841
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-conflicting-checks.md
|
|
9842
|
+
*/
|
|
9843
|
+
'zod/no-conflicting-checks'?: Linter.RuleEntry<ZodNoConflictingChecks>;
|
|
9779
9844
|
/**
|
|
9780
9845
|
* Disallow calling the same schema method more than once in a single chain
|
|
9781
9846
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-duplicate-schema-methods.md
|
|
@@ -9862,6 +9927,11 @@ interface ESLintSchema {
|
|
|
9862
9927
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-unknown-schema.md
|
|
9863
9928
|
*/
|
|
9864
9929
|
'zod/no-unknown-schema'?: Linter.RuleEntry<[]>;
|
|
9930
|
+
/**
|
|
9931
|
+
* Disallow `.readonly()` on schemas whose output is already immutable
|
|
9932
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-unnecessary-readonly.md
|
|
9933
|
+
*/
|
|
9934
|
+
'zod/no-unnecessary-readonly'?: Linter.RuleEntry<[]>;
|
|
9865
9935
|
/**
|
|
9866
9936
|
* Prefer `z.enum()` over `z.union()` when all members are string literals.
|
|
9867
9937
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-enum-over-literal-union.md
|
|
@@ -9902,6 +9972,11 @@ interface ESLintSchema {
|
|
|
9902
9972
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-trim-before-string-length-checks.md
|
|
9903
9973
|
*/
|
|
9904
9974
|
'zod/prefer-trim-before-string-length-checks'?: Linter.RuleEntry<[]>;
|
|
9975
|
+
/**
|
|
9976
|
+
* Prefer `z.tuple()` over a length-constrained `z.array()` so the length is preserved in the inferred type.
|
|
9977
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-tuple-over-array-length.md
|
|
9978
|
+
*/
|
|
9979
|
+
'zod/prefer-tuple-over-array-length'?: Linter.RuleEntry<[]>;
|
|
9905
9980
|
/**
|
|
9906
9981
|
* Require type parameter on `.brand()` functions
|
|
9907
9982
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/require-brand-type-parameter.md
|
|
@@ -21443,10 +21518,19 @@ type UnicornPreferAt = [] | [{
|
|
|
21443
21518
|
type UnicornPreferContinue = [] | [{
|
|
21444
21519
|
maximumStatements?: number;
|
|
21445
21520
|
}];
|
|
21521
|
+
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
21522
|
+
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
21523
|
+
checkGetHTML?: boolean;
|
|
21524
|
+
checkSetHTML?: boolean;
|
|
21525
|
+
}];
|
|
21446
21526
|
// ----- unicorn/prefer-early-return -----
|
|
21447
21527
|
type UnicornPreferEarlyReturn = [] | [{
|
|
21448
21528
|
maximumStatements?: number;
|
|
21449
21529
|
}];
|
|
21530
|
+
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
21531
|
+
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
21532
|
+
unit?: ("dvh" | "svh" | "lvh");
|
|
21533
|
+
}];
|
|
21450
21534
|
// ----- unicorn/prefer-export-from -----
|
|
21451
21535
|
type UnicornPreferExportFrom = [] | [{
|
|
21452
21536
|
checkUsedVariables?: boolean;
|
|
@@ -21457,7 +21541,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
21457
21541
|
}];
|
|
21458
21542
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
21459
21543
|
type UnicornPreferMinimalTernary = [] | [{
|
|
21460
|
-
|
|
21544
|
+
checkVaryingBase?: boolean;
|
|
21461
21545
|
checkComputedMemberAccess?: boolean;
|
|
21462
21546
|
}];
|
|
21463
21547
|
// ----- unicorn/prefer-number-properties -----
|
|
@@ -21482,6 +21566,8 @@ type UnicornPreferQueueMicrotask = [] | [{
|
|
|
21482
21566
|
type UnicornPreferSetHas = [] | [{
|
|
21483
21567
|
minimumItems?: number;
|
|
21484
21568
|
}];
|
|
21569
|
+
// ----- unicorn/prefer-short-arrow-method -----
|
|
21570
|
+
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
21485
21571
|
// ----- unicorn/prefer-single-call -----
|
|
21486
21572
|
type UnicornPreferSingleCall = [] | [{
|
|
21487
21573
|
ignore?: unknown[];
|
|
@@ -21513,6 +21599,10 @@ type UnicornRelativeUrlStyle = [] | [("never" | "always")];
|
|
|
21513
21599
|
type UnicornRequireCssEscape = [] | [{
|
|
21514
21600
|
checkAllSelectors?: boolean;
|
|
21515
21601
|
}];
|
|
21602
|
+
// ----- unicorn/require-frontmatter-fields -----
|
|
21603
|
+
type UnicornRequireFrontmatterFields = [] | [{
|
|
21604
|
+
fields?: string[];
|
|
21605
|
+
}];
|
|
21516
21606
|
// ----- unicorn/string-content -----
|
|
21517
21607
|
type UnicornStringContent = [] | [{
|
|
21518
21608
|
patterns?: {
|
|
@@ -23048,6 +23138,12 @@ type ZodMiniConsistentSchemaVarName = [] | [{
|
|
|
23048
23138
|
before?: string;
|
|
23049
23139
|
after?: string;
|
|
23050
23140
|
}];
|
|
23141
|
+
// ----- zod-mini/no-conflicting-checks -----
|
|
23142
|
+
type ZodMiniNoConflictingChecks = [] | [{
|
|
23143
|
+
checkImpossibleCases?: boolean;
|
|
23144
|
+
checkConfusingCases?: boolean;
|
|
23145
|
+
checkInapplicableChecks?: boolean;
|
|
23146
|
+
}];
|
|
23051
23147
|
// ----- zod-mini/schema-error-property-style -----
|
|
23052
23148
|
type ZodMiniSchemaErrorPropertyStyle = [] | [{
|
|
23053
23149
|
selector?: string;
|
|
@@ -23078,6 +23174,12 @@ type ZodConsistentSchemaVarName = [] | [{
|
|
|
23078
23174
|
before?: string;
|
|
23079
23175
|
after?: string;
|
|
23080
23176
|
}];
|
|
23177
|
+
// ----- zod/no-conflicting-checks -----
|
|
23178
|
+
type ZodNoConflictingChecks = [] | [{
|
|
23179
|
+
checkImpossibleCases?: boolean;
|
|
23180
|
+
checkConfusingCases?: boolean;
|
|
23181
|
+
checkInapplicableChecks?: boolean;
|
|
23182
|
+
}];
|
|
23081
23183
|
// ----- zod/no-optional-and-default-together -----
|
|
23082
23184
|
type ZodNoOptionalAndDefaultTogether = [] | [{
|
|
23083
23185
|
preferredMethod?: ("none" | "default" | "optional");
|