@jimmy.codes/eslint-config 3.2.4 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1002 -2
- package/dist/index.d.mts +1002 -2
- package/dist/index.mjs +1 -1
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -15,6 +15,51 @@ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
interface RuleOptions {
|
|
18
|
+
/**
|
|
19
|
+
* require a `eslint-enable` comment for every `eslint-disable` comment
|
|
20
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
|
|
21
|
+
*/
|
|
22
|
+
'@eslint-community/eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommunityEslintCommentsDisableEnablePair>
|
|
23
|
+
/**
|
|
24
|
+
* disallow a `eslint-enable` comment for multiple `eslint-disable` comments
|
|
25
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
|
|
26
|
+
*/
|
|
27
|
+
'@eslint-community/eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]>
|
|
28
|
+
/**
|
|
29
|
+
* disallow duplicate `eslint-disable` comments
|
|
30
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
|
|
31
|
+
*/
|
|
32
|
+
'@eslint-community/eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]>
|
|
33
|
+
/**
|
|
34
|
+
* disallow `eslint-disable` comments about specific rules
|
|
35
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
|
|
36
|
+
*/
|
|
37
|
+
'@eslint-community/eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommunityEslintCommentsNoRestrictedDisable>
|
|
38
|
+
/**
|
|
39
|
+
* disallow `eslint-disable` comments without rule names
|
|
40
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
|
|
41
|
+
*/
|
|
42
|
+
'@eslint-community/eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]>
|
|
43
|
+
/**
|
|
44
|
+
* disallow unused `eslint-disable` comments
|
|
45
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
|
|
46
|
+
*/
|
|
47
|
+
'@eslint-community/eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>
|
|
48
|
+
/**
|
|
49
|
+
* disallow unused `eslint-enable` comments
|
|
50
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
|
|
51
|
+
*/
|
|
52
|
+
'@eslint-community/eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]>
|
|
53
|
+
/**
|
|
54
|
+
* disallow ESLint directive-comments
|
|
55
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html
|
|
56
|
+
*/
|
|
57
|
+
'@eslint-community/eslint-comments/no-use'?: Linter.RuleEntry<EslintCommunityEslintCommentsNoUse>
|
|
58
|
+
/**
|
|
59
|
+
* require include descriptions in ESLint directive-comments
|
|
60
|
+
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
|
|
61
|
+
*/
|
|
62
|
+
'@eslint-community/eslint-comments/require-description'?: Linter.RuleEntry<EslintCommunityEslintCommentsRequireDescription>
|
|
18
63
|
/**
|
|
19
64
|
* Exhaustive deps rule for useQuery
|
|
20
65
|
* @see https://tanstack.com/query/latest/docs/eslint/exhaustive-deps
|
|
@@ -4213,6 +4258,706 @@ interface RuleOptions {
|
|
|
4213
4258
|
* @see https://eslint.org/docs/latest/rules/unicode-bom
|
|
4214
4259
|
*/
|
|
4215
4260
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
4261
|
+
/**
|
|
4262
|
+
* Improve regexes by making them shorter, consistent, and safer.
|
|
4263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/better-regex.md
|
|
4264
|
+
*/
|
|
4265
|
+
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
4266
|
+
/**
|
|
4267
|
+
* Enforce a specific parameter name in catch clauses.
|
|
4268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/catch-error-name.md
|
|
4269
|
+
*/
|
|
4270
|
+
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
4271
|
+
/**
|
|
4272
|
+
* Use destructured variables over properties.
|
|
4273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-destructuring.md
|
|
4274
|
+
*/
|
|
4275
|
+
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
4276
|
+
/**
|
|
4277
|
+
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4279
|
+
*/
|
|
4280
|
+
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
4281
|
+
/**
|
|
4282
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-existence-index-check.md
|
|
4284
|
+
*/
|
|
4285
|
+
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
4286
|
+
/**
|
|
4287
|
+
* Move function definitions to the highest possible scope.
|
|
4288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-function-scoping.md
|
|
4289
|
+
*/
|
|
4290
|
+
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
4291
|
+
/**
|
|
4292
|
+
* Enforce correct `Error` subclassing.
|
|
4293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/custom-error-definition.md
|
|
4294
|
+
*/
|
|
4295
|
+
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
4296
|
+
/**
|
|
4297
|
+
* Enforce no spaces between braces.
|
|
4298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/empty-brace-spaces.md
|
|
4299
|
+
*/
|
|
4300
|
+
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
4301
|
+
/**
|
|
4302
|
+
* Enforce passing a `message` value when creating a built-in error.
|
|
4303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/error-message.md
|
|
4304
|
+
*/
|
|
4305
|
+
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
4306
|
+
/**
|
|
4307
|
+
* Require escape sequences to use uppercase values.
|
|
4308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/escape-case.md
|
|
4309
|
+
*/
|
|
4310
|
+
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
4311
|
+
/**
|
|
4312
|
+
* Add expiration conditions to TODO comments.
|
|
4313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/expiring-todo-comments.md
|
|
4314
|
+
*/
|
|
4315
|
+
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
4316
|
+
/**
|
|
4317
|
+
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/explicit-length-check.md
|
|
4319
|
+
*/
|
|
4320
|
+
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
4321
|
+
/**
|
|
4322
|
+
* Enforce a case style for filenames.
|
|
4323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/filename-case.md
|
|
4324
|
+
*/
|
|
4325
|
+
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
4326
|
+
/**
|
|
4327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#import-index
|
|
4328
|
+
* @deprecated
|
|
4329
|
+
*/
|
|
4330
|
+
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
4331
|
+
/**
|
|
4332
|
+
* Enforce specific import styles per module.
|
|
4333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/import-style.md
|
|
4334
|
+
*/
|
|
4335
|
+
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
4336
|
+
/**
|
|
4337
|
+
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
4338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/new-for-builtins.md
|
|
4339
|
+
*/
|
|
4340
|
+
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
4341
|
+
/**
|
|
4342
|
+
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4344
|
+
*/
|
|
4345
|
+
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
4346
|
+
/**
|
|
4347
|
+
* Disallow anonymous functions and classes as the default export.
|
|
4348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-anonymous-default-export.md
|
|
4349
|
+
*/
|
|
4350
|
+
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
4351
|
+
/**
|
|
4352
|
+
* Prevent passing a function reference directly to iterator methods.
|
|
4353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-callback-reference.md
|
|
4354
|
+
*/
|
|
4355
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
4356
|
+
/**
|
|
4357
|
+
* Prefer `for…of` over the `forEach` method.
|
|
4358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-for-each.md
|
|
4359
|
+
*/
|
|
4360
|
+
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
4361
|
+
/**
|
|
4362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
4363
|
+
* @deprecated
|
|
4364
|
+
*/
|
|
4365
|
+
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
4366
|
+
/**
|
|
4367
|
+
* Disallow using the `this` argument in array methods.
|
|
4368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-method-this-argument.md
|
|
4369
|
+
*/
|
|
4370
|
+
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
4371
|
+
/**
|
|
4372
|
+
* Enforce combining multiple `Array#push()` into one call.
|
|
4373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-push-push.md
|
|
4374
|
+
*/
|
|
4375
|
+
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
4376
|
+
/**
|
|
4377
|
+
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-reduce.md
|
|
4379
|
+
*/
|
|
4380
|
+
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
4381
|
+
/**
|
|
4382
|
+
* Disallow member access from await expression.
|
|
4383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-expression-member.md
|
|
4384
|
+
*/
|
|
4385
|
+
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
4386
|
+
/**
|
|
4387
|
+
* Disallow using `await` in `Promise` method parameters.
|
|
4388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4389
|
+
*/
|
|
4390
|
+
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
4391
|
+
/**
|
|
4392
|
+
* Do not use leading/trailing space between `console.log` parameters.
|
|
4393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-console-spaces.md
|
|
4394
|
+
*/
|
|
4395
|
+
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
4396
|
+
/**
|
|
4397
|
+
* Do not use `document.cookie` directly.
|
|
4398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-document-cookie.md
|
|
4399
|
+
*/
|
|
4400
|
+
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
4401
|
+
/**
|
|
4402
|
+
* Disallow empty files.
|
|
4403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-empty-file.md
|
|
4404
|
+
*/
|
|
4405
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
4406
|
+
/**
|
|
4407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
4408
|
+
* @deprecated
|
|
4409
|
+
*/
|
|
4410
|
+
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
4411
|
+
/**
|
|
4412
|
+
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-for-loop.md
|
|
4414
|
+
*/
|
|
4415
|
+
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
4416
|
+
/**
|
|
4417
|
+
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-hex-escape.md
|
|
4419
|
+
*/
|
|
4420
|
+
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
4421
|
+
/**
|
|
4422
|
+
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
4423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-instanceof-array.md
|
|
4424
|
+
*/
|
|
4425
|
+
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
4426
|
+
/**
|
|
4427
|
+
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4429
|
+
*/
|
|
4430
|
+
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
4431
|
+
/**
|
|
4432
|
+
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4434
|
+
*/
|
|
4435
|
+
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
4436
|
+
/**
|
|
4437
|
+
* Disallow identifiers starting with `new` or `class`.
|
|
4438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-keyword-prefix.md
|
|
4439
|
+
*/
|
|
4440
|
+
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
4441
|
+
/**
|
|
4442
|
+
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-length-as-slice-end.md
|
|
4444
|
+
*/
|
|
4445
|
+
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
4446
|
+
/**
|
|
4447
|
+
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-lonely-if.md
|
|
4449
|
+
*/
|
|
4450
|
+
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
4451
|
+
/**
|
|
4452
|
+
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4454
|
+
*/
|
|
4455
|
+
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
4456
|
+
/**
|
|
4457
|
+
* Disallow negated conditions.
|
|
4458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negated-condition.md
|
|
4459
|
+
*/
|
|
4460
|
+
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
4461
|
+
/**
|
|
4462
|
+
* Disallow negated expression in equality check.
|
|
4463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4464
|
+
*/
|
|
4465
|
+
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
4466
|
+
/**
|
|
4467
|
+
* Disallow nested ternary expressions.
|
|
4468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-nested-ternary.md
|
|
4469
|
+
*/
|
|
4470
|
+
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
4471
|
+
/**
|
|
4472
|
+
* Disallow `new Array()`.
|
|
4473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-array.md
|
|
4474
|
+
*/
|
|
4475
|
+
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
4476
|
+
/**
|
|
4477
|
+
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-buffer.md
|
|
4479
|
+
*/
|
|
4480
|
+
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
4481
|
+
/**
|
|
4482
|
+
* Disallow the use of the `null` literal.
|
|
4483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-null.md
|
|
4484
|
+
*/
|
|
4485
|
+
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
4486
|
+
/**
|
|
4487
|
+
* Disallow the use of objects as default parameters.
|
|
4488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4489
|
+
*/
|
|
4490
|
+
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
4491
|
+
/**
|
|
4492
|
+
* Disallow `process.exit()`.
|
|
4493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-process-exit.md
|
|
4494
|
+
*/
|
|
4495
|
+
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
4496
|
+
/**
|
|
4497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-reduce
|
|
4498
|
+
* @deprecated
|
|
4499
|
+
*/
|
|
4500
|
+
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
4501
|
+
/**
|
|
4502
|
+
* Disallow passing single-element arrays to `Promise` methods.
|
|
4503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4504
|
+
*/
|
|
4505
|
+
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
4506
|
+
/**
|
|
4507
|
+
* Disallow classes that only have static members.
|
|
4508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-static-only-class.md
|
|
4509
|
+
*/
|
|
4510
|
+
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
4511
|
+
/**
|
|
4512
|
+
* Disallow `then` property.
|
|
4513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-thenable.md
|
|
4514
|
+
*/
|
|
4515
|
+
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
4516
|
+
/**
|
|
4517
|
+
* Disallow assigning `this` to a variable.
|
|
4518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-this-assignment.md
|
|
4519
|
+
*/
|
|
4520
|
+
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
4521
|
+
/**
|
|
4522
|
+
* Disallow comparing `undefined` using `typeof`.
|
|
4523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-typeof-undefined.md
|
|
4524
|
+
*/
|
|
4525
|
+
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
4526
|
+
/**
|
|
4527
|
+
* Disallow awaiting non-promise values.
|
|
4528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-await.md
|
|
4529
|
+
*/
|
|
4530
|
+
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
4531
|
+
/**
|
|
4532
|
+
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4534
|
+
*/
|
|
4535
|
+
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
4536
|
+
/**
|
|
4537
|
+
* Disallow unreadable array destructuring.
|
|
4538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4539
|
+
*/
|
|
4540
|
+
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
4541
|
+
/**
|
|
4542
|
+
* Disallow unreadable IIFEs.
|
|
4543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-iife.md
|
|
4544
|
+
*/
|
|
4545
|
+
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
4546
|
+
/**
|
|
4547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
4548
|
+
* @deprecated
|
|
4549
|
+
*/
|
|
4550
|
+
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
4551
|
+
/**
|
|
4552
|
+
* Disallow unused object properties.
|
|
4553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unused-properties.md
|
|
4554
|
+
*/
|
|
4555
|
+
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
4556
|
+
/**
|
|
4557
|
+
* Disallow useless fallback when spreading in object literals.
|
|
4558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
4559
|
+
*/
|
|
4560
|
+
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
4561
|
+
/**
|
|
4562
|
+
* Disallow useless array length check.
|
|
4563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-length-check.md
|
|
4564
|
+
*/
|
|
4565
|
+
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
4566
|
+
/**
|
|
4567
|
+
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
4568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
4569
|
+
*/
|
|
4570
|
+
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
4571
|
+
/**
|
|
4572
|
+
* Disallow unnecessary spread.
|
|
4573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-spread.md
|
|
4574
|
+
*/
|
|
4575
|
+
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
4576
|
+
/**
|
|
4577
|
+
* Disallow useless case in switch statements.
|
|
4578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-switch-case.md
|
|
4579
|
+
*/
|
|
4580
|
+
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
4581
|
+
/**
|
|
4582
|
+
* Disallow useless `undefined`.
|
|
4583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-undefined.md
|
|
4584
|
+
*/
|
|
4585
|
+
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
4586
|
+
/**
|
|
4587
|
+
* Disallow number literals with zero fractions or dangling dots.
|
|
4588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-zero-fractions.md
|
|
4589
|
+
*/
|
|
4590
|
+
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
4591
|
+
/**
|
|
4592
|
+
* Enforce proper case for numeric literals.
|
|
4593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/number-literal-case.md
|
|
4594
|
+
*/
|
|
4595
|
+
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
4596
|
+
/**
|
|
4597
|
+
* Enforce the style of numeric separators by correctly grouping digits.
|
|
4598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/numeric-separators-style.md
|
|
4599
|
+
*/
|
|
4600
|
+
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
4601
|
+
/**
|
|
4602
|
+
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
4603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-add-event-listener.md
|
|
4604
|
+
*/
|
|
4605
|
+
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
4606
|
+
/**
|
|
4607
|
+
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
4608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-find.md
|
|
4609
|
+
*/
|
|
4610
|
+
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
4611
|
+
/**
|
|
4612
|
+
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
4613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat.md
|
|
4614
|
+
*/
|
|
4615
|
+
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
4616
|
+
/**
|
|
4617
|
+
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
4618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat-map.md
|
|
4619
|
+
*/
|
|
4620
|
+
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
4621
|
+
/**
|
|
4622
|
+
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
4623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-index-of.md
|
|
4624
|
+
*/
|
|
4625
|
+
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
4626
|
+
/**
|
|
4627
|
+
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
4628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-some.md
|
|
4629
|
+
*/
|
|
4630
|
+
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
4631
|
+
/**
|
|
4632
|
+
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
4633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-at.md
|
|
4634
|
+
*/
|
|
4635
|
+
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
4636
|
+
/**
|
|
4637
|
+
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
4638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
4639
|
+
*/
|
|
4640
|
+
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
4641
|
+
/**
|
|
4642
|
+
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
4643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-code-point.md
|
|
4644
|
+
*/
|
|
4645
|
+
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
4646
|
+
/**
|
|
4647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
4648
|
+
* @deprecated
|
|
4649
|
+
*/
|
|
4650
|
+
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
4651
|
+
/**
|
|
4652
|
+
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-date-now.md
|
|
4654
|
+
*/
|
|
4655
|
+
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
4656
|
+
/**
|
|
4657
|
+
* Prefer default parameters over reassignment.
|
|
4658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-default-parameters.md
|
|
4659
|
+
*/
|
|
4660
|
+
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
4661
|
+
/**
|
|
4662
|
+
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-append.md
|
|
4664
|
+
*/
|
|
4665
|
+
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
4666
|
+
/**
|
|
4667
|
+
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
4669
|
+
*/
|
|
4670
|
+
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
4671
|
+
/**
|
|
4672
|
+
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4674
|
+
*/
|
|
4675
|
+
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
4676
|
+
/**
|
|
4677
|
+
* Prefer `.textContent` over `.innerText`.
|
|
4678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4679
|
+
*/
|
|
4680
|
+
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
4681
|
+
/**
|
|
4682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
4683
|
+
* @deprecated
|
|
4684
|
+
*/
|
|
4685
|
+
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
4686
|
+
/**
|
|
4687
|
+
* Prefer `EventTarget` over `EventEmitter`.
|
|
4688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-event-target.md
|
|
4689
|
+
*/
|
|
4690
|
+
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
4691
|
+
/**
|
|
4692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
4693
|
+
* @deprecated
|
|
4694
|
+
*/
|
|
4695
|
+
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
4696
|
+
/**
|
|
4697
|
+
* Prefer `export…from` when re-exporting.
|
|
4698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-export-from.md
|
|
4699
|
+
*/
|
|
4700
|
+
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
4701
|
+
/**
|
|
4702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
4703
|
+
* @deprecated
|
|
4704
|
+
*/
|
|
4705
|
+
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
4706
|
+
/**
|
|
4707
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-global-this.md
|
|
4709
|
+
*/
|
|
4710
|
+
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
4711
|
+
/**
|
|
4712
|
+
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-includes.md
|
|
4714
|
+
*/
|
|
4715
|
+
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
4716
|
+
/**
|
|
4717
|
+
* Prefer reading a JSON file as a buffer.
|
|
4718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
4719
|
+
*/
|
|
4720
|
+
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
4721
|
+
/**
|
|
4722
|
+
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4724
|
+
*/
|
|
4725
|
+
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
4726
|
+
/**
|
|
4727
|
+
* Prefer using a logical operator over a ternary.
|
|
4728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4729
|
+
*/
|
|
4730
|
+
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
4731
|
+
/**
|
|
4732
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-min-max.md
|
|
4734
|
+
*/
|
|
4735
|
+
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
4736
|
+
/**
|
|
4737
|
+
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-trunc.md
|
|
4739
|
+
*/
|
|
4740
|
+
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
4741
|
+
/**
|
|
4742
|
+
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4744
|
+
*/
|
|
4745
|
+
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
4746
|
+
/**
|
|
4747
|
+
* Prefer modern `Math` APIs over legacy patterns.
|
|
4748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4749
|
+
*/
|
|
4750
|
+
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
4751
|
+
/**
|
|
4752
|
+
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-module.md
|
|
4754
|
+
*/
|
|
4755
|
+
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
4756
|
+
/**
|
|
4757
|
+
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4759
|
+
*/
|
|
4760
|
+
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
4761
|
+
/**
|
|
4762
|
+
* Prefer negative index over `.length - index` when possible.
|
|
4763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-negative-index.md
|
|
4764
|
+
*/
|
|
4765
|
+
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
4766
|
+
/**
|
|
4767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
4768
|
+
* @deprecated
|
|
4769
|
+
*/
|
|
4770
|
+
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
4771
|
+
/**
|
|
4772
|
+
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-node-protocol.md
|
|
4774
|
+
*/
|
|
4775
|
+
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
4776
|
+
/**
|
|
4777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
4778
|
+
* @deprecated
|
|
4779
|
+
*/
|
|
4780
|
+
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
4781
|
+
/**
|
|
4782
|
+
* Prefer `Number` static properties over global ones.
|
|
4783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-number-properties.md
|
|
4784
|
+
*/
|
|
4785
|
+
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
4786
|
+
/**
|
|
4787
|
+
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-object-from-entries.md
|
|
4789
|
+
*/
|
|
4790
|
+
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
4791
|
+
/**
|
|
4792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
4793
|
+
* @deprecated
|
|
4794
|
+
*/
|
|
4795
|
+
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
4796
|
+
/**
|
|
4797
|
+
* Prefer omitting the `catch` binding parameter.
|
|
4798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4799
|
+
*/
|
|
4800
|
+
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
4801
|
+
/**
|
|
4802
|
+
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-prototype-methods.md
|
|
4804
|
+
*/
|
|
4805
|
+
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
4806
|
+
/**
|
|
4807
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-query-selector.md
|
|
4809
|
+
*/
|
|
4810
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
4811
|
+
/**
|
|
4812
|
+
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-reflect-apply.md
|
|
4814
|
+
*/
|
|
4815
|
+
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
4816
|
+
/**
|
|
4817
|
+
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-regexp-test.md
|
|
4819
|
+
*/
|
|
4820
|
+
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
4821
|
+
/**
|
|
4822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
4823
|
+
* @deprecated
|
|
4824
|
+
*/
|
|
4825
|
+
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
4826
|
+
/**
|
|
4827
|
+
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-has.md
|
|
4829
|
+
*/
|
|
4830
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
4831
|
+
/**
|
|
4832
|
+
* Prefer using `Set#size` instead of `Array#length`.
|
|
4833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-size.md
|
|
4834
|
+
*/
|
|
4835
|
+
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
4836
|
+
/**
|
|
4837
|
+
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-spread.md
|
|
4839
|
+
*/
|
|
4840
|
+
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
4841
|
+
/**
|
|
4842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
4843
|
+
* @deprecated
|
|
4844
|
+
*/
|
|
4845
|
+
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4846
|
+
/**
|
|
4847
|
+
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-raw.md
|
|
4849
|
+
*/
|
|
4850
|
+
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4851
|
+
/**
|
|
4852
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-replace-all.md
|
|
4854
|
+
*/
|
|
4855
|
+
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4856
|
+
/**
|
|
4857
|
+
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-slice.md
|
|
4859
|
+
*/
|
|
4860
|
+
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4861
|
+
/**
|
|
4862
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4864
|
+
*/
|
|
4865
|
+
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4866
|
+
/**
|
|
4867
|
+
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4869
|
+
*/
|
|
4870
|
+
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4871
|
+
/**
|
|
4872
|
+
* Prefer using `structuredClone` to create a deep clone.
|
|
4873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-structured-clone.md
|
|
4874
|
+
*/
|
|
4875
|
+
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4876
|
+
/**
|
|
4877
|
+
* Prefer `switch` over multiple `else-if`.
|
|
4878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-switch.md
|
|
4879
|
+
*/
|
|
4880
|
+
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4881
|
+
/**
|
|
4882
|
+
* Prefer ternary expressions over simple `if-else` statements.
|
|
4883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-ternary.md
|
|
4884
|
+
*/
|
|
4885
|
+
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4886
|
+
/**
|
|
4887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
4888
|
+
* @deprecated
|
|
4889
|
+
*/
|
|
4890
|
+
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
4891
|
+
/**
|
|
4892
|
+
* Prefer top-level await over top-level promises and async function calls.
|
|
4893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-top-level-await.md
|
|
4894
|
+
*/
|
|
4895
|
+
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
4896
|
+
/**
|
|
4897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
4898
|
+
* @deprecated
|
|
4899
|
+
*/
|
|
4900
|
+
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4901
|
+
/**
|
|
4902
|
+
* Enforce throwing `TypeError` in type checking conditions.
|
|
4903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-type-error.md
|
|
4904
|
+
*/
|
|
4905
|
+
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
4906
|
+
/**
|
|
4907
|
+
* Prevent abbreviations.
|
|
4908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prevent-abbreviations.md
|
|
4909
|
+
*/
|
|
4910
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
4911
|
+
/**
|
|
4912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
4913
|
+
* @deprecated
|
|
4914
|
+
*/
|
|
4915
|
+
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
4916
|
+
/**
|
|
4917
|
+
* Enforce consistent relative URL style.
|
|
4918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/relative-url-style.md
|
|
4919
|
+
*/
|
|
4920
|
+
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
4921
|
+
/**
|
|
4922
|
+
* Enforce using the separator argument with `Array#join()`.
|
|
4923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-array-join-separator.md
|
|
4924
|
+
*/
|
|
4925
|
+
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
4926
|
+
/**
|
|
4927
|
+
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4929
|
+
*/
|
|
4930
|
+
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
4931
|
+
/**
|
|
4932
|
+
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-post-message-target-origin.md
|
|
4934
|
+
*/
|
|
4935
|
+
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
4936
|
+
/**
|
|
4937
|
+
* Enforce better string content.
|
|
4938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/string-content.md
|
|
4939
|
+
*/
|
|
4940
|
+
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
4941
|
+
/**
|
|
4942
|
+
* Enforce consistent brace style for `case` clauses.
|
|
4943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/switch-case-braces.md
|
|
4944
|
+
*/
|
|
4945
|
+
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
4946
|
+
/**
|
|
4947
|
+
* Fix whitespace-insensitive template indentation.
|
|
4948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/template-indent.md
|
|
4949
|
+
*/
|
|
4950
|
+
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
4951
|
+
/**
|
|
4952
|
+
* Enforce consistent case for text encoding identifiers.
|
|
4953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4954
|
+
*/
|
|
4955
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
4956
|
+
/**
|
|
4957
|
+
* Require `new` when creating an error.
|
|
4958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/throw-new-error.md
|
|
4959
|
+
*/
|
|
4960
|
+
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
4216
4961
|
/**
|
|
4217
4962
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
4218
4963
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -4254,6 +4999,20 @@ interface RuleOptions {
|
|
|
4254
4999
|
}
|
|
4255
5000
|
|
|
4256
5001
|
/* ======= Declarations ======= */
|
|
5002
|
+
// ----- @eslint-community/eslint-comments/disable-enable-pair -----
|
|
5003
|
+
type EslintCommunityEslintCommentsDisableEnablePair = []|[{
|
|
5004
|
+
allowWholeFile?: boolean
|
|
5005
|
+
}]
|
|
5006
|
+
// ----- @eslint-community/eslint-comments/no-restricted-disable -----
|
|
5007
|
+
type EslintCommunityEslintCommentsNoRestrictedDisable = string[]
|
|
5008
|
+
// ----- @eslint-community/eslint-comments/no-use -----
|
|
5009
|
+
type EslintCommunityEslintCommentsNoUse = []|[{
|
|
5010
|
+
allow?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[]
|
|
5011
|
+
}]
|
|
5012
|
+
// ----- @eslint-community/eslint-comments/require-description -----
|
|
5013
|
+
type EslintCommunityEslintCommentsRequireDescription = []|[{
|
|
5014
|
+
ignore?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[]
|
|
5015
|
+
}]
|
|
4257
5016
|
// ----- @typescript-eslint/array-type -----
|
|
4258
5017
|
type TypescriptEslintArrayType = []|[{
|
|
4259
5018
|
|
|
@@ -8786,6 +9545,204 @@ type TestingLibraryPreferUserEvent = []|[{
|
|
|
8786
9545
|
}]
|
|
8787
9546
|
// ----- unicode-bom -----
|
|
8788
9547
|
type UnicodeBom = []|[("always" | "never")]
|
|
9548
|
+
// ----- unicorn/better-regex -----
|
|
9549
|
+
type UnicornBetterRegex = []|[{
|
|
9550
|
+
sortCharacterClasses?: boolean
|
|
9551
|
+
}]
|
|
9552
|
+
// ----- unicorn/catch-error-name -----
|
|
9553
|
+
type UnicornCatchErrorName = []|[{
|
|
9554
|
+
name?: string
|
|
9555
|
+
ignore?: unknown[]
|
|
9556
|
+
}]
|
|
9557
|
+
// ----- unicorn/consistent-function-scoping -----
|
|
9558
|
+
type UnicornConsistentFunctionScoping = []|[{
|
|
9559
|
+
checkArrowFunctions?: boolean
|
|
9560
|
+
}]
|
|
9561
|
+
// ----- unicorn/expiring-todo-comments -----
|
|
9562
|
+
type UnicornExpiringTodoComments = []|[{
|
|
9563
|
+
terms?: string[]
|
|
9564
|
+
ignore?: unknown[]
|
|
9565
|
+
ignoreDatesOnPullRequests?: boolean
|
|
9566
|
+
allowWarningComments?: boolean
|
|
9567
|
+
date?: string
|
|
9568
|
+
}]
|
|
9569
|
+
// ----- unicorn/explicit-length-check -----
|
|
9570
|
+
type UnicornExplicitLengthCheck = []|[{
|
|
9571
|
+
"non-zero"?: ("greater-than" | "not-equal")
|
|
9572
|
+
}]
|
|
9573
|
+
// ----- unicorn/filename-case -----
|
|
9574
|
+
type UnicornFilenameCase = []|[({
|
|
9575
|
+
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
|
|
9576
|
+
ignore?: unknown[]
|
|
9577
|
+
multipleFileExtensions?: boolean
|
|
9578
|
+
} | {
|
|
9579
|
+
cases?: {
|
|
9580
|
+
camelCase?: boolean
|
|
9581
|
+
snakeCase?: boolean
|
|
9582
|
+
kebabCase?: boolean
|
|
9583
|
+
pascalCase?: boolean
|
|
9584
|
+
}
|
|
9585
|
+
ignore?: unknown[]
|
|
9586
|
+
multipleFileExtensions?: boolean
|
|
9587
|
+
})]
|
|
9588
|
+
// ----- unicorn/import-style -----
|
|
9589
|
+
type UnicornImportStyle = []|[{
|
|
9590
|
+
checkImport?: boolean
|
|
9591
|
+
checkDynamicImport?: boolean
|
|
9592
|
+
checkExportFrom?: boolean
|
|
9593
|
+
checkRequire?: boolean
|
|
9594
|
+
extendDefaultStyles?: boolean
|
|
9595
|
+
styles?: _UnicornImportStyle_ModuleStyles
|
|
9596
|
+
}]
|
|
9597
|
+
type _UnicornImportStyleStyles = (false | _UnicornImportStyle_BooleanObject) | undefined
|
|
9598
|
+
interface _UnicornImportStyle_ModuleStyles {
|
|
9599
|
+
[k: string]: _UnicornImportStyleStyles | undefined
|
|
9600
|
+
}
|
|
9601
|
+
interface _UnicornImportStyle_BooleanObject {
|
|
9602
|
+
[k: string]: boolean | undefined
|
|
9603
|
+
}
|
|
9604
|
+
// ----- unicorn/no-array-push-push -----
|
|
9605
|
+
type UnicornNoArrayPushPush = []|[{
|
|
9606
|
+
ignore?: unknown[]
|
|
9607
|
+
}]
|
|
9608
|
+
// ----- unicorn/no-array-reduce -----
|
|
9609
|
+
type UnicornNoArrayReduce = []|[{
|
|
9610
|
+
allowSimpleOperations?: boolean
|
|
9611
|
+
}]
|
|
9612
|
+
// ----- unicorn/no-keyword-prefix -----
|
|
9613
|
+
type UnicornNoKeywordPrefix = []|[{
|
|
9614
|
+
|
|
9615
|
+
disallowedPrefixes?: []|[string]
|
|
9616
|
+
checkProperties?: boolean
|
|
9617
|
+
onlyCamelCase?: boolean
|
|
9618
|
+
}]
|
|
9619
|
+
// ----- unicorn/no-null -----
|
|
9620
|
+
type UnicornNoNull = []|[{
|
|
9621
|
+
checkStrictEquality?: boolean
|
|
9622
|
+
}]
|
|
9623
|
+
// ----- unicorn/no-typeof-undefined -----
|
|
9624
|
+
type UnicornNoTypeofUndefined = []|[{
|
|
9625
|
+
checkGlobalVariables?: boolean
|
|
9626
|
+
}]
|
|
9627
|
+
// ----- unicorn/no-unnecessary-polyfills -----
|
|
9628
|
+
type UnicornNoUnnecessaryPolyfills = []|[{
|
|
9629
|
+
targets: (string | unknown[] | {
|
|
9630
|
+
[k: string]: unknown | undefined
|
|
9631
|
+
})
|
|
9632
|
+
}]
|
|
9633
|
+
// ----- unicorn/no-useless-undefined -----
|
|
9634
|
+
type UnicornNoUselessUndefined = []|[{
|
|
9635
|
+
checkArguments?: boolean
|
|
9636
|
+
checkArrowFunctionBody?: boolean
|
|
9637
|
+
}]
|
|
9638
|
+
// ----- unicorn/numeric-separators-style -----
|
|
9639
|
+
type UnicornNumericSeparatorsStyle = []|[{
|
|
9640
|
+
binary?: {
|
|
9641
|
+
onlyIfContainsSeparator?: boolean
|
|
9642
|
+
minimumDigits?: number
|
|
9643
|
+
groupLength?: number
|
|
9644
|
+
}
|
|
9645
|
+
octal?: {
|
|
9646
|
+
onlyIfContainsSeparator?: boolean
|
|
9647
|
+
minimumDigits?: number
|
|
9648
|
+
groupLength?: number
|
|
9649
|
+
}
|
|
9650
|
+
hexadecimal?: {
|
|
9651
|
+
onlyIfContainsSeparator?: boolean
|
|
9652
|
+
minimumDigits?: number
|
|
9653
|
+
groupLength?: number
|
|
9654
|
+
}
|
|
9655
|
+
number?: {
|
|
9656
|
+
onlyIfContainsSeparator?: boolean
|
|
9657
|
+
minimumDigits?: number
|
|
9658
|
+
groupLength?: number
|
|
9659
|
+
}
|
|
9660
|
+
onlyIfContainsSeparator?: boolean
|
|
9661
|
+
}]
|
|
9662
|
+
// ----- unicorn/prefer-add-event-listener -----
|
|
9663
|
+
type UnicornPreferAddEventListener = []|[{
|
|
9664
|
+
excludedPackages?: string[]
|
|
9665
|
+
}]
|
|
9666
|
+
// ----- unicorn/prefer-array-find -----
|
|
9667
|
+
type UnicornPreferArrayFind = []|[{
|
|
9668
|
+
checkFromLast?: boolean
|
|
9669
|
+
}]
|
|
9670
|
+
// ----- unicorn/prefer-array-flat -----
|
|
9671
|
+
type UnicornPreferArrayFlat = []|[{
|
|
9672
|
+
functions?: unknown[]
|
|
9673
|
+
}]
|
|
9674
|
+
// ----- unicorn/prefer-at -----
|
|
9675
|
+
type UnicornPreferAt = []|[{
|
|
9676
|
+
getLastElementFunctions?: unknown[]
|
|
9677
|
+
checkAllIndexAccess?: boolean
|
|
9678
|
+
}]
|
|
9679
|
+
// ----- unicorn/prefer-export-from -----
|
|
9680
|
+
type UnicornPreferExportFrom = []|[{
|
|
9681
|
+
ignoreUsedVariables?: boolean
|
|
9682
|
+
}]
|
|
9683
|
+
// ----- unicorn/prefer-number-properties -----
|
|
9684
|
+
type UnicornPreferNumberProperties = []|[{
|
|
9685
|
+
checkInfinity?: boolean
|
|
9686
|
+
checkNaN?: boolean
|
|
9687
|
+
}]
|
|
9688
|
+
// ----- unicorn/prefer-object-from-entries -----
|
|
9689
|
+
type UnicornPreferObjectFromEntries = []|[{
|
|
9690
|
+
functions?: unknown[]
|
|
9691
|
+
}]
|
|
9692
|
+
// ----- unicorn/prefer-structured-clone -----
|
|
9693
|
+
type UnicornPreferStructuredClone = []|[{
|
|
9694
|
+
functions?: unknown[]
|
|
9695
|
+
}]
|
|
9696
|
+
// ----- unicorn/prefer-switch -----
|
|
9697
|
+
type UnicornPreferSwitch = []|[{
|
|
9698
|
+
minimumCases?: number
|
|
9699
|
+
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
|
|
9700
|
+
}]
|
|
9701
|
+
// ----- unicorn/prefer-ternary -----
|
|
9702
|
+
type UnicornPreferTernary = []|[("always" | "only-single-line")]
|
|
9703
|
+
// ----- unicorn/prevent-abbreviations -----
|
|
9704
|
+
type UnicornPreventAbbreviations = []|[{
|
|
9705
|
+
checkProperties?: boolean
|
|
9706
|
+
checkVariables?: boolean
|
|
9707
|
+
checkDefaultAndNamespaceImports?: (boolean | string)
|
|
9708
|
+
checkShorthandImports?: (boolean | string)
|
|
9709
|
+
checkShorthandProperties?: boolean
|
|
9710
|
+
checkFilenames?: boolean
|
|
9711
|
+
extendDefaultReplacements?: boolean
|
|
9712
|
+
replacements?: _UnicornPreventAbbreviations_Abbreviations
|
|
9713
|
+
extendDefaultAllowList?: boolean
|
|
9714
|
+
allowList?: _UnicornPreventAbbreviations_BooleanObject
|
|
9715
|
+
ignore?: unknown[]
|
|
9716
|
+
}]
|
|
9717
|
+
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
|
|
9718
|
+
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
9719
|
+
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined
|
|
9720
|
+
}
|
|
9721
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
9722
|
+
[k: string]: boolean | undefined
|
|
9723
|
+
}
|
|
9724
|
+
// ----- unicorn/relative-url-style -----
|
|
9725
|
+
type UnicornRelativeUrlStyle = []|[("never" | "always")]
|
|
9726
|
+
// ----- unicorn/string-content -----
|
|
9727
|
+
type UnicornStringContent = []|[{
|
|
9728
|
+
patterns?: {
|
|
9729
|
+
[k: string]: (string | {
|
|
9730
|
+
suggest: string
|
|
9731
|
+
fix?: boolean
|
|
9732
|
+
message?: string
|
|
9733
|
+
}) | undefined
|
|
9734
|
+
}
|
|
9735
|
+
}]
|
|
9736
|
+
// ----- unicorn/switch-case-braces -----
|
|
9737
|
+
type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
|
|
9738
|
+
// ----- unicorn/template-indent -----
|
|
9739
|
+
type UnicornTemplateIndent = []|[{
|
|
9740
|
+
indent?: (string | number)
|
|
9741
|
+
tags?: string[]
|
|
9742
|
+
functions?: string[]
|
|
9743
|
+
selectors?: string[]
|
|
9744
|
+
comments?: string[]
|
|
9745
|
+
}]
|
|
8789
9746
|
// ----- use-isnan -----
|
|
8790
9747
|
type UseIsnan = []|[{
|
|
8791
9748
|
enforceForSwitchCase?: boolean
|
|
@@ -8890,7 +9847,7 @@ interface Options {
|
|
|
8890
9847
|
typescript?: boolean | TypescriptOptions;
|
|
8891
9848
|
}
|
|
8892
9849
|
|
|
8893
|
-
declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, testing, typescript, }?: Options, ...moreConfigs: Linter.Config[] | TypedConfigItem[]) => (Linter.Config<Linter.RulesRecord> |
|
|
9850
|
+
declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, testing, typescript, }?: Options, ...moreConfigs: Linter.Config[] | TypedConfigItem[]) => (TypedConfigItem | Linter.Config<Linter.RulesRecord> | _typescript_eslint_utils_ts_eslint.FlatConfig.Config | {
|
|
8894
9851
|
name: string;
|
|
8895
9852
|
settings: {
|
|
8896
9853
|
"import-x/core-modules": string[];
|
|
@@ -8911,6 +9868,19 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
8911
9868
|
};
|
|
8912
9869
|
};
|
|
8913
9870
|
name: string;
|
|
9871
|
+
} | {
|
|
9872
|
+
name: string;
|
|
9873
|
+
rules: {
|
|
9874
|
+
"@eslint-community/eslint-comments/require-description": "error";
|
|
9875
|
+
};
|
|
9876
|
+
files?: Array<string | string[]>;
|
|
9877
|
+
ignores?: string[];
|
|
9878
|
+
language?: string;
|
|
9879
|
+
languageOptions?: Linter.LanguageOptions;
|
|
9880
|
+
linterOptions?: Linter.LinterOptions;
|
|
9881
|
+
processor?: string | Linter.Processor;
|
|
9882
|
+
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
9883
|
+
settings?: Record<string, unknown>;
|
|
8914
9884
|
} | {
|
|
8915
9885
|
name: string;
|
|
8916
9886
|
rules: {
|
|
@@ -8970,6 +9940,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
8970
9940
|
};
|
|
8971
9941
|
};
|
|
8972
9942
|
rules: {
|
|
9943
|
+
"n/no-process-exit": "off";
|
|
8973
9944
|
"n/prefer-node-protocol": "error";
|
|
8974
9945
|
};
|
|
8975
9946
|
} | {
|
|
@@ -10643,7 +11614,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10643
11614
|
} | {
|
|
10644
11615
|
languageOptions: eslint_plugin_jest.LanguageOptions;
|
|
10645
11616
|
plugins: string[];
|
|
10646
|
-
rules:
|
|
11617
|
+
rules: Linter.RulesRecord;
|
|
10647
11618
|
files: string[];
|
|
10648
11619
|
name: string;
|
|
10649
11620
|
} | {
|
|
@@ -10697,6 +11668,35 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10697
11668
|
} | {
|
|
10698
11669
|
name: string;
|
|
10699
11670
|
rules: {
|
|
11671
|
+
"unicorn/filename-case": "off";
|
|
11672
|
+
"unicorn/import-style": "off";
|
|
11673
|
+
"unicorn/no-abusive-eslint-disable": "off";
|
|
11674
|
+
"unicorn/no-anonymous-default-export": "off";
|
|
11675
|
+
"unicorn/no-array-callback-reference": "off";
|
|
11676
|
+
"unicorn/no-array-reduce": "off";
|
|
11677
|
+
"unicorn/no-null": "off";
|
|
11678
|
+
"unicorn/no-process-exit": "off";
|
|
11679
|
+
"unicorn/no-useless-undefined": ["error", {
|
|
11680
|
+
checkArguments: false;
|
|
11681
|
+
checkArrowFunctionBody: false;
|
|
11682
|
+
}];
|
|
11683
|
+
"unicorn/prefer-node-protocol": "off";
|
|
11684
|
+
"unicorn/prevent-abbreviations": "off";
|
|
11685
|
+
};
|
|
11686
|
+
files?: Array<string | string[]>;
|
|
11687
|
+
ignores?: string[];
|
|
11688
|
+
language?: string;
|
|
11689
|
+
languageOptions?: Linter.LanguageOptions;
|
|
11690
|
+
linterOptions?: Linter.LinterOptions;
|
|
11691
|
+
processor?: string | Linter.Processor;
|
|
11692
|
+
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11693
|
+
settings?: Record<string, unknown>;
|
|
11694
|
+
} | {
|
|
11695
|
+
name: string;
|
|
11696
|
+
rules: {
|
|
11697
|
+
"array-callback-return": ["error", {
|
|
11698
|
+
allowImplicit: true;
|
|
11699
|
+
}];
|
|
10700
11700
|
"arrow-body-style": ["error", "always"];
|
|
10701
11701
|
curly: ["error", "multi-or-nest", "consistent"];
|
|
10702
11702
|
"no-console": "warn";
|