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