@eienjs/eslint-config 1.11.2 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/constants_generated.js +3 -3
- package/dist/configs/e18e.js +6 -0
- package/dist/globs.js +10 -3
- package/dist/package.js +1 -1
- package/dist/typegen.d.ts +416 -152
- package/dist/types.d.ts +1 -1
- package/package.json +29 -23
package/dist/typegen.d.ts
CHANGED
|
@@ -1553,6 +1553,11 @@ interface RuleOptions {
|
|
|
1553
1553
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
1554
1554
|
*/
|
|
1555
1555
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
1556
|
+
/**
|
|
1557
|
+
* disallow `prerender` export outside of pages/ directory
|
|
1558
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
1559
|
+
*/
|
|
1560
|
+
'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]>;
|
|
1556
1561
|
/**
|
|
1557
1562
|
* disallow use of `set:html` to prevent XSS attack
|
|
1558
1563
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
|
|
@@ -2663,6 +2668,11 @@ interface RuleOptions {
|
|
|
2663
2668
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
2664
2669
|
*/
|
|
2665
2670
|
'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>;
|
|
2671
|
+
/**
|
|
2672
|
+
* Require or disallow metadata for fenced code blocks
|
|
2673
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md
|
|
2674
|
+
*/
|
|
2675
|
+
'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta>;
|
|
2666
2676
|
/**
|
|
2667
2677
|
* Enforce heading levels increment by one
|
|
2668
2678
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
@@ -3957,6 +3967,11 @@ interface RuleOptions {
|
|
|
3957
3967
|
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
3958
3968
|
*/
|
|
3959
3969
|
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
3970
|
+
/**
|
|
3971
|
+
* Enforce sorted arrays.
|
|
3972
|
+
* @see https://perfectionist.dev/rules/sort-arrays
|
|
3973
|
+
*/
|
|
3974
|
+
'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays>;
|
|
3960
3975
|
/**
|
|
3961
3976
|
* Enforce sorted classes.
|
|
3962
3977
|
* @see https://perfectionist.dev/rules/sort-classes
|
|
@@ -5109,6 +5124,11 @@ interface RuleOptions {
|
|
|
5109
5124
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
|
|
5110
5125
|
*/
|
|
5111
5126
|
'test/require-top-level-describe'?: Linter.RuleEntry<TestRequireTopLevelDescribe>;
|
|
5127
|
+
/**
|
|
5128
|
+
* enforce unbound methods are called with their expected scope
|
|
5129
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/unbound-method.md
|
|
5130
|
+
*/
|
|
5131
|
+
'test/unbound-method'?: Linter.RuleEntry<TestUnboundMethod>;
|
|
5112
5132
|
/**
|
|
5113
5133
|
* enforce valid describe callback
|
|
5114
5134
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
|
|
@@ -5262,730 +5282,750 @@ interface RuleOptions {
|
|
|
5262
5282
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5263
5283
|
/**
|
|
5264
5284
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
|
|
5266
5286
|
*/
|
|
5267
5287
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5268
5288
|
/**
|
|
5269
5289
|
* Enforce a specific parameter name in catch clauses.
|
|
5270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
|
|
5271
5291
|
*/
|
|
5272
5292
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5273
5293
|
/**
|
|
5274
5294
|
* Enforce consistent assertion style with `node:assert`.
|
|
5275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
|
|
5276
5296
|
*/
|
|
5277
5297
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5278
5298
|
/**
|
|
5279
5299
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
|
|
5281
5301
|
*/
|
|
5282
5302
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5283
5303
|
/**
|
|
5284
5304
|
* Use destructured variables over properties.
|
|
5285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
|
|
5286
5306
|
*/
|
|
5287
5307
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5288
5308
|
/**
|
|
5289
5309
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5291
5311
|
*/
|
|
5292
5312
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5293
5313
|
/**
|
|
5294
5314
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
|
|
5296
5316
|
*/
|
|
5297
5317
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5298
5318
|
/**
|
|
5299
5319
|
* Move function definitions to the highest possible scope.
|
|
5300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
|
|
5301
5321
|
*/
|
|
5302
5322
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5323
|
+
/**
|
|
5324
|
+
* Enforce consistent style for escaping `${` in template literals.
|
|
5325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
|
|
5326
|
+
*/
|
|
5327
|
+
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
5303
5328
|
/**
|
|
5304
5329
|
* Enforce correct `Error` subclassing.
|
|
5305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
|
|
5306
5331
|
*/
|
|
5307
5332
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5308
5333
|
/**
|
|
5309
5334
|
* Enforce no spaces between braces.
|
|
5310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
|
|
5311
5336
|
*/
|
|
5312
5337
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5313
5338
|
/**
|
|
5314
5339
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
|
|
5316
5341
|
*/
|
|
5317
5342
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5318
5343
|
/**
|
|
5319
5344
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
|
|
5321
5346
|
*/
|
|
5322
5347
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5323
5348
|
/**
|
|
5324
5349
|
* Add expiration conditions to TODO comments.
|
|
5325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
|
|
5326
5351
|
*/
|
|
5327
5352
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5328
5353
|
/**
|
|
5329
5354
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
|
|
5331
5356
|
*/
|
|
5332
5357
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5333
5358
|
/**
|
|
5334
5359
|
* Enforce a case style for filenames.
|
|
5335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
|
|
5336
5361
|
*/
|
|
5337
5362
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5338
5363
|
/**
|
|
5339
5364
|
* Enforce specific import styles per module.
|
|
5340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
|
|
5341
5366
|
*/
|
|
5342
5367
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5343
5368
|
/**
|
|
5344
5369
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
5345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
|
|
5346
5371
|
*/
|
|
5347
5372
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
5348
5373
|
/**
|
|
5349
5374
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
|
|
5351
5376
|
*/
|
|
5352
5377
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5353
5378
|
/**
|
|
5354
5379
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5356
5381
|
*/
|
|
5357
5382
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5358
5383
|
/**
|
|
5359
5384
|
* Disallow recursive access to `this` within getters and setters.
|
|
5360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
|
|
5361
5386
|
*/
|
|
5362
5387
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5363
5388
|
/**
|
|
5364
5389
|
* Disallow anonymous functions and classes as the default export.
|
|
5365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
|
|
5366
5391
|
*/
|
|
5367
5392
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5368
5393
|
/**
|
|
5369
5394
|
* Prevent passing a function reference directly to iterator methods.
|
|
5370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
|
|
5371
5396
|
*/
|
|
5372
5397
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5373
5398
|
/**
|
|
5374
5399
|
* Prefer `for…of` over the `forEach` method.
|
|
5375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
|
|
5376
5401
|
*/
|
|
5377
5402
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5378
5403
|
/**
|
|
5379
5404
|
* Disallow using the `this` argument in array methods.
|
|
5380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
|
|
5381
5406
|
*/
|
|
5382
5407
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5383
5408
|
/**
|
|
5384
5409
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
5386
5411
|
* @deprecated
|
|
5387
5412
|
*/
|
|
5388
5413
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5389
5414
|
/**
|
|
5390
5415
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
|
|
5392
5417
|
*/
|
|
5393
5418
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5394
5419
|
/**
|
|
5395
5420
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
|
|
5397
5422
|
*/
|
|
5398
5423
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5399
5424
|
/**
|
|
5400
5425
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
|
|
5402
5427
|
*/
|
|
5403
5428
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5404
5429
|
/**
|
|
5405
5430
|
* Disallow member access from await expression.
|
|
5406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
|
|
5407
5432
|
*/
|
|
5408
5433
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5409
5434
|
/**
|
|
5410
5435
|
* Disallow using `await` in `Promise` method parameters.
|
|
5411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5412
5437
|
*/
|
|
5413
5438
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5414
5439
|
/**
|
|
5415
5440
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
|
|
5417
5442
|
*/
|
|
5418
5443
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5419
5444
|
/**
|
|
5420
5445
|
* Do not use `document.cookie` directly.
|
|
5421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
|
|
5422
5447
|
*/
|
|
5423
5448
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5424
5449
|
/**
|
|
5425
5450
|
* Disallow empty files.
|
|
5426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
|
|
5427
5452
|
*/
|
|
5428
5453
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5429
5454
|
/**
|
|
5430
5455
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
|
|
5432
5457
|
*/
|
|
5433
5458
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5434
5459
|
/**
|
|
5435
5460
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
|
|
5437
5462
|
*/
|
|
5438
5463
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5439
5464
|
/**
|
|
5440
5465
|
* Disallow immediate mutation after variable assignment.
|
|
5441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
|
|
5442
5467
|
*/
|
|
5443
5468
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5444
5469
|
/**
|
|
5445
5470
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
5447
5472
|
* @deprecated
|
|
5448
5473
|
*/
|
|
5449
5474
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5450
5475
|
/**
|
|
5451
5476
|
* Disallow `instanceof` with built-in objects
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
|
|
5453
5478
|
*/
|
|
5454
5479
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5455
5480
|
/**
|
|
5456
5481
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5458
5483
|
*/
|
|
5459
5484
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5460
5485
|
/**
|
|
5461
5486
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5463
5488
|
*/
|
|
5464
5489
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5465
5490
|
/**
|
|
5466
5491
|
* Disallow identifiers starting with `new` or `class`.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
|
|
5468
5493
|
*/
|
|
5469
5494
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5470
5495
|
/**
|
|
5471
5496
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
5473
5498
|
* @deprecated
|
|
5474
5499
|
*/
|
|
5475
5500
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5476
5501
|
/**
|
|
5477
5502
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
|
|
5479
5504
|
*/
|
|
5480
5505
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5481
5506
|
/**
|
|
5482
5507
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5484
5509
|
*/
|
|
5485
5510
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5486
5511
|
/**
|
|
5487
5512
|
* Disallow named usage of default import and export.
|
|
5488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
|
|
5489
5514
|
*/
|
|
5490
5515
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5491
5516
|
/**
|
|
5492
5517
|
* Disallow negated conditions.
|
|
5493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
|
|
5494
5519
|
*/
|
|
5495
5520
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5496
5521
|
/**
|
|
5497
5522
|
* Disallow negated expression in equality check.
|
|
5498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5499
5524
|
*/
|
|
5500
5525
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5501
5526
|
/**
|
|
5502
5527
|
* Disallow nested ternary expressions.
|
|
5503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
|
|
5504
5529
|
*/
|
|
5505
5530
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5506
5531
|
/**
|
|
5507
5532
|
* Disallow `new Array()`.
|
|
5508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
|
|
5509
5534
|
*/
|
|
5510
5535
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5511
5536
|
/**
|
|
5512
5537
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
|
|
5514
5539
|
*/
|
|
5515
5540
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5516
5541
|
/**
|
|
5517
5542
|
* Disallow the use of the `null` literal.
|
|
5518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
|
|
5519
5544
|
*/
|
|
5520
5545
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5521
5546
|
/**
|
|
5522
5547
|
* Disallow the use of objects as default parameters.
|
|
5523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5524
5549
|
*/
|
|
5525
5550
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5526
5551
|
/**
|
|
5527
5552
|
* Disallow `process.exit()`.
|
|
5528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
|
|
5529
5554
|
*/
|
|
5530
5555
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5531
5556
|
/**
|
|
5532
5557
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5534
5559
|
*/
|
|
5535
5560
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5536
5561
|
/**
|
|
5537
5562
|
* Disallow classes that only have static members.
|
|
5538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
|
|
5539
5564
|
*/
|
|
5540
5565
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5541
5566
|
/**
|
|
5542
5567
|
* Disallow `then` property.
|
|
5543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
|
|
5544
5569
|
*/
|
|
5545
5570
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5546
5571
|
/**
|
|
5547
5572
|
* Disallow assigning `this` to a variable.
|
|
5548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
|
|
5549
5574
|
*/
|
|
5550
5575
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5551
5576
|
/**
|
|
5552
5577
|
* Disallow comparing `undefined` using `typeof`.
|
|
5553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
|
|
5554
5579
|
*/
|
|
5555
5580
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5556
5581
|
/**
|
|
5557
5582
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5559
5584
|
*/
|
|
5560
5585
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5561
5586
|
/**
|
|
5562
5587
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5564
5589
|
*/
|
|
5565
5590
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5566
5591
|
/**
|
|
5567
5592
|
* Disallow awaiting non-promise values.
|
|
5568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
|
|
5569
5594
|
*/
|
|
5570
5595
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5571
5596
|
/**
|
|
5572
5597
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5574
5599
|
*/
|
|
5575
5600
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5576
5601
|
/**
|
|
5577
5602
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5579
5604
|
*/
|
|
5580
5605
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5581
5606
|
/**
|
|
5582
5607
|
* Disallow unreadable array destructuring.
|
|
5583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5584
5609
|
*/
|
|
5585
5610
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5586
5611
|
/**
|
|
5587
5612
|
* Disallow unreadable IIFEs.
|
|
5588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
|
|
5589
5614
|
*/
|
|
5590
5615
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5591
5616
|
/**
|
|
5592
5617
|
* Disallow unused object properties.
|
|
5593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
|
|
5594
5619
|
*/
|
|
5595
5620
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5596
5621
|
/**
|
|
5597
5622
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
|
|
5599
5624
|
*/
|
|
5600
5625
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5601
5626
|
/**
|
|
5602
5627
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5604
5629
|
*/
|
|
5605
5630
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5606
5631
|
/**
|
|
5607
5632
|
* Disallow useless fallback when spreading in object literals.
|
|
5608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5609
5634
|
*/
|
|
5610
5635
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5636
|
+
/**
|
|
5637
|
+
* Disallow unnecessary `.toArray()` on iterators.
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
5639
|
+
*/
|
|
5640
|
+
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
5611
5641
|
/**
|
|
5612
5642
|
* Disallow useless array length check.
|
|
5613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
|
|
5614
5644
|
*/
|
|
5615
5645
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5616
5646
|
/**
|
|
5617
5647
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5619
5649
|
*/
|
|
5620
5650
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5621
5651
|
/**
|
|
5622
5652
|
* Disallow unnecessary spread.
|
|
5623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
|
|
5624
5654
|
*/
|
|
5625
5655
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5626
5656
|
/**
|
|
5627
5657
|
* Disallow useless case in switch statements.
|
|
5628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
|
|
5629
5659
|
*/
|
|
5630
5660
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5631
5661
|
/**
|
|
5632
5662
|
* Disallow useless `undefined`.
|
|
5633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
|
|
5634
5664
|
*/
|
|
5635
5665
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5636
5666
|
/**
|
|
5637
5667
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
|
|
5639
5669
|
*/
|
|
5640
5670
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5641
5671
|
/**
|
|
5642
5672
|
* Enforce proper case for numeric literals.
|
|
5643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
|
|
5644
5674
|
*/
|
|
5645
5675
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5646
5676
|
/**
|
|
5647
5677
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
|
|
5649
5679
|
*/
|
|
5650
5680
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5651
5681
|
/**
|
|
5652
5682
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
|
|
5654
5684
|
*/
|
|
5655
5685
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5656
5686
|
/**
|
|
5657
5687
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
|
|
5659
5689
|
*/
|
|
5660
5690
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5661
5691
|
/**
|
|
5662
5692
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
|
|
5664
5694
|
*/
|
|
5665
5695
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5666
5696
|
/**
|
|
5667
5697
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
|
|
5669
5699
|
*/
|
|
5670
5700
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5671
5701
|
/**
|
|
5672
5702
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
|
|
5674
5704
|
*/
|
|
5675
5705
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5676
5706
|
/**
|
|
5677
5707
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
|
|
5679
5709
|
*/
|
|
5680
5710
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5681
5711
|
/**
|
|
5682
5712
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
|
|
5684
5714
|
*/
|
|
5685
5715
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5686
5716
|
/**
|
|
5687
5717
|
* Prefer `BigInt` literals over the constructor.
|
|
5688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
|
|
5689
5719
|
*/
|
|
5690
5720
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5691
5721
|
/**
|
|
5692
5722
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5694
5724
|
*/
|
|
5695
5725
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5696
5726
|
/**
|
|
5697
5727
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
|
|
5699
5729
|
*/
|
|
5700
5730
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5701
5731
|
/**
|
|
5702
5732
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5704
5734
|
*/
|
|
5705
5735
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5706
5736
|
/**
|
|
5707
5737
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
|
|
5709
5739
|
*/
|
|
5710
5740
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5711
5741
|
/**
|
|
5712
5742
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
|
|
5714
5744
|
*/
|
|
5715
5745
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5716
5746
|
/**
|
|
5717
5747
|
* Prefer default parameters over reassignment.
|
|
5718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
|
|
5719
5749
|
*/
|
|
5720
5750
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5721
5751
|
/**
|
|
5722
5752
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
|
|
5724
5754
|
*/
|
|
5725
5755
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5726
5756
|
/**
|
|
5727
5757
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5729
5759
|
*/
|
|
5730
5760
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5731
5761
|
/**
|
|
5732
5762
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5734
5764
|
*/
|
|
5735
5765
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5736
5766
|
/**
|
|
5737
5767
|
* Prefer `.textContent` over `.innerText`.
|
|
5738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5739
5769
|
*/
|
|
5740
5770
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5741
5771
|
/**
|
|
5742
5772
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
|
|
5744
5774
|
*/
|
|
5745
5775
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5746
5776
|
/**
|
|
5747
5777
|
* Prefer `export…from` when re-exporting.
|
|
5748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
|
|
5749
5779
|
*/
|
|
5750
5780
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5751
5781
|
/**
|
|
5752
5782
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
|
|
5754
5784
|
*/
|
|
5755
5785
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5756
5786
|
/**
|
|
5757
5787
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5759
5789
|
*/
|
|
5760
5790
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5761
5791
|
/**
|
|
5762
5792
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
|
|
5764
5794
|
*/
|
|
5765
5795
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5766
5796
|
/**
|
|
5767
5797
|
* Prefer reading a JSON file as a buffer.
|
|
5768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5769
5799
|
*/
|
|
5770
5800
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5771
5801
|
/**
|
|
5772
5802
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5774
5804
|
*/
|
|
5775
5805
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5776
5806
|
/**
|
|
5777
5807
|
* Prefer using a logical operator over a ternary.
|
|
5778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5779
5809
|
*/
|
|
5780
5810
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5781
5811
|
/**
|
|
5782
5812
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
|
|
5784
5814
|
*/
|
|
5785
5815
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5786
5816
|
/**
|
|
5787
5817
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
|
|
5789
5819
|
*/
|
|
5790
5820
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5791
5821
|
/**
|
|
5792
5822
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5794
5824
|
*/
|
|
5795
5825
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5796
5826
|
/**
|
|
5797
5827
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5799
5829
|
*/
|
|
5800
5830
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5801
5831
|
/**
|
|
5802
5832
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
|
|
5804
5834
|
*/
|
|
5805
5835
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5806
5836
|
/**
|
|
5807
5837
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5809
5839
|
*/
|
|
5810
5840
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5811
5841
|
/**
|
|
5812
5842
|
* Prefer negative index over `.length - index` when possible.
|
|
5813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
|
|
5814
5844
|
*/
|
|
5815
5845
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5816
5846
|
/**
|
|
5817
5847
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
|
|
5819
5849
|
*/
|
|
5820
5850
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5821
5851
|
/**
|
|
5822
5852
|
* Prefer `Number` static properties over global ones.
|
|
5823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
|
|
5824
5854
|
*/
|
|
5825
5855
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5826
5856
|
/**
|
|
5827
5857
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
|
|
5829
5859
|
*/
|
|
5830
5860
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5831
5861
|
/**
|
|
5832
5862
|
* Prefer omitting the `catch` binding parameter.
|
|
5833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5834
5864
|
*/
|
|
5835
5865
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5836
5866
|
/**
|
|
5837
5867
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
|
|
5839
5869
|
*/
|
|
5840
5870
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5841
5871
|
/**
|
|
5842
5872
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
|
|
5844
5874
|
*/
|
|
5845
5875
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5846
5876
|
/**
|
|
5847
5877
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
|
|
5849
5879
|
*/
|
|
5850
5880
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5851
5881
|
/**
|
|
5852
5882
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
|
|
5854
5884
|
*/
|
|
5855
5885
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5856
5886
|
/**
|
|
5857
5887
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
|
|
5859
5889
|
*/
|
|
5860
5890
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5861
5891
|
/**
|
|
5862
5892
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
|
|
5864
5894
|
*/
|
|
5865
5895
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5866
5896
|
/**
|
|
5867
5897
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
|
|
5869
5899
|
*/
|
|
5870
5900
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5901
|
+
/**
|
|
5902
|
+
* Prefer simple conditions first in logical expressions.
|
|
5903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
|
|
5904
|
+
*/
|
|
5905
|
+
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
5871
5906
|
/**
|
|
5872
5907
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
|
|
5874
5909
|
*/
|
|
5875
5910
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5876
5911
|
/**
|
|
5877
5912
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
|
|
5879
5914
|
*/
|
|
5880
5915
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5881
5916
|
/**
|
|
5882
5917
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
|
|
5884
5919
|
*/
|
|
5885
5920
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5886
5921
|
/**
|
|
5887
5922
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
|
|
5889
5924
|
*/
|
|
5890
5925
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5891
5926
|
/**
|
|
5892
5927
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
|
|
5894
5929
|
*/
|
|
5895
5930
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5896
5931
|
/**
|
|
5897
5932
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5899
5934
|
*/
|
|
5900
5935
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5901
5936
|
/**
|
|
5902
5937
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5904
5939
|
*/
|
|
5905
5940
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5906
5941
|
/**
|
|
5907
5942
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
|
|
5909
5944
|
*/
|
|
5910
5945
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5911
5946
|
/**
|
|
5912
5947
|
* Prefer `switch` over multiple `else-if`.
|
|
5913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
|
|
5914
5949
|
*/
|
|
5915
5950
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5916
5951
|
/**
|
|
5917
5952
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
|
|
5919
5954
|
*/
|
|
5920
5955
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5921
5956
|
/**
|
|
5922
5957
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
|
|
5924
5959
|
*/
|
|
5925
5960
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5926
5961
|
/**
|
|
5927
5962
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5928
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
|
|
5929
5964
|
*/
|
|
5930
5965
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5931
5966
|
/**
|
|
5932
5967
|
* Prevent abbreviations.
|
|
5933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
|
|
5934
5969
|
*/
|
|
5935
5970
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5936
5971
|
/**
|
|
5937
5972
|
* Enforce consistent relative URL style.
|
|
5938
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
|
|
5939
5974
|
*/
|
|
5940
5975
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5941
5976
|
/**
|
|
5942
5977
|
* Enforce using the separator argument with `Array#join()`.
|
|
5943
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
|
|
5944
5979
|
*/
|
|
5945
5980
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5946
5981
|
/**
|
|
5947
5982
|
* Require non-empty module attributes for imports and exports
|
|
5948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
|
|
5949
5984
|
*/
|
|
5950
5985
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5951
5986
|
/**
|
|
5952
5987
|
* Require non-empty specifier list in import and export statements.
|
|
5953
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
|
|
5954
5989
|
*/
|
|
5955
5990
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5956
5991
|
/**
|
|
5957
5992
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5959
5994
|
*/
|
|
5960
5995
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5961
5996
|
/**
|
|
5962
5997
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
|
|
5964
5999
|
*/
|
|
5965
6000
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5966
6001
|
/**
|
|
5967
6002
|
* Enforce better string content.
|
|
5968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
|
|
5969
6004
|
*/
|
|
5970
6005
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5971
6006
|
/**
|
|
5972
6007
|
* Enforce consistent brace style for `case` clauses.
|
|
5973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
|
|
5974
6009
|
*/
|
|
5975
6010
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6011
|
+
/**
|
|
6012
|
+
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
6013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
|
|
6014
|
+
*/
|
|
6015
|
+
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
5976
6016
|
/**
|
|
5977
6017
|
* Fix whitespace-insensitive template indentation.
|
|
5978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
|
|
5979
6019
|
*/
|
|
5980
6020
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5981
6021
|
/**
|
|
5982
6022
|
* Enforce consistent case for text encoding identifiers.
|
|
5983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5984
6024
|
*/
|
|
5985
6025
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5986
6026
|
/**
|
|
5987
6027
|
* Require `new` when creating an error.
|
|
5988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
|
|
5989
6029
|
*/
|
|
5990
6030
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5991
6031
|
/**
|
|
@@ -10955,13 +10995,15 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
|
10955
10995
|
}] | ["never"]) & unknown[]); // ----- markdown/fenced-code-language -----
|
|
10956
10996
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
10957
10997
|
required?: string[];
|
|
10958
|
-
}]; // ----- markdown/
|
|
10998
|
+
}]; // ----- markdown/fenced-code-meta -----
|
|
10999
|
+
type MarkdownFencedCodeMeta = [] | [("always" | "never")]; // ----- markdown/heading-increment -----
|
|
10959
11000
|
type MarkdownHeadingIncrement = [] | [{
|
|
10960
11001
|
frontmatterTitle?: string;
|
|
10961
11002
|
}]; // ----- markdown/no-duplicate-definitions -----
|
|
10962
11003
|
type MarkdownNoDuplicateDefinitions = [] | [{
|
|
10963
11004
|
allowDefinitions?: string[];
|
|
10964
11005
|
allowFootnoteDefinitions?: string[];
|
|
11006
|
+
checkFootnoteDefinitions?: boolean;
|
|
10965
11007
|
}]; // ----- markdown/no-duplicate-headings -----
|
|
10966
11008
|
type MarkdownNoDuplicateHeadings = [] | [{
|
|
10967
11009
|
checkSiblingsOnly?: boolean;
|
|
@@ -10994,6 +11036,7 @@ type MarkdownNoSpaceInEmphasis = [] | [{
|
|
|
10994
11036
|
type MarkdownNoUnusedDefinitions = [] | [{
|
|
10995
11037
|
allowDefinitions?: string[];
|
|
10996
11038
|
allowFootnoteDefinitions?: string[];
|
|
11039
|
+
checkFootnoteDefinitions?: boolean;
|
|
10997
11040
|
}]; // ----- markdown/table-column-count -----
|
|
10998
11041
|
type MarkdownTableColumnCount = [] | [{
|
|
10999
11042
|
checkMissingCells?: boolean;
|
|
@@ -11846,6 +11889,113 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11846
11889
|
pattern: string;
|
|
11847
11890
|
flags?: string;
|
|
11848
11891
|
} | string));
|
|
11892
|
+
matchesAstSelector?: string;
|
|
11893
|
+
};
|
|
11894
|
+
partitionByComment?: (boolean | (({
|
|
11895
|
+
pattern: string;
|
|
11896
|
+
flags?: string;
|
|
11897
|
+
} | string)[] | ({
|
|
11898
|
+
pattern: string;
|
|
11899
|
+
flags?: string;
|
|
11900
|
+
} | string)) | {
|
|
11901
|
+
block?: (boolean | (({
|
|
11902
|
+
pattern: string;
|
|
11903
|
+
flags?: string;
|
|
11904
|
+
} | string)[] | ({
|
|
11905
|
+
pattern: string;
|
|
11906
|
+
flags?: string;
|
|
11907
|
+
} | string)));
|
|
11908
|
+
line?: (boolean | (({
|
|
11909
|
+
pattern: string;
|
|
11910
|
+
flags?: string;
|
|
11911
|
+
} | string)[] | ({
|
|
11912
|
+
pattern: string;
|
|
11913
|
+
flags?: string;
|
|
11914
|
+
} | string)));
|
|
11915
|
+
});
|
|
11916
|
+
partitionByNewLine?: boolean;
|
|
11917
|
+
}[]; // ----- perfectionist/sort-arrays -----
|
|
11918
|
+
type PerfectionistSortArrays = {
|
|
11919
|
+
fallbackSort?: {
|
|
11920
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11921
|
+
order?: ("asc" | "desc");
|
|
11922
|
+
};
|
|
11923
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11924
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
11925
|
+
ignoreCase?: boolean;
|
|
11926
|
+
alphabet?: string;
|
|
11927
|
+
locales?: (string | string[]);
|
|
11928
|
+
order?: ("asc" | "desc");
|
|
11929
|
+
customGroups?: ({
|
|
11930
|
+
fallbackSort?: {
|
|
11931
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11932
|
+
order?: ("asc" | "desc");
|
|
11933
|
+
};
|
|
11934
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11935
|
+
groupName: string;
|
|
11936
|
+
newlinesInside?: ("ignore" | number);
|
|
11937
|
+
order?: ("asc" | "desc");
|
|
11938
|
+
anyOf: [{
|
|
11939
|
+
elementNamePattern?: (({
|
|
11940
|
+
pattern: string;
|
|
11941
|
+
flags?: string;
|
|
11942
|
+
} | string)[] | ({
|
|
11943
|
+
pattern: string;
|
|
11944
|
+
flags?: string;
|
|
11945
|
+
} | string));
|
|
11946
|
+
selector?: "literal";
|
|
11947
|
+
}, ...({
|
|
11948
|
+
elementNamePattern?: (({
|
|
11949
|
+
pattern: string;
|
|
11950
|
+
flags?: string;
|
|
11951
|
+
} | string)[] | ({
|
|
11952
|
+
pattern: string;
|
|
11953
|
+
flags?: string;
|
|
11954
|
+
} | string));
|
|
11955
|
+
selector?: "literal";
|
|
11956
|
+
})[]];
|
|
11957
|
+
} | {
|
|
11958
|
+
fallbackSort?: {
|
|
11959
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11960
|
+
order?: ("asc" | "desc");
|
|
11961
|
+
};
|
|
11962
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11963
|
+
groupName: string;
|
|
11964
|
+
newlinesInside?: ("ignore" | number);
|
|
11965
|
+
order?: ("asc" | "desc");
|
|
11966
|
+
elementNamePattern?: (({
|
|
11967
|
+
pattern: string;
|
|
11968
|
+
flags?: string;
|
|
11969
|
+
} | string)[] | ({
|
|
11970
|
+
pattern: string;
|
|
11971
|
+
flags?: string;
|
|
11972
|
+
} | string));
|
|
11973
|
+
selector?: "literal";
|
|
11974
|
+
})[];
|
|
11975
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
11976
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
11977
|
+
newlinesBetween: ("ignore" | number);
|
|
11978
|
+
} | {
|
|
11979
|
+
group: (string | [string, ...(string)[]]);
|
|
11980
|
+
fallbackSort?: {
|
|
11981
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11982
|
+
order?: ("asc" | "desc");
|
|
11983
|
+
};
|
|
11984
|
+
commentAbove?: string;
|
|
11985
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11986
|
+
newlinesInside?: ("ignore" | number);
|
|
11987
|
+
order?: ("asc" | "desc");
|
|
11988
|
+
})[];
|
|
11989
|
+
newlinesBetween?: ("ignore" | number);
|
|
11990
|
+
useConfigurationIf: {
|
|
11991
|
+
allNamesMatchPattern?: (({
|
|
11992
|
+
pattern: string;
|
|
11993
|
+
flags?: string;
|
|
11994
|
+
} | string)[] | ({
|
|
11995
|
+
pattern: string;
|
|
11996
|
+
flags?: string;
|
|
11997
|
+
} | string));
|
|
11998
|
+
matchesAstSelector?: string;
|
|
11849
11999
|
};
|
|
11850
12000
|
partitionByComment?: (boolean | (({
|
|
11851
12001
|
pattern: string;
|
|
@@ -11871,7 +12021,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11871
12021
|
});
|
|
11872
12022
|
partitionByNewLine?: boolean;
|
|
11873
12023
|
}[]; // ----- perfectionist/sort-classes -----
|
|
11874
|
-
type PerfectionistSortClasses =
|
|
12024
|
+
type PerfectionistSortClasses = {
|
|
11875
12025
|
fallbackSort?: {
|
|
11876
12026
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11877
12027
|
order?: ("asc" | "desc");
|
|
@@ -11988,6 +12138,16 @@ type PerfectionistSortClasses = [] | [{
|
|
|
11988
12138
|
order?: ("asc" | "desc");
|
|
11989
12139
|
})[];
|
|
11990
12140
|
newlinesBetween?: ("ignore" | number);
|
|
12141
|
+
useConfigurationIf?: {
|
|
12142
|
+
allNamesMatchPattern?: (({
|
|
12143
|
+
pattern: string;
|
|
12144
|
+
flags?: string;
|
|
12145
|
+
} | string)[] | ({
|
|
12146
|
+
pattern: string;
|
|
12147
|
+
flags?: string;
|
|
12148
|
+
} | string));
|
|
12149
|
+
matchesAstSelector?: string;
|
|
12150
|
+
};
|
|
11991
12151
|
useExperimentalDependencyDetection?: boolean;
|
|
11992
12152
|
ignoreCallbackDependenciesPatterns?: (({
|
|
11993
12153
|
pattern: string;
|
|
@@ -12019,7 +12179,7 @@ type PerfectionistSortClasses = [] | [{
|
|
|
12019
12179
|
} | string)));
|
|
12020
12180
|
});
|
|
12021
12181
|
partitionByNewLine?: boolean;
|
|
12022
|
-
}]; // ----- perfectionist/sort-decorators -----
|
|
12182
|
+
}[]; // ----- perfectionist/sort-decorators -----
|
|
12023
12183
|
type PerfectionistSortDecorators = {
|
|
12024
12184
|
fallbackSort?: {
|
|
12025
12185
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
@@ -12118,7 +12278,7 @@ type PerfectionistSortDecorators = {
|
|
|
12118
12278
|
});
|
|
12119
12279
|
partitionByNewLine?: boolean;
|
|
12120
12280
|
}[]; // ----- perfectionist/sort-enums -----
|
|
12121
|
-
type PerfectionistSortEnums =
|
|
12281
|
+
type PerfectionistSortEnums = {
|
|
12122
12282
|
fallbackSort?: {
|
|
12123
12283
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12124
12284
|
order?: ("asc" | "desc");
|
|
@@ -12208,6 +12368,16 @@ type PerfectionistSortEnums = [] | [{
|
|
|
12208
12368
|
order?: ("asc" | "desc");
|
|
12209
12369
|
})[];
|
|
12210
12370
|
newlinesBetween?: ("ignore" | number);
|
|
12371
|
+
useConfigurationIf?: {
|
|
12372
|
+
allNamesMatchPattern?: (({
|
|
12373
|
+
pattern: string;
|
|
12374
|
+
flags?: string;
|
|
12375
|
+
} | string)[] | ({
|
|
12376
|
+
pattern: string;
|
|
12377
|
+
flags?: string;
|
|
12378
|
+
} | string));
|
|
12379
|
+
matchesAstSelector?: string;
|
|
12380
|
+
};
|
|
12211
12381
|
sortByValue?: ("always" | "ifNumericEnum" | "never");
|
|
12212
12382
|
useExperimentalDependencyDetection?: boolean;
|
|
12213
12383
|
partitionByComment?: (boolean | (({
|
|
@@ -12233,7 +12403,7 @@ type PerfectionistSortEnums = [] | [{
|
|
|
12233
12403
|
} | string)));
|
|
12234
12404
|
});
|
|
12235
12405
|
partitionByNewLine?: boolean;
|
|
12236
|
-
}]; // ----- perfectionist/sort-export-attributes -----
|
|
12406
|
+
}[]; // ----- perfectionist/sort-export-attributes -----
|
|
12237
12407
|
type PerfectionistSortExportAttributes = {
|
|
12238
12408
|
fallbackSort?: {
|
|
12239
12409
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
@@ -12303,6 +12473,16 @@ type PerfectionistSortExportAttributes = {
|
|
|
12303
12473
|
order?: ("asc" | "desc");
|
|
12304
12474
|
})[];
|
|
12305
12475
|
newlinesBetween?: ("ignore" | number);
|
|
12476
|
+
useConfigurationIf?: {
|
|
12477
|
+
allNamesMatchPattern?: (({
|
|
12478
|
+
pattern: string;
|
|
12479
|
+
flags?: string;
|
|
12480
|
+
} | string)[] | ({
|
|
12481
|
+
pattern: string;
|
|
12482
|
+
flags?: string;
|
|
12483
|
+
} | string));
|
|
12484
|
+
matchesAstSelector?: string;
|
|
12485
|
+
};
|
|
12306
12486
|
partitionByComment?: (boolean | (({
|
|
12307
12487
|
pattern: string;
|
|
12308
12488
|
flags?: string;
|
|
@@ -12495,6 +12675,16 @@ type PerfectionistSortHeritageClauses = {
|
|
|
12495
12675
|
order?: ("asc" | "desc");
|
|
12496
12676
|
})[];
|
|
12497
12677
|
newlinesBetween?: ("ignore" | number);
|
|
12678
|
+
useConfigurationIf?: {
|
|
12679
|
+
allNamesMatchPattern?: (({
|
|
12680
|
+
pattern: string;
|
|
12681
|
+
flags?: string;
|
|
12682
|
+
} | string)[] | ({
|
|
12683
|
+
pattern: string;
|
|
12684
|
+
flags?: string;
|
|
12685
|
+
} | string));
|
|
12686
|
+
matchesAstSelector?: string;
|
|
12687
|
+
};
|
|
12498
12688
|
partitionByNewLine?: boolean;
|
|
12499
12689
|
partitionByComment?: (boolean | (({
|
|
12500
12690
|
pattern: string;
|
|
@@ -12588,6 +12778,16 @@ type PerfectionistSortImportAttributes = {
|
|
|
12588
12778
|
order?: ("asc" | "desc");
|
|
12589
12779
|
})[];
|
|
12590
12780
|
newlinesBetween?: ("ignore" | number);
|
|
12781
|
+
useConfigurationIf?: {
|
|
12782
|
+
allNamesMatchPattern?: (({
|
|
12783
|
+
pattern: string;
|
|
12784
|
+
flags?: string;
|
|
12785
|
+
} | string)[] | ({
|
|
12786
|
+
pattern: string;
|
|
12787
|
+
flags?: string;
|
|
12788
|
+
} | string));
|
|
12789
|
+
matchesAstSelector?: string;
|
|
12790
|
+
};
|
|
12591
12791
|
partitionByComment?: (boolean | (({
|
|
12592
12792
|
pattern: string;
|
|
12593
12793
|
flags?: string;
|
|
@@ -12856,6 +13056,7 @@ type PerfectionistSortInterfaces = {
|
|
|
12856
13056
|
pattern: string;
|
|
12857
13057
|
flags?: string;
|
|
12858
13058
|
} | string));
|
|
13059
|
+
matchesAstSelector?: string;
|
|
12859
13060
|
declarationMatchesPattern?: (({
|
|
12860
13061
|
scope?: ("shallow" | "deep");
|
|
12861
13062
|
pattern: string;
|
|
@@ -12962,6 +13163,16 @@ type PerfectionistSortIntersectionTypes = {
|
|
|
12962
13163
|
order?: ("asc" | "desc");
|
|
12963
13164
|
})[];
|
|
12964
13165
|
newlinesBetween?: ("ignore" | number);
|
|
13166
|
+
useConfigurationIf?: {
|
|
13167
|
+
allNamesMatchPattern?: (({
|
|
13168
|
+
pattern: string;
|
|
13169
|
+
flags?: string;
|
|
13170
|
+
} | string)[] | ({
|
|
13171
|
+
pattern: string;
|
|
13172
|
+
flags?: string;
|
|
13173
|
+
} | string));
|
|
13174
|
+
matchesAstSelector?: string;
|
|
13175
|
+
};
|
|
12965
13176
|
partitionByComment?: (boolean | (({
|
|
12966
13177
|
pattern: string;
|
|
12967
13178
|
flags?: string;
|
|
@@ -13090,6 +13301,7 @@ type PerfectionistSortJsxProps = {
|
|
|
13090
13301
|
pattern: string;
|
|
13091
13302
|
flags?: string;
|
|
13092
13303
|
} | string));
|
|
13304
|
+
matchesAstSelector?: string;
|
|
13093
13305
|
tagMatchesPattern?: (({
|
|
13094
13306
|
pattern: string;
|
|
13095
13307
|
flags?: string;
|
|
@@ -13177,6 +13389,7 @@ type PerfectionistSortMaps = {
|
|
|
13177
13389
|
pattern: string;
|
|
13178
13390
|
flags?: string;
|
|
13179
13391
|
} | string));
|
|
13392
|
+
matchesAstSelector?: string;
|
|
13180
13393
|
};
|
|
13181
13394
|
partitionByComment?: (boolean | (({
|
|
13182
13395
|
pattern: string;
|
|
@@ -13398,6 +13611,16 @@ type PerfectionistSortNamedExports = {
|
|
|
13398
13611
|
order?: ("asc" | "desc");
|
|
13399
13612
|
})[];
|
|
13400
13613
|
newlinesBetween?: ("ignore" | number);
|
|
13614
|
+
useConfigurationIf?: {
|
|
13615
|
+
allNamesMatchPattern?: (({
|
|
13616
|
+
pattern: string;
|
|
13617
|
+
flags?: string;
|
|
13618
|
+
} | string)[] | ({
|
|
13619
|
+
pattern: string;
|
|
13620
|
+
flags?: string;
|
|
13621
|
+
} | string));
|
|
13622
|
+
matchesAstSelector?: string;
|
|
13623
|
+
};
|
|
13401
13624
|
ignoreAlias?: boolean;
|
|
13402
13625
|
partitionByComment?: (boolean | (({
|
|
13403
13626
|
pattern: string;
|
|
@@ -13498,6 +13721,16 @@ type PerfectionistSortNamedImports = {
|
|
|
13498
13721
|
order?: ("asc" | "desc");
|
|
13499
13722
|
})[];
|
|
13500
13723
|
newlinesBetween?: ("ignore" | number);
|
|
13724
|
+
useConfigurationIf?: {
|
|
13725
|
+
allNamesMatchPattern?: (({
|
|
13726
|
+
pattern: string;
|
|
13727
|
+
flags?: string;
|
|
13728
|
+
} | string)[] | ({
|
|
13729
|
+
pattern: string;
|
|
13730
|
+
flags?: string;
|
|
13731
|
+
} | string));
|
|
13732
|
+
matchesAstSelector?: string;
|
|
13733
|
+
};
|
|
13501
13734
|
ignoreAlias?: boolean;
|
|
13502
13735
|
partitionByComment?: (boolean | (({
|
|
13503
13736
|
pattern: string;
|
|
@@ -13645,6 +13878,7 @@ type PerfectionistSortObjectTypes = {
|
|
|
13645
13878
|
pattern: string;
|
|
13646
13879
|
flags?: string;
|
|
13647
13880
|
} | string));
|
|
13881
|
+
matchesAstSelector?: string;
|
|
13648
13882
|
declarationMatchesPattern?: (({
|
|
13649
13883
|
scope?: ("shallow" | "deep");
|
|
13650
13884
|
pattern: string;
|
|
@@ -13811,6 +14045,7 @@ type PerfectionistSortObjects = {
|
|
|
13811
14045
|
pattern: string;
|
|
13812
14046
|
flags?: string;
|
|
13813
14047
|
} | string));
|
|
14048
|
+
matchesAstSelector?: string;
|
|
13814
14049
|
declarationMatchesPattern?: (({
|
|
13815
14050
|
scope?: ("shallow" | "deep");
|
|
13816
14051
|
pattern: string;
|
|
@@ -13821,6 +14056,7 @@ type PerfectionistSortObjects = {
|
|
|
13821
14056
|
flags?: string;
|
|
13822
14057
|
} | string));
|
|
13823
14058
|
};
|
|
14059
|
+
partitionByComputedKey?: boolean;
|
|
13824
14060
|
styledComponents?: boolean;
|
|
13825
14061
|
useExperimentalDependencyDetection?: boolean;
|
|
13826
14062
|
partitionByComment?: (boolean | (({
|
|
@@ -13927,6 +14163,7 @@ type PerfectionistSortSets = {
|
|
|
13927
14163
|
pattern: string;
|
|
13928
14164
|
flags?: string;
|
|
13929
14165
|
} | string));
|
|
14166
|
+
matchesAstSelector?: string;
|
|
13930
14167
|
};
|
|
13931
14168
|
partitionByComment?: (boolean | (({
|
|
13932
14169
|
pattern: string;
|
|
@@ -14036,6 +14273,16 @@ type PerfectionistSortUnionTypes = {
|
|
|
14036
14273
|
order?: ("asc" | "desc");
|
|
14037
14274
|
})[];
|
|
14038
14275
|
newlinesBetween?: ("ignore" | number);
|
|
14276
|
+
useConfigurationIf?: {
|
|
14277
|
+
allNamesMatchPattern?: (({
|
|
14278
|
+
pattern: string;
|
|
14279
|
+
flags?: string;
|
|
14280
|
+
} | string)[] | ({
|
|
14281
|
+
pattern: string;
|
|
14282
|
+
flags?: string;
|
|
14283
|
+
} | string));
|
|
14284
|
+
matchesAstSelector?: string;
|
|
14285
|
+
};
|
|
14039
14286
|
partitionByComment?: (boolean | (({
|
|
14040
14287
|
pattern: string;
|
|
14041
14288
|
flags?: string;
|
|
@@ -14060,7 +14307,7 @@ type PerfectionistSortUnionTypes = {
|
|
|
14060
14307
|
});
|
|
14061
14308
|
partitionByNewLine?: boolean;
|
|
14062
14309
|
}[]; // ----- perfectionist/sort-variable-declarations -----
|
|
14063
|
-
type PerfectionistSortVariableDeclarations =
|
|
14310
|
+
type PerfectionistSortVariableDeclarations = {
|
|
14064
14311
|
fallbackSort?: {
|
|
14065
14312
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14066
14313
|
order?: ("asc" | "desc");
|
|
@@ -14132,6 +14379,16 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
14132
14379
|
order?: ("asc" | "desc");
|
|
14133
14380
|
})[];
|
|
14134
14381
|
newlinesBetween?: ("ignore" | number);
|
|
14382
|
+
useConfigurationIf?: {
|
|
14383
|
+
allNamesMatchPattern?: (({
|
|
14384
|
+
pattern: string;
|
|
14385
|
+
flags?: string;
|
|
14386
|
+
} | string)[] | ({
|
|
14387
|
+
pattern: string;
|
|
14388
|
+
flags?: string;
|
|
14389
|
+
} | string));
|
|
14390
|
+
matchesAstSelector?: string;
|
|
14391
|
+
};
|
|
14135
14392
|
useExperimentalDependencyDetection?: boolean;
|
|
14136
14393
|
partitionByComment?: (boolean | (({
|
|
14137
14394
|
pattern: string;
|
|
@@ -14156,7 +14413,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
14156
14413
|
} | string)));
|
|
14157
14414
|
});
|
|
14158
14415
|
partitionByNewLine?: boolean;
|
|
14159
|
-
}]; // ----- pnpm/json-enforce-catalog -----
|
|
14416
|
+
}[]; // ----- pnpm/json-enforce-catalog -----
|
|
14160
14417
|
type PnpmJsonEnforceCatalog = [] | [{
|
|
14161
14418
|
allowedProtocols?: string[];
|
|
14162
14419
|
autofix?: boolean;
|
|
@@ -14498,6 +14755,9 @@ type TestRequireMockTypeParameters = [] | [{
|
|
|
14498
14755
|
}]; // ----- test/require-top-level-describe -----
|
|
14499
14756
|
type TestRequireTopLevelDescribe = [] | [{
|
|
14500
14757
|
maxNumberOfTopLevelDescribes?: number;
|
|
14758
|
+
}]; // ----- test/unbound-method -----
|
|
14759
|
+
type TestUnboundMethod = [] | [{
|
|
14760
|
+
ignoreStatic?: boolean;
|
|
14501
14761
|
}]; // ----- test/valid-expect -----
|
|
14502
14762
|
type TestValidExpect = [] | [{
|
|
14503
14763
|
alwaysAwait?: boolean;
|
|
@@ -14647,6 +14907,7 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/ex
|
|
|
14647
14907
|
type UnicornExpiringTodoComments = [] | [{
|
|
14648
14908
|
terms?: string[];
|
|
14649
14909
|
ignore?: unknown[];
|
|
14910
|
+
ignoreDates?: boolean;
|
|
14650
14911
|
ignoreDatesOnPullRequests?: boolean;
|
|
14651
14912
|
allowWarningComments?: boolean;
|
|
14652
14913
|
date?: string;
|
|
@@ -14803,6 +15064,9 @@ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbrevia
|
|
|
14803
15064
|
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
14804
15065
|
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
14805
15066
|
}
|
|
15067
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
15068
|
+
[k: string]: boolean | undefined;
|
|
15069
|
+
}
|
|
14806
15070
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14807
15071
|
[k: string]: boolean | undefined;
|
|
14808
15072
|
} // ----- unicorn/relative-url-style -----
|