@eienjs/eslint-config 2.0.0 → 2.0.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/LICENSE +1 -1
- package/dist/cli/constants_generated.js +2 -2
- package/dist/configs/javascript.js +1 -6
- package/dist/configs/pnpm.js +1 -4
- package/dist/configs/vue.js +15 -7
- package/dist/package.js +1 -1
- package/dist/typegen.d.ts +392 -173
- package/package.json +62 -34
package/dist/typegen.d.ts
CHANGED
|
@@ -5300,753 +5300,921 @@ interface RuleOptions {
|
|
|
5300
5300
|
*/
|
|
5301
5301
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5302
5302
|
/**
|
|
5303
|
-
*
|
|
5304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5303
|
+
* Prefer better DOM traversal APIs.
|
|
5304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/better-dom-traversing.md
|
|
5305
5305
|
*/
|
|
5306
|
-
'unicorn/better-
|
|
5306
|
+
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
5307
|
+
/**
|
|
5308
|
+
* Removed. Prefer `eslint-plugin-regexp`
|
|
5309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#better-regex
|
|
5310
|
+
* @deprecated
|
|
5311
|
+
*/
|
|
5312
|
+
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
5307
5313
|
/**
|
|
5308
5314
|
* Enforce a specific parameter name in catch clauses.
|
|
5309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/catch-error-name.md
|
|
5310
5316
|
*/
|
|
5311
5317
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5312
5318
|
/**
|
|
5313
5319
|
* Enforce consistent assertion style with `node:assert`.
|
|
5314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-assert.md
|
|
5315
5321
|
*/
|
|
5316
5322
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5323
|
+
/**
|
|
5324
|
+
* Enforce consistent spelling of compound words in identifiers.
|
|
5325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-compound-words.md
|
|
5326
|
+
*/
|
|
5327
|
+
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
5317
5328
|
/**
|
|
5318
5329
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-date-clone.md
|
|
5320
5331
|
*/
|
|
5321
5332
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5322
5333
|
/**
|
|
5323
5334
|
* Use destructured variables over properties.
|
|
5324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-destructuring.md
|
|
5325
5336
|
*/
|
|
5326
5337
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5327
5338
|
/**
|
|
5328
5339
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-empty-array-spread.md
|
|
5330
5341
|
*/
|
|
5331
5342
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5332
5343
|
/**
|
|
5333
5344
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-existence-index-check.md
|
|
5335
5346
|
*/
|
|
5336
5347
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5337
5348
|
/**
|
|
5338
5349
|
* Move function definitions to the highest possible scope.
|
|
5339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-function-scoping.md
|
|
5340
5351
|
*/
|
|
5341
5352
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5353
|
+
/**
|
|
5354
|
+
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
5355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-json-file-read.md
|
|
5356
|
+
*/
|
|
5357
|
+
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
5342
5358
|
/**
|
|
5343
5359
|
* Enforce consistent style for escaping `${` in template literals.
|
|
5344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-template-literal-escape.md
|
|
5345
5361
|
*/
|
|
5346
5362
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
5347
5363
|
/**
|
|
5348
5364
|
* Enforce correct `Error` subclassing.
|
|
5349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/custom-error-definition.md
|
|
5350
5366
|
*/
|
|
5351
5367
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5368
|
+
/**
|
|
5369
|
+
* Enforce consistent style for DOM element dataset access.
|
|
5370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/dom-node-dataset.md
|
|
5371
|
+
*/
|
|
5372
|
+
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
5352
5373
|
/**
|
|
5353
5374
|
* Enforce no spaces between braces.
|
|
5354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/empty-brace-spaces.md
|
|
5355
5376
|
*/
|
|
5356
5377
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5357
5378
|
/**
|
|
5358
5379
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/error-message.md
|
|
5360
5381
|
*/
|
|
5361
5382
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5362
5383
|
/**
|
|
5363
5384
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/escape-case.md
|
|
5365
5386
|
*/
|
|
5366
5387
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5367
5388
|
/**
|
|
5368
5389
|
* Add expiration conditions to TODO comments.
|
|
5369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/expiring-todo-comments.md
|
|
5370
5391
|
*/
|
|
5371
5392
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5372
5393
|
/**
|
|
5373
5394
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/explicit-length-check.md
|
|
5375
5396
|
*/
|
|
5376
5397
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5377
5398
|
/**
|
|
5378
|
-
* Enforce a case style for filenames.
|
|
5379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5399
|
+
* Enforce a case style for filenames and directory names.
|
|
5400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/filename-case.md
|
|
5380
5401
|
*/
|
|
5381
5402
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5382
5403
|
/**
|
|
5383
5404
|
* Enforce specific import styles per module.
|
|
5384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/import-style.md
|
|
5385
5406
|
*/
|
|
5386
5407
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5387
5408
|
/**
|
|
5388
5409
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/isolated-functions.md
|
|
5390
5411
|
*/
|
|
5391
5412
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
5392
5413
|
/**
|
|
5393
5414
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/new-for-builtins.md
|
|
5395
5416
|
*/
|
|
5396
5417
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5397
5418
|
/**
|
|
5398
5419
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-abusive-eslint-disable.md
|
|
5400
5421
|
*/
|
|
5401
5422
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5402
5423
|
/**
|
|
5403
5424
|
* Disallow recursive access to `this` within getters and setters.
|
|
5404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-accessor-recursion.md
|
|
5405
5426
|
*/
|
|
5406
5427
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5407
5428
|
/**
|
|
5408
5429
|
* Disallow anonymous functions and classes as the default export.
|
|
5409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-anonymous-default-export.md
|
|
5410
5431
|
*/
|
|
5411
5432
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5412
5433
|
/**
|
|
5413
5434
|
* Prevent passing a function reference directly to iterator methods.
|
|
5414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-callback-reference.md
|
|
5436
|
+
*/
|
|
5437
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
5438
|
+
/**
|
|
5439
|
+
* Disallow using reference values as `Array#fill()` values.
|
|
5440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-fill-with-reference-type.md
|
|
5415
5441
|
*/
|
|
5416
|
-
'unicorn/no-array-
|
|
5442
|
+
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
5417
5443
|
/**
|
|
5418
5444
|
* Prefer `for…of` over the `forEach` method.
|
|
5419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-for-each.md
|
|
5420
5446
|
*/
|
|
5421
5447
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5448
|
+
/**
|
|
5449
|
+
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
5450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-from-fill.md
|
|
5451
|
+
*/
|
|
5452
|
+
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
5422
5453
|
/**
|
|
5423
5454
|
* Disallow using the `this` argument in array methods.
|
|
5424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-method-this-argument.md
|
|
5425
5456
|
*/
|
|
5426
5457
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5427
5458
|
/**
|
|
5428
5459
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5430
5461
|
* @deprecated
|
|
5431
5462
|
*/
|
|
5432
5463
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5433
5464
|
/**
|
|
5434
5465
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reduce.md
|
|
5436
5467
|
*/
|
|
5437
5468
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5438
5469
|
/**
|
|
5439
5470
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reverse.md
|
|
5441
5472
|
*/
|
|
5442
5473
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5443
5474
|
/**
|
|
5444
5475
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-sort.md
|
|
5446
5477
|
*/
|
|
5447
5478
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5448
5479
|
/**
|
|
5449
5480
|
* Disallow member access from await expression.
|
|
5450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-expression-member.md
|
|
5451
5482
|
*/
|
|
5452
5483
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5453
5484
|
/**
|
|
5454
5485
|
* Disallow using `await` in `Promise` method parameters.
|
|
5455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-in-promise-methods.md
|
|
5456
5487
|
*/
|
|
5457
5488
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5489
|
+
/**
|
|
5490
|
+
* Disallow unnecessary `Blob` to `File` conversion.
|
|
5491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-blob-to-file.md
|
|
5492
|
+
*/
|
|
5493
|
+
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
5494
|
+
/**
|
|
5495
|
+
* Prefer drawing canvases directly instead of converting them to images.
|
|
5496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-canvas-to-image.md
|
|
5497
|
+
*/
|
|
5498
|
+
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
5499
|
+
/**
|
|
5500
|
+
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
5501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-confusing-array-splice.md
|
|
5502
|
+
*/
|
|
5503
|
+
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
5458
5504
|
/**
|
|
5459
5505
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-console-spaces.md
|
|
5461
5507
|
*/
|
|
5462
5508
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5463
5509
|
/**
|
|
5464
5510
|
* Do not use `document.cookie` directly.
|
|
5465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-document-cookie.md
|
|
5466
5512
|
*/
|
|
5467
5513
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5514
|
+
/**
|
|
5515
|
+
* Disallow duplicate values in `Set` constructor array literals.
|
|
5516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-duplicate-set-values.md
|
|
5517
|
+
*/
|
|
5518
|
+
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
5468
5519
|
/**
|
|
5469
5520
|
* Disallow empty files.
|
|
5470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-empty-file.md
|
|
5522
|
+
*/
|
|
5523
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
5524
|
+
/**
|
|
5525
|
+
* Disallow exports in scripts.
|
|
5526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-exports-in-scripts.md
|
|
5471
5527
|
*/
|
|
5472
|
-
'unicorn/no-
|
|
5528
|
+
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
5473
5529
|
/**
|
|
5474
5530
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-for-loop.md
|
|
5476
5532
|
*/
|
|
5477
5533
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5478
5534
|
/**
|
|
5479
5535
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-hex-escape.md
|
|
5481
5537
|
*/
|
|
5482
5538
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5483
5539
|
/**
|
|
5484
5540
|
* Disallow immediate mutation after variable assignment.
|
|
5485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-immediate-mutation.md
|
|
5486
5542
|
*/
|
|
5487
5543
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5544
|
+
/**
|
|
5545
|
+
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
5546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-incorrect-query-selector.md
|
|
5547
|
+
*/
|
|
5548
|
+
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
5488
5549
|
/**
|
|
5489
5550
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5491
5552
|
* @deprecated
|
|
5492
5553
|
*/
|
|
5493
5554
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5494
5555
|
/**
|
|
5495
5556
|
* Disallow `instanceof` with built-in objects
|
|
5496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-instanceof-builtins.md
|
|
5497
5558
|
*/
|
|
5498
5559
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5499
5560
|
/**
|
|
5500
5561
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-fetch-options.md
|
|
5502
5563
|
*/
|
|
5503
5564
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5565
|
+
/**
|
|
5566
|
+
* Disallow invalid `accept` values on file inputs.
|
|
5567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-file-input-accept.md
|
|
5568
|
+
*/
|
|
5569
|
+
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
5504
5570
|
/**
|
|
5505
5571
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-remove-event-listener.md
|
|
5507
5573
|
*/
|
|
5508
5574
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5509
5575
|
/**
|
|
5510
5576
|
* Disallow identifiers starting with `new` or `class`.
|
|
5511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-keyword-prefix.md
|
|
5512
5578
|
*/
|
|
5513
5579
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5580
|
+
/**
|
|
5581
|
+
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-late-current-target-access.md
|
|
5583
|
+
*/
|
|
5584
|
+
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
5514
5585
|
/**
|
|
5515
5586
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5517
5588
|
* @deprecated
|
|
5518
5589
|
*/
|
|
5519
5590
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5520
5591
|
/**
|
|
5521
5592
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-lonely-if.md
|
|
5523
5594
|
*/
|
|
5524
5595
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5525
5596
|
/**
|
|
5526
5597
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-magic-array-flat-depth.md
|
|
5528
5599
|
*/
|
|
5529
5600
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5601
|
+
/**
|
|
5602
|
+
* Disallow manually wrapped comments.
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-manually-wrapped-comments.md
|
|
5604
|
+
*/
|
|
5605
|
+
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
5530
5606
|
/**
|
|
5531
5607
|
* Disallow named usage of default import and export.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-named-default.md
|
|
5533
5609
|
*/
|
|
5534
5610
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5535
5611
|
/**
|
|
5536
5612
|
* Disallow negated conditions.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negated-condition.md
|
|
5538
5614
|
*/
|
|
5539
5615
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5540
5616
|
/**
|
|
5541
5617
|
* Disallow negated expression in equality check.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negation-in-equality-check.md
|
|
5543
5619
|
*/
|
|
5544
5620
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5545
5621
|
/**
|
|
5546
5622
|
* Disallow nested ternary expressions.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-nested-ternary.md
|
|
5548
5624
|
*/
|
|
5549
5625
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5550
5626
|
/**
|
|
5551
5627
|
* Disallow `new Array()`.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-array.md
|
|
5553
5629
|
*/
|
|
5554
5630
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5555
5631
|
/**
|
|
5556
5632
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-buffer.md
|
|
5558
5634
|
*/
|
|
5559
5635
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5560
5636
|
/**
|
|
5561
5637
|
* Disallow the use of the `null` literal.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-null.md
|
|
5563
5639
|
*/
|
|
5564
5640
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5565
5641
|
/**
|
|
5566
5642
|
* Disallow the use of objects as default parameters.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-object-as-default-parameter.md
|
|
5568
5644
|
*/
|
|
5569
5645
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5570
5646
|
/**
|
|
5571
5647
|
* Disallow `process.exit()`.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-process-exit.md
|
|
5573
5649
|
*/
|
|
5574
5650
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5575
5651
|
/**
|
|
5576
5652
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-single-promise-in-promise-methods.md
|
|
5578
5654
|
*/
|
|
5579
5655
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5580
5656
|
/**
|
|
5581
5657
|
* Disallow classes that only have static members.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-static-only-class.md
|
|
5583
5659
|
*/
|
|
5584
5660
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5585
5661
|
/**
|
|
5586
5662
|
* Disallow `then` property.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-thenable.md
|
|
5588
5664
|
*/
|
|
5589
5665
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5590
5666
|
/**
|
|
5591
5667
|
* Disallow assigning `this` to a variable.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-assignment.md
|
|
5593
5669
|
*/
|
|
5594
5670
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5671
|
+
/**
|
|
5672
|
+
* Disallow `this` outside of classes.
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-outside-of-class.md
|
|
5674
|
+
*/
|
|
5675
|
+
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
5595
5676
|
/**
|
|
5596
5677
|
* Disallow comparing `undefined` using `typeof`.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-typeof-undefined.md
|
|
5598
5679
|
*/
|
|
5599
5680
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5600
5681
|
/**
|
|
5601
5682
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5603
5684
|
*/
|
|
5604
5685
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5605
5686
|
/**
|
|
5606
5687
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-splice-count.md
|
|
5608
5689
|
*/
|
|
5609
5690
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5610
5691
|
/**
|
|
5611
5692
|
* Disallow awaiting non-promise values.
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-await.md
|
|
5613
5694
|
*/
|
|
5614
5695
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5696
|
+
/**
|
|
5697
|
+
* Disallow unnecessary nested ternary expressions.
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-nested-ternary.md
|
|
5699
|
+
*/
|
|
5700
|
+
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5615
5701
|
/**
|
|
5616
5702
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-polyfills.md
|
|
5618
5704
|
*/
|
|
5619
5705
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5620
5706
|
/**
|
|
5621
5707
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-slice-end.md
|
|
5623
5709
|
*/
|
|
5624
5710
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5625
5711
|
/**
|
|
5626
5712
|
* Disallow unreadable array destructuring.
|
|
5627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-array-destructuring.md
|
|
5628
5714
|
*/
|
|
5629
5715
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5630
5716
|
/**
|
|
5631
5717
|
* Disallow unreadable IIFEs.
|
|
5632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-iife.md
|
|
5633
5719
|
*/
|
|
5634
5720
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5721
|
+
/**
|
|
5722
|
+
* Disallow ignoring the return value of selected array methods.
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-array-method-return.md
|
|
5724
|
+
*/
|
|
5725
|
+
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
5635
5726
|
/**
|
|
5636
5727
|
* Disallow unused object properties.
|
|
5637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-properties.md
|
|
5638
5729
|
*/
|
|
5639
5730
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5640
5731
|
/**
|
|
5641
5732
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-collection-argument.md
|
|
5643
5734
|
*/
|
|
5644
5735
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5645
5736
|
/**
|
|
5646
5737
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5648
5739
|
*/
|
|
5649
5740
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5650
5741
|
/**
|
|
5651
5742
|
* Disallow useless fallback when spreading in object literals.
|
|
5652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-fallback-in-spread.md
|
|
5653
5744
|
*/
|
|
5654
5745
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5655
5746
|
/**
|
|
5656
5747
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
5657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-iterator-to-array.md
|
|
5658
5749
|
*/
|
|
5659
5750
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5660
5751
|
/**
|
|
5661
5752
|
* Disallow useless array length check.
|
|
5662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-length-check.md
|
|
5663
5754
|
*/
|
|
5664
5755
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5665
5756
|
/**
|
|
5666
5757
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-promise-resolve-reject.md
|
|
5668
5759
|
*/
|
|
5669
5760
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5670
5761
|
/**
|
|
5671
5762
|
* Disallow unnecessary spread.
|
|
5672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-spread.md
|
|
5673
5764
|
*/
|
|
5674
5765
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5675
5766
|
/**
|
|
5676
5767
|
* Disallow useless case in switch statements.
|
|
5677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-switch-case.md
|
|
5678
5769
|
*/
|
|
5679
5770
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5680
5771
|
/**
|
|
5681
5772
|
* Disallow useless `undefined`.
|
|
5682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-undefined.md
|
|
5683
5774
|
*/
|
|
5684
5775
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5685
5776
|
/**
|
|
5686
5777
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-zero-fractions.md
|
|
5688
5779
|
*/
|
|
5689
5780
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5690
5781
|
/**
|
|
5691
5782
|
* Enforce proper case for numeric literals.
|
|
5692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/number-literal-case.md
|
|
5693
5784
|
*/
|
|
5694
5785
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5695
5786
|
/**
|
|
5696
5787
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/numeric-separators-style.md
|
|
5698
5789
|
*/
|
|
5699
5790
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5700
5791
|
/**
|
|
5701
5792
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-add-event-listener.md
|
|
5703
5794
|
*/
|
|
5704
5795
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5705
5796
|
/**
|
|
5706
5797
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-find.md
|
|
5708
5799
|
*/
|
|
5709
5800
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5710
5801
|
/**
|
|
5711
5802
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat.md
|
|
5713
5804
|
*/
|
|
5714
5805
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5715
5806
|
/**
|
|
5716
5807
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat-map.md
|
|
5718
5809
|
*/
|
|
5719
5810
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5720
5811
|
/**
|
|
5721
5812
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-index-of.md
|
|
5723
5814
|
*/
|
|
5724
5815
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5816
|
+
/**
|
|
5817
|
+
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
5818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-last-methods.md
|
|
5819
|
+
*/
|
|
5820
|
+
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
5725
5821
|
/**
|
|
5726
5822
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-some.md
|
|
5728
5824
|
*/
|
|
5729
5825
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5730
5826
|
/**
|
|
5731
5827
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-at.md
|
|
5733
5829
|
*/
|
|
5734
5830
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5735
5831
|
/**
|
|
5736
5832
|
* Prefer `BigInt` literals over the constructor.
|
|
5737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-bigint-literals.md
|
|
5738
5834
|
*/
|
|
5739
5835
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5740
5836
|
/**
|
|
5741
5837
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-blob-reading-methods.md
|
|
5743
5839
|
*/
|
|
5744
5840
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5745
5841
|
/**
|
|
5746
5842
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-class-fields.md
|
|
5748
5844
|
*/
|
|
5749
5845
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5750
5846
|
/**
|
|
5751
5847
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-classlist-toggle.md
|
|
5753
5849
|
*/
|
|
5754
5850
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5755
5851
|
/**
|
|
5756
5852
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-code-point.md
|
|
5758
5854
|
*/
|
|
5759
5855
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5760
5856
|
/**
|
|
5761
5857
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-date-now.md
|
|
5763
5859
|
*/
|
|
5764
5860
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5765
5861
|
/**
|
|
5766
5862
|
* Prefer default parameters over reassignment.
|
|
5767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-default-parameters.md
|
|
5768
5864
|
*/
|
|
5769
5865
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5770
5866
|
/**
|
|
5771
|
-
* Prefer `
|
|
5772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5867
|
+
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
5868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-append.md
|
|
5773
5869
|
*/
|
|
5774
5870
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5775
5871
|
/**
|
|
5776
|
-
*
|
|
5777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5872
|
+
* Renamed to `unicorn/dom-node-dataset`.
|
|
5873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
5874
|
+
* @deprecated
|
|
5778
5875
|
*/
|
|
5779
5876
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5780
5877
|
/**
|
|
5781
5878
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-remove.md
|
|
5783
5880
|
*/
|
|
5784
5881
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5785
5882
|
/**
|
|
5786
5883
|
* Prefer `.textContent` over `.innerText`.
|
|
5787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-text-content.md
|
|
5788
5885
|
*/
|
|
5789
5886
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5790
5887
|
/**
|
|
5791
5888
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-event-target.md
|
|
5793
5890
|
*/
|
|
5794
5891
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5795
5892
|
/**
|
|
5796
5893
|
* Prefer `export…from` when re-exporting.
|
|
5797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-export-from.md
|
|
5798
5895
|
*/
|
|
5799
5896
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5897
|
+
/**
|
|
5898
|
+
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
5899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-get-or-insert-computed.md
|
|
5900
|
+
*/
|
|
5901
|
+
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
5800
5902
|
/**
|
|
5801
5903
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-global-this.md
|
|
5803
5905
|
*/
|
|
5804
5906
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5907
|
+
/**
|
|
5908
|
+
* Prefer HTTPS over HTTP.
|
|
5909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-https.md
|
|
5910
|
+
*/
|
|
5911
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
5805
5912
|
/**
|
|
5806
5913
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-import-meta-properties.md
|
|
5808
5915
|
*/
|
|
5809
5916
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5810
5917
|
/**
|
|
5811
5918
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes.md
|
|
5813
5920
|
*/
|
|
5814
5921
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5815
5922
|
/**
|
|
5816
|
-
* Prefer
|
|
5817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5923
|
+
* Prefer `.includes()` over repeated equality comparisons.
|
|
5924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
5925
|
+
*/
|
|
5926
|
+
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
5927
|
+
/**
|
|
5928
|
+
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
5929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-concat.md
|
|
5930
|
+
*/
|
|
5931
|
+
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
5932
|
+
/**
|
|
5933
|
+
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
5934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-to-array-at-end.md
|
|
5935
|
+
*/
|
|
5936
|
+
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
5937
|
+
/**
|
|
5938
|
+
* Renamed to `unicorn/consistent-json-file-read`.
|
|
5939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
5940
|
+
* @deprecated
|
|
5818
5941
|
*/
|
|
5819
5942
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5820
5943
|
/**
|
|
5821
|
-
* Prefer `KeyboardEvent#key` over
|
|
5822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5944
|
+
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
5945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-keyboard-event-key.md
|
|
5823
5946
|
*/
|
|
5824
5947
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5825
5948
|
/**
|
|
5826
5949
|
* Prefer using a logical operator over a ternary.
|
|
5827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5828
5951
|
*/
|
|
5829
5952
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5953
|
+
/**
|
|
5954
|
+
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
5955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-abs.md
|
|
5956
|
+
*/
|
|
5957
|
+
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
5830
5958
|
/**
|
|
5831
5959
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-min-max.md
|
|
5833
5961
|
*/
|
|
5834
5962
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5835
5963
|
/**
|
|
5836
5964
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-trunc.md
|
|
5838
5966
|
*/
|
|
5839
5967
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5840
5968
|
/**
|
|
5841
5969
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-dom-apis.md
|
|
5843
5971
|
*/
|
|
5844
5972
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5845
5973
|
/**
|
|
5846
5974
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-math-apis.md
|
|
5848
5976
|
*/
|
|
5849
5977
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5850
5978
|
/**
|
|
5851
5979
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-module.md
|
|
5853
5981
|
*/
|
|
5854
5982
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5855
5983
|
/**
|
|
5856
5984
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-native-coercion-functions.md
|
|
5858
5986
|
*/
|
|
5859
5987
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5860
5988
|
/**
|
|
5861
5989
|
* Prefer negative index over `.length - index` when possible.
|
|
5862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-negative-index.md
|
|
5863
5991
|
*/
|
|
5864
5992
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5865
5993
|
/**
|
|
5866
5994
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-node-protocol.md
|
|
5868
5996
|
*/
|
|
5869
5997
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5870
5998
|
/**
|
|
5871
5999
|
* Prefer `Number` static properties over global ones.
|
|
5872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-number-properties.md
|
|
5873
6001
|
*/
|
|
5874
6002
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5875
6003
|
/**
|
|
5876
6004
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-object-from-entries.md
|
|
5878
6006
|
*/
|
|
5879
6007
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5880
6008
|
/**
|
|
5881
6009
|
* Prefer omitting the `catch` binding parameter.
|
|
5882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-optional-catch-binding.md
|
|
5883
6011
|
*/
|
|
5884
6012
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5885
6013
|
/**
|
|
5886
6014
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-prototype-methods.md
|
|
5888
6016
|
*/
|
|
5889
6017
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5890
6018
|
/**
|
|
5891
|
-
* Prefer `.querySelector()`
|
|
5892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6019
|
+
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
6020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-query-selector.md
|
|
6021
|
+
*/
|
|
6022
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
6023
|
+
/**
|
|
6024
|
+
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
6025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-queue-microtask.md
|
|
5893
6026
|
*/
|
|
5894
|
-
'unicorn/prefer-
|
|
6027
|
+
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
5895
6028
|
/**
|
|
5896
6029
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-reflect-apply.md
|
|
5898
6031
|
*/
|
|
5899
6032
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5900
6033
|
/**
|
|
5901
6034
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-regexp-test.md
|
|
5903
6036
|
*/
|
|
5904
6037
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5905
6038
|
/**
|
|
5906
6039
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-response-static-json.md
|
|
5908
6041
|
*/
|
|
5909
6042
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5910
6043
|
/**
|
|
5911
6044
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-has.md
|
|
5913
6046
|
*/
|
|
5914
|
-
'unicorn/prefer-set-has'?: Linter.RuleEntry<
|
|
6047
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
5915
6048
|
/**
|
|
5916
6049
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-size.md
|
|
5918
6051
|
*/
|
|
5919
6052
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5920
6053
|
/**
|
|
5921
6054
|
* Prefer simple conditions first in logical expressions.
|
|
5922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-simple-condition-first.md
|
|
5923
6056
|
*/
|
|
5924
6057
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
5925
6058
|
/**
|
|
5926
|
-
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6059
|
+
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-single-call.md
|
|
5928
6061
|
*/
|
|
5929
6062
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6063
|
+
/**
|
|
6064
|
+
* Prefer `String#split()` with a limit.
|
|
6065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-split-limit.md
|
|
6066
|
+
*/
|
|
6067
|
+
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
5930
6068
|
/**
|
|
5931
6069
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-spread.md
|
|
5933
6071
|
*/
|
|
5934
6072
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6073
|
+
/**
|
|
6074
|
+
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
6075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-match-all.md
|
|
6076
|
+
*/
|
|
6077
|
+
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
6078
|
+
/**
|
|
6079
|
+
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
6080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-pad-start-end.md
|
|
6081
|
+
*/
|
|
6082
|
+
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
5935
6083
|
/**
|
|
5936
6084
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-raw.md
|
|
5938
6086
|
*/
|
|
5939
6087
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5940
6088
|
/**
|
|
5941
|
-
* Prefer `String#
|
|
5942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6089
|
+
* Prefer `String#repeat()` for repeated whitespace.
|
|
6090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-repeat.md
|
|
6091
|
+
*/
|
|
6092
|
+
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
6093
|
+
/**
|
|
6094
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
6095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-replace-all.md
|
|
5943
6096
|
*/
|
|
5944
6097
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5945
6098
|
/**
|
|
5946
6099
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-slice.md
|
|
5948
6101
|
*/
|
|
5949
6102
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5950
6103
|
/**
|
|
5951
6104
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-starts-ends-with.md
|
|
5953
6106
|
*/
|
|
5954
6107
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5955
6108
|
/**
|
|
5956
6109
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-trim-start-end.md
|
|
5958
6111
|
*/
|
|
5959
6112
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5960
6113
|
/**
|
|
5961
6114
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-structured-clone.md
|
|
5963
6116
|
*/
|
|
5964
6117
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5965
6118
|
/**
|
|
5966
6119
|
* Prefer `switch` over multiple `else-if`.
|
|
5967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-switch.md
|
|
5968
6121
|
*/
|
|
5969
6122
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5970
6123
|
/**
|
|
5971
6124
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-ternary.md
|
|
5973
6126
|
*/
|
|
5974
6127
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5975
6128
|
/**
|
|
5976
6129
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-top-level-await.md
|
|
5978
6131
|
*/
|
|
5979
6132
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5980
6133
|
/**
|
|
5981
6134
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-type-error.md
|
|
5983
6136
|
*/
|
|
5984
6137
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5985
6138
|
/**
|
|
5986
6139
|
* Prevent abbreviations.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prevent-abbreviations.md
|
|
5988
6141
|
*/
|
|
5989
6142
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5990
6143
|
/**
|
|
5991
6144
|
* Enforce consistent relative URL style.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/relative-url-style.md
|
|
5993
6146
|
*/
|
|
5994
6147
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5995
6148
|
/**
|
|
5996
6149
|
* Enforce using the separator argument with `Array#join()`.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-array-join-separator.md
|
|
5998
6151
|
*/
|
|
5999
6152
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6153
|
+
/**
|
|
6154
|
+
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
6155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-css-escape.md
|
|
6156
|
+
*/
|
|
6157
|
+
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
6000
6158
|
/**
|
|
6001
6159
|
* Require non-empty module attributes for imports and exports
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-attributes.md
|
|
6003
6161
|
*/
|
|
6004
6162
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6005
6163
|
/**
|
|
6006
6164
|
* Require non-empty specifier list in import and export statements.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-specifiers.md
|
|
6008
6166
|
*/
|
|
6009
6167
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6010
6168
|
/**
|
|
6011
6169
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6013
6171
|
*/
|
|
6014
6172
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6173
|
+
/**
|
|
6174
|
+
* Require passive event listeners for high-frequency events.
|
|
6175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-passive-events.md
|
|
6176
|
+
*/
|
|
6177
|
+
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
6015
6178
|
/**
|
|
6016
6179
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-post-message-target-origin.md
|
|
6018
6181
|
*/
|
|
6019
6182
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6020
6183
|
/**
|
|
6021
6184
|
* Enforce better string content.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/string-content.md
|
|
6023
6186
|
*/
|
|
6024
6187
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6025
6188
|
/**
|
|
6026
6189
|
* Enforce consistent brace style for `case` clauses.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-braces.md
|
|
6028
6191
|
*/
|
|
6029
6192
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6030
6193
|
/**
|
|
6031
6194
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-break-position.md
|
|
6033
6196
|
*/
|
|
6034
6197
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
6035
6198
|
/**
|
|
6036
6199
|
* Fix whitespace-insensitive template indentation.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/template-indent.md
|
|
6038
6201
|
*/
|
|
6039
6202
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6040
6203
|
/**
|
|
6041
6204
|
* Enforce consistent case for text encoding identifiers.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/text-encoding-identifier-case.md
|
|
6043
6206
|
*/
|
|
6044
6207
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6045
6208
|
/**
|
|
6046
6209
|
* Require `new` when creating an error.
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/throw-new-error.md
|
|
6048
6211
|
*/
|
|
6049
6212
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6213
|
+
/**
|
|
6214
|
+
* Limit the complexity of `try` blocks.
|
|
6215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/try-complexity.md
|
|
6216
|
+
*/
|
|
6217
|
+
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
6050
6218
|
/**
|
|
6051
6219
|
* Disallow unused variables
|
|
6052
6220
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
@@ -14922,23 +15090,40 @@ type TomlSpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
14922
15090
|
markers?: string[];
|
|
14923
15091
|
}]; // ----- toml/table-bracket-spacing -----
|
|
14924
15092
|
type TomlTableBracketSpacing = [] | [("always" | "never")]; // ----- unicode-bom -----
|
|
14925
|
-
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/
|
|
14926
|
-
type UnicornBetterRegex = [] | [{
|
|
14927
|
-
sortCharacterClasses?: boolean;
|
|
14928
|
-
}]; // ----- unicorn/catch-error-name -----
|
|
15093
|
+
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
|
|
14929
15094
|
type UnicornCatchErrorName = [] | [{
|
|
14930
15095
|
name?: string;
|
|
14931
15096
|
ignore?: unknown[];
|
|
14932
|
-
}]; // ----- unicorn/consistent-
|
|
15097
|
+
}]; // ----- unicorn/consistent-compound-words -----
|
|
15098
|
+
type UnicornConsistentCompoundWords = [] | [{
|
|
15099
|
+
checkProperties?: boolean;
|
|
15100
|
+
checkVariables?: boolean;
|
|
15101
|
+
checkDefaultAndNamespaceImports?: (boolean | "internal");
|
|
15102
|
+
checkShorthandImports?: (boolean | "internal");
|
|
15103
|
+
checkShorthandProperties?: boolean;
|
|
15104
|
+
extendDefaultReplacements?: boolean;
|
|
15105
|
+
replacements?: _UnicornConsistentCompoundWords_Replacements;
|
|
15106
|
+
allowList?: _UnicornConsistentCompoundWords_TrueObject;
|
|
15107
|
+
}];
|
|
15108
|
+
interface _UnicornConsistentCompoundWords_Replacements {
|
|
15109
|
+
[k: string]: (false | string) | undefined;
|
|
15110
|
+
}
|
|
15111
|
+
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
15112
|
+
[k: string]: true | undefined;
|
|
15113
|
+
} // ----- unicorn/consistent-function-scoping -----
|
|
14933
15114
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
14934
15115
|
checkArrowFunctions?: boolean;
|
|
15116
|
+
}]; // ----- unicorn/consistent-json-file-read -----
|
|
15117
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/dom-node-dataset -----
|
|
15118
|
+
type UnicornDomNodeDataset = [] | [{
|
|
15119
|
+
preferAttributes?: boolean;
|
|
14935
15120
|
}]; // ----- unicorn/escape-case -----
|
|
14936
15121
|
type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/expiring-todo-comments -----
|
|
14937
15122
|
type UnicornExpiringTodoComments = [] | [{
|
|
14938
15123
|
terms?: string[];
|
|
14939
15124
|
ignore?: unknown[];
|
|
14940
|
-
|
|
14941
|
-
|
|
15125
|
+
checkDates?: boolean;
|
|
15126
|
+
checkDatesOnPullRequests?: boolean;
|
|
14942
15127
|
allowWarningComments?: boolean;
|
|
14943
15128
|
date?: string;
|
|
14944
15129
|
}]; // ----- unicorn/explicit-length-check -----
|
|
@@ -14949,6 +15134,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
14949
15134
|
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
14950
15135
|
ignore?: unknown[];
|
|
14951
15136
|
multipleFileExtensions?: boolean;
|
|
15137
|
+
checkDirectories?: boolean;
|
|
14952
15138
|
} | {
|
|
14953
15139
|
cases?: {
|
|
14954
15140
|
camelCase?: boolean;
|
|
@@ -14958,6 +15144,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
14958
15144
|
};
|
|
14959
15145
|
ignore?: unknown[];
|
|
14960
15146
|
multipleFileExtensions?: boolean;
|
|
15147
|
+
checkDirectories?: boolean;
|
|
14961
15148
|
})]; // ----- unicorn/import-style -----
|
|
14962
15149
|
type UnicornImportStyle = [] | [{
|
|
14963
15150
|
checkImport?: boolean;
|
|
@@ -14981,6 +15168,9 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
14981
15168
|
functions?: string[];
|
|
14982
15169
|
selectors?: string[];
|
|
14983
15170
|
comments?: string[];
|
|
15171
|
+
}]; // ----- unicorn/no-array-callback-reference -----
|
|
15172
|
+
type UnicornNoArrayCallbackReference = [] | [{
|
|
15173
|
+
ignore?: string[];
|
|
14984
15174
|
}]; // ----- unicorn/no-array-reduce -----
|
|
14985
15175
|
type UnicornNoArrayReduce = [] | [{
|
|
14986
15176
|
allowSimpleOperations?: boolean;
|
|
@@ -14990,6 +15180,9 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
14990
15180
|
}]; // ----- unicorn/no-array-sort -----
|
|
14991
15181
|
type UnicornNoArraySort = [] | [{
|
|
14992
15182
|
allowExpressionStatement?: boolean;
|
|
15183
|
+
}]; // ----- unicorn/no-empty-file -----
|
|
15184
|
+
type UnicornNoEmptyFile = [] | [{
|
|
15185
|
+
allowComments?: boolean;
|
|
14993
15186
|
}]; // ----- unicorn/no-instanceof-builtins -----
|
|
14994
15187
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
14995
15188
|
useErrorIsError?: boolean;
|
|
@@ -15003,13 +15196,14 @@ type UnicornNoKeywordPrefix = [] | [{
|
|
|
15003
15196
|
onlyCamelCase?: boolean;
|
|
15004
15197
|
}]; // ----- unicorn/no-null -----
|
|
15005
15198
|
type UnicornNoNull = [] | [{
|
|
15199
|
+
checkArguments?: boolean;
|
|
15006
15200
|
checkStrictEquality?: boolean;
|
|
15007
15201
|
}]; // ----- unicorn/no-typeof-undefined -----
|
|
15008
15202
|
type UnicornNoTypeofUndefined = [] | [{
|
|
15009
15203
|
checkGlobalVariables?: boolean;
|
|
15010
15204
|
}]; // ----- unicorn/no-unnecessary-polyfills -----
|
|
15011
15205
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
15012
|
-
targets
|
|
15206
|
+
targets?: (string | unknown[] | {
|
|
15013
15207
|
[k: string]: unknown | undefined;
|
|
15014
15208
|
});
|
|
15015
15209
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
@@ -15040,6 +15234,7 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
15040
15234
|
onlyIfContainsSeparator?: boolean;
|
|
15041
15235
|
minimumDigits?: number;
|
|
15042
15236
|
groupLength?: number;
|
|
15237
|
+
fractionGroupLength?: number;
|
|
15043
15238
|
};
|
|
15044
15239
|
onlyIfContainsSeparator?: boolean;
|
|
15045
15240
|
}]; // ----- unicorn/prefer-add-event-listener -----
|
|
@@ -15057,7 +15252,10 @@ type UnicornPreferAt = [] | [{
|
|
|
15057
15252
|
checkAllIndexAccess?: boolean;
|
|
15058
15253
|
}]; // ----- unicorn/prefer-export-from -----
|
|
15059
15254
|
type UnicornPreferExportFrom = [] | [{
|
|
15060
|
-
|
|
15255
|
+
checkUsedVariables?: boolean;
|
|
15256
|
+
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
15257
|
+
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
15258
|
+
minimumComparisons?: number;
|
|
15061
15259
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
15062
15260
|
type UnicornPreferNumberProperties = [] | [{
|
|
15063
15261
|
checkInfinity?: boolean;
|
|
@@ -15065,9 +15263,22 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
15065
15263
|
}]; // ----- unicorn/prefer-object-from-entries -----
|
|
15066
15264
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
15067
15265
|
functions?: unknown[];
|
|
15266
|
+
}]; // ----- unicorn/prefer-query-selector -----
|
|
15267
|
+
type UnicornPreferQuerySelector = [] | [{
|
|
15268
|
+
allowWithVariables?: boolean;
|
|
15269
|
+
}]; // ----- unicorn/prefer-queue-microtask -----
|
|
15270
|
+
type UnicornPreferQueueMicrotask = [] | [{
|
|
15271
|
+
checkSetImmediate?: boolean;
|
|
15272
|
+
checkSetTimeout?: boolean;
|
|
15273
|
+
}]; // ----- unicorn/prefer-set-has -----
|
|
15274
|
+
type UnicornPreferSetHas = [] | [{
|
|
15275
|
+
minimumItems?: number;
|
|
15068
15276
|
}]; // ----- unicorn/prefer-single-call -----
|
|
15069
15277
|
type UnicornPreferSingleCall = [] | [{
|
|
15070
15278
|
ignore?: unknown[];
|
|
15279
|
+
}]; // ----- unicorn/prefer-string-repeat -----
|
|
15280
|
+
type UnicornPreferStringRepeat = [] | [{
|
|
15281
|
+
minimumRepetitions?: number;
|
|
15071
15282
|
}]; // ----- unicorn/prefer-structured-clone -----
|
|
15072
15283
|
type UnicornPreferStructuredClone = [] | [{
|
|
15073
15284
|
functions?: unknown[];
|
|
@@ -15100,15 +15311,20 @@ interface _UnicornPreventAbbreviations_BooleanObject {
|
|
|
15100
15311
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
15101
15312
|
[k: string]: boolean | undefined;
|
|
15102
15313
|
} // ----- unicorn/relative-url-style -----
|
|
15103
|
-
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/
|
|
15314
|
+
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
15315
|
+
type UnicornRequireCssEscape = [] | [{
|
|
15316
|
+
checkAllSelectors?: boolean;
|
|
15317
|
+
}]; // ----- unicorn/string-content -----
|
|
15104
15318
|
type UnicornStringContent = [] | [{
|
|
15105
15319
|
patterns?: {
|
|
15106
15320
|
[k: string]: (string | {
|
|
15107
15321
|
suggest: string;
|
|
15108
15322
|
fix?: boolean;
|
|
15323
|
+
caseSensitive?: boolean;
|
|
15109
15324
|
message?: string;
|
|
15110
15325
|
}) | undefined;
|
|
15111
15326
|
};
|
|
15327
|
+
selectors?: string[];
|
|
15112
15328
|
}]; // ----- unicorn/switch-case-braces -----
|
|
15113
15329
|
type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
|
|
15114
15330
|
type UnicornTemplateIndent = [] | [{
|
|
@@ -15120,6 +15336,9 @@ type UnicornTemplateIndent = [] | [{
|
|
|
15120
15336
|
}]; // ----- unicorn/text-encoding-identifier-case -----
|
|
15121
15337
|
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
15122
15338
|
withDash?: boolean;
|
|
15339
|
+
}]; // ----- unicorn/try-complexity -----
|
|
15340
|
+
type UnicornTryComplexity = [] | [{
|
|
15341
|
+
max?: number;
|
|
15123
15342
|
}]; // ----- unused-imports/no-unused-imports -----
|
|
15124
15343
|
type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
15125
15344
|
args?: ("all" | "after-used" | "none");
|