@fabdeh/eslint-config 0.8.0-beta.5 → 0.8.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.d.ts +308 -180
- package/dist/index.js +1 -0
- package/package.json +32 -31
package/dist/index.d.ts
CHANGED
|
@@ -2252,7 +2252,7 @@ interface RuleOptions {
|
|
|
2252
2252
|
*/
|
|
2253
2253
|
'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment>;
|
|
2254
2254
|
/**
|
|
2255
|
-
*
|
|
2255
|
+
* @deprecated - Use `getJsdocProcessorPlugin` processor; ensures that (JavaScript) samples within `@example` tags adhere to ESLint rules.
|
|
2256
2256
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header
|
|
2257
2257
|
*/
|
|
2258
2258
|
'jsdoc/check-examples'?: Linter.RuleEntry<JsdocCheckExamples>;
|
|
@@ -2267,7 +2267,7 @@ interface RuleOptions {
|
|
|
2267
2267
|
*/
|
|
2268
2268
|
'jsdoc/check-line-alignment'?: Linter.RuleEntry<JsdocCheckLineAlignment>;
|
|
2269
2269
|
/**
|
|
2270
|
-
*
|
|
2270
|
+
* Checks for dupe `@param` names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names.
|
|
2271
2271
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header
|
|
2272
2272
|
*/
|
|
2273
2273
|
'jsdoc/check-param-names'?: Linter.RuleEntry<JsdocCheckParamNames>;
|
|
@@ -2292,7 +2292,7 @@ interface RuleOptions {
|
|
|
2292
2292
|
*/
|
|
2293
2293
|
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>;
|
|
2294
2294
|
/**
|
|
2295
|
-
* Reports invalid
|
|
2295
|
+
* Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements).
|
|
2296
2296
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header
|
|
2297
2297
|
*/
|
|
2298
2298
|
'jsdoc/check-types'?: Linter.RuleEntry<JsdocCheckTypes>;
|
|
@@ -2307,12 +2307,17 @@ interface RuleOptions {
|
|
|
2307
2307
|
*/
|
|
2308
2308
|
'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments>;
|
|
2309
2309
|
/**
|
|
2310
|
-
*
|
|
2310
|
+
* Checks tags that are expected to be empty (e.g., `@abstract` or `@async`), reporting if they have content
|
|
2311
2311
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
2312
2312
|
*/
|
|
2313
2313
|
'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags>;
|
|
2314
2314
|
/**
|
|
2315
|
-
* Reports
|
|
2315
|
+
* Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).
|
|
2316
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header
|
|
2317
|
+
*/
|
|
2318
|
+
'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags>;
|
|
2319
|
+
/**
|
|
2320
|
+
* Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors).
|
|
2316
2321
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header
|
|
2317
2322
|
*/
|
|
2318
2323
|
'jsdoc/implements-on-classes'?: Linter.RuleEntry<JsdocImplementsOnClasses>;
|
|
@@ -2342,17 +2347,17 @@ interface RuleOptions {
|
|
|
2342
2347
|
*/
|
|
2343
2348
|
'jsdoc/match-name'?: Linter.RuleEntry<JsdocMatchName>;
|
|
2344
2349
|
/**
|
|
2345
|
-
* Controls how and whether
|
|
2350
|
+
* Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks.
|
|
2346
2351
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header
|
|
2347
2352
|
*/
|
|
2348
2353
|
'jsdoc/multiline-blocks'?: Linter.RuleEntry<JsdocMultilineBlocks>;
|
|
2349
2354
|
/**
|
|
2350
|
-
* This rule checks for multi-line-style comments which fail to meet the criteria of a
|
|
2355
|
+
* This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.
|
|
2351
2356
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header
|
|
2352
2357
|
*/
|
|
2353
2358
|
'jsdoc/no-bad-blocks'?: Linter.RuleEntry<JsdocNoBadBlocks>;
|
|
2354
2359
|
/**
|
|
2355
|
-
*
|
|
2360
|
+
* If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description.
|
|
2356
2361
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header
|
|
2357
2362
|
*/
|
|
2358
2363
|
'jsdoc/no-blank-block-descriptions'?: Linter.RuleEntry<[]>;
|
|
@@ -2382,22 +2387,37 @@ interface RuleOptions {
|
|
|
2382
2387
|
*/
|
|
2383
2388
|
'jsdoc/no-restricted-syntax'?: Linter.RuleEntry<JsdocNoRestrictedSyntax>;
|
|
2384
2389
|
/**
|
|
2385
|
-
* This rule reports types being used on `@param` or `@returns
|
|
2390
|
+
* This rule reports types being used on `@param` or `@returns` (redundant with TypeScript).
|
|
2386
2391
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header
|
|
2387
2392
|
*/
|
|
2388
2393
|
'jsdoc/no-types'?: Linter.RuleEntry<JsdocNoTypes>;
|
|
2389
2394
|
/**
|
|
2390
|
-
*
|
|
2395
|
+
* Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef`.
|
|
2391
2396
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
2392
2397
|
*/
|
|
2393
2398
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
2399
|
+
/**
|
|
2400
|
+
* Prefer `@import` tags to inline `import()` statements.
|
|
2401
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header
|
|
2402
|
+
*/
|
|
2403
|
+
'jsdoc/prefer-import-tag'?: Linter.RuleEntry<JsdocPreferImportTag>;
|
|
2404
|
+
/**
|
|
2405
|
+
* Reports use of `any` or `*` type
|
|
2406
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header
|
|
2407
|
+
*/
|
|
2408
|
+
'jsdoc/reject-any-type'?: Linter.RuleEntry<[]>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Reports use of `Function` type
|
|
2411
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header
|
|
2412
|
+
*/
|
|
2413
|
+
'jsdoc/reject-function-type'?: Linter.RuleEntry<[]>;
|
|
2394
2414
|
/**
|
|
2395
2415
|
* Requires that each JSDoc line starts with an `*`.
|
|
2396
2416
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header
|
|
2397
2417
|
*/
|
|
2398
2418
|
'jsdoc/require-asterisk-prefix'?: Linter.RuleEntry<JsdocRequireAsteriskPrefix>;
|
|
2399
2419
|
/**
|
|
2400
|
-
* Requires that all functions have a description.
|
|
2420
|
+
* Requires that all functions (and potentially other contexts) have a description.
|
|
2401
2421
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header
|
|
2402
2422
|
*/
|
|
2403
2423
|
'jsdoc/require-description'?: Linter.RuleEntry<JsdocRequireDescription>;
|
|
@@ -2407,7 +2427,7 @@ interface RuleOptions {
|
|
|
2407
2427
|
*/
|
|
2408
2428
|
'jsdoc/require-description-complete-sentence'?: Linter.RuleEntry<JsdocRequireDescriptionCompleteSentence>;
|
|
2409
2429
|
/**
|
|
2410
|
-
* Requires that all functions have examples.
|
|
2430
|
+
* Requires that all functions (and potentially other contexts) have examples.
|
|
2411
2431
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header
|
|
2412
2432
|
*/
|
|
2413
2433
|
'jsdoc/require-example'?: Linter.RuleEntry<JsdocRequireExample>;
|
|
@@ -2417,17 +2437,27 @@ interface RuleOptions {
|
|
|
2417
2437
|
*/
|
|
2418
2438
|
'jsdoc/require-file-overview'?: Linter.RuleEntry<JsdocRequireFileOverview>;
|
|
2419
2439
|
/**
|
|
2420
|
-
* Requires a hyphen before the `@param` description.
|
|
2440
|
+
* Requires a hyphen before the `@param` description (and optionally before `@property` descriptions).
|
|
2421
2441
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header
|
|
2422
2442
|
*/
|
|
2423
2443
|
'jsdoc/require-hyphen-before-param-description'?: Linter.RuleEntry<JsdocRequireHyphenBeforeParamDescription>;
|
|
2424
2444
|
/**
|
|
2425
|
-
*
|
|
2445
|
+
* Checks for presence of JSDoc comments, on functions and potentially other contexts (optionally limited to exports).
|
|
2426
2446
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header
|
|
2427
2447
|
*/
|
|
2428
2448
|
'jsdoc/require-jsdoc'?: Linter.RuleEntry<JsdocRequireJsdoc>;
|
|
2429
2449
|
/**
|
|
2430
|
-
* Requires
|
|
2450
|
+
* Requires a description for `@next` tags
|
|
2451
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-description.md#repos-sticky-header
|
|
2452
|
+
*/
|
|
2453
|
+
'jsdoc/require-next-description'?: Linter.RuleEntry<[]>;
|
|
2454
|
+
/**
|
|
2455
|
+
* Requires a type for `@next` tags
|
|
2456
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header
|
|
2457
|
+
*/
|
|
2458
|
+
'jsdoc/require-next-type'?: Linter.RuleEntry<[]>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Requires that all function parameters are documented with a `@param` tag.
|
|
2431
2461
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header
|
|
2432
2462
|
*/
|
|
2433
2463
|
'jsdoc/require-param'?: Linter.RuleEntry<JsdocRequireParam>;
|
|
@@ -2437,12 +2467,12 @@ interface RuleOptions {
|
|
|
2437
2467
|
*/
|
|
2438
2468
|
'jsdoc/require-param-description'?: Linter.RuleEntry<JsdocRequireParamDescription>;
|
|
2439
2469
|
/**
|
|
2440
|
-
* Requires that all
|
|
2470
|
+
* Requires that all `@param` tags have names.
|
|
2441
2471
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header
|
|
2442
2472
|
*/
|
|
2443
2473
|
'jsdoc/require-param-name'?: Linter.RuleEntry<JsdocRequireParamName>;
|
|
2444
2474
|
/**
|
|
2445
|
-
* Requires that each `@param` tag has a
|
|
2475
|
+
* Requires that each `@param` tag has a type value (in curly brackets).
|
|
2446
2476
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header
|
|
2447
2477
|
*/
|
|
2448
2478
|
'jsdoc/require-param-type'?: Linter.RuleEntry<JsdocRequireParamType>;
|
|
@@ -2457,62 +2487,92 @@ interface RuleOptions {
|
|
|
2457
2487
|
*/
|
|
2458
2488
|
'jsdoc/require-property-description'?: Linter.RuleEntry<[]>;
|
|
2459
2489
|
/**
|
|
2460
|
-
* Requires that all
|
|
2490
|
+
* Requires that all `@property` tags have names.
|
|
2461
2491
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header
|
|
2462
2492
|
*/
|
|
2463
2493
|
'jsdoc/require-property-name'?: Linter.RuleEntry<[]>;
|
|
2464
2494
|
/**
|
|
2465
|
-
* Requires that each `@property` tag has a
|
|
2495
|
+
* Requires that each `@property` tag has a type value (in curly brackets).
|
|
2466
2496
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
|
|
2467
2497
|
*/
|
|
2468
2498
|
'jsdoc/require-property-type'?: Linter.RuleEntry<[]>;
|
|
2469
2499
|
/**
|
|
2470
|
-
* Requires that returns are documented
|
|
2500
|
+
* Requires that returns are documented with `@returns`.
|
|
2471
2501
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
|
|
2472
2502
|
*/
|
|
2473
2503
|
'jsdoc/require-returns'?: Linter.RuleEntry<JsdocRequireReturns>;
|
|
2474
2504
|
/**
|
|
2475
|
-
* Requires a return statement in function body if a `@returns` tag is specified in
|
|
2505
|
+
* Requires a return statement in function body if a `@returns` tag is specified in JSDoc comment(and reports if multiple `@returns` tags are present).
|
|
2476
2506
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header
|
|
2477
2507
|
*/
|
|
2478
2508
|
'jsdoc/require-returns-check'?: Linter.RuleEntry<JsdocRequireReturnsCheck>;
|
|
2479
2509
|
/**
|
|
2480
|
-
* Requires that the `@returns` tag has a `description` value.
|
|
2510
|
+
* Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns).
|
|
2481
2511
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header
|
|
2482
2512
|
*/
|
|
2483
2513
|
'jsdoc/require-returns-description'?: Linter.RuleEntry<JsdocRequireReturnsDescription>;
|
|
2484
2514
|
/**
|
|
2485
|
-
* Requires that `@returns` tag has
|
|
2515
|
+
* Requires that `@returns` tag has type value (in curly brackets).
|
|
2486
2516
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
2487
2517
|
*/
|
|
2488
2518
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>;
|
|
2489
2519
|
/**
|
|
2490
|
-
* Requires
|
|
2520
|
+
* Requires tags be present, optionally for specific contexts
|
|
2521
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-tags.md#repos-sticky-header
|
|
2522
|
+
*/
|
|
2523
|
+
'jsdoc/require-tags'?: Linter.RuleEntry<JsdocRequireTags>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Requires `@template` tags be present when type parameters are used.
|
|
2491
2526
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
2492
2527
|
*/
|
|
2493
2528
|
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>;
|
|
2494
2529
|
/**
|
|
2495
|
-
* Requires
|
|
2530
|
+
* Requires a description for `@template` tags
|
|
2531
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header
|
|
2532
|
+
*/
|
|
2533
|
+
'jsdoc/require-template-description'?: Linter.RuleEntry<[]>;
|
|
2534
|
+
/**
|
|
2535
|
+
* Requires that throw statements are documented with `@throws` tags.
|
|
2496
2536
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
2497
2537
|
*/
|
|
2498
2538
|
'jsdoc/require-throws'?: Linter.RuleEntry<JsdocRequireThrows>;
|
|
2499
2539
|
/**
|
|
2500
|
-
* Requires
|
|
2540
|
+
* Requires a description for `@throws` tags
|
|
2541
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-description.md#repos-sticky-header
|
|
2542
|
+
*/
|
|
2543
|
+
'jsdoc/require-throws-description'?: Linter.RuleEntry<[]>;
|
|
2544
|
+
/**
|
|
2545
|
+
* Requires a type for `@throws` tags
|
|
2546
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header
|
|
2547
|
+
*/
|
|
2548
|
+
'jsdoc/require-throws-type'?: Linter.RuleEntry<[]>;
|
|
2549
|
+
/**
|
|
2550
|
+
* Requires yields are documented with `@yields` tags.
|
|
2501
2551
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header
|
|
2502
2552
|
*/
|
|
2503
2553
|
'jsdoc/require-yields'?: Linter.RuleEntry<JsdocRequireYields>;
|
|
2504
2554
|
/**
|
|
2505
|
-
*
|
|
2555
|
+
* Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a yield with a return value present).
|
|
2506
2556
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header
|
|
2507
2557
|
*/
|
|
2508
2558
|
'jsdoc/require-yields-check'?: Linter.RuleEntry<JsdocRequireYieldsCheck>;
|
|
2509
2559
|
/**
|
|
2510
|
-
*
|
|
2560
|
+
* Requires a description for `@yields` tags
|
|
2561
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-description.md#repos-sticky-header
|
|
2562
|
+
*/
|
|
2563
|
+
'jsdoc/require-yields-description'?: Linter.RuleEntry<[]>;
|
|
2564
|
+
/**
|
|
2565
|
+
* Requires a type for `@yields` tags
|
|
2566
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header
|
|
2567
|
+
*/
|
|
2568
|
+
'jsdoc/require-yields-type'?: Linter.RuleEntry<[]>;
|
|
2569
|
+
/**
|
|
2570
|
+
* Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.
|
|
2511
2571
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header
|
|
2512
2572
|
*/
|
|
2513
2573
|
'jsdoc/sort-tags'?: Linter.RuleEntry<JsdocSortTags>;
|
|
2514
2574
|
/**
|
|
2515
|
-
* Enforces lines (or no lines) between tags.
|
|
2575
|
+
* Enforces lines (or no lines) before, after, or between tags.
|
|
2516
2576
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header
|
|
2517
2577
|
*/
|
|
2518
2578
|
'jsdoc/tag-lines'?: Linter.RuleEntry<JsdocTagLines>;
|
|
@@ -2522,7 +2582,12 @@ interface RuleOptions {
|
|
|
2522
2582
|
*/
|
|
2523
2583
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
2524
2584
|
/**
|
|
2525
|
-
*
|
|
2585
|
+
* Formats JSDoc type values.
|
|
2586
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
2587
|
+
*/
|
|
2588
|
+
'jsdoc/type-formatting'?: Linter.RuleEntry<JsdocTypeFormatting>;
|
|
2589
|
+
/**
|
|
2590
|
+
* Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings).
|
|
2526
2591
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
2527
2592
|
*/
|
|
2528
2593
|
'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes>;
|
|
@@ -5052,690 +5117,710 @@ interface RuleOptions {
|
|
|
5052
5117
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5053
5118
|
/**
|
|
5054
5119
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
|
|
5056
5121
|
*/
|
|
5057
5122
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5058
5123
|
/**
|
|
5059
5124
|
* Enforce a specific parameter name in catch clauses.
|
|
5060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
|
|
5061
5126
|
*/
|
|
5062
5127
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5063
5128
|
/**
|
|
5064
5129
|
* Enforce consistent assertion style with `node:assert`.
|
|
5065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
|
|
5066
5131
|
*/
|
|
5067
5132
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5068
5133
|
/**
|
|
5069
5134
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
|
|
5071
5136
|
*/
|
|
5072
5137
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5073
5138
|
/**
|
|
5074
5139
|
* Use destructured variables over properties.
|
|
5075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
|
|
5076
5141
|
*/
|
|
5077
5142
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5078
5143
|
/**
|
|
5079
5144
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
|
|
5081
5146
|
*/
|
|
5082
5147
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5083
5148
|
/**
|
|
5084
5149
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
|
|
5086
5151
|
*/
|
|
5087
5152
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5088
5153
|
/**
|
|
5089
5154
|
* Move function definitions to the highest possible scope.
|
|
5090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
|
|
5091
5156
|
*/
|
|
5092
5157
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5093
5158
|
/**
|
|
5094
5159
|
* Enforce correct `Error` subclassing.
|
|
5095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
|
|
5096
5161
|
*/
|
|
5097
5162
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5098
5163
|
/**
|
|
5099
5164
|
* Enforce no spaces between braces.
|
|
5100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
|
|
5101
5166
|
*/
|
|
5102
5167
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5103
5168
|
/**
|
|
5104
5169
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
|
|
5106
5171
|
*/
|
|
5107
5172
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5108
5173
|
/**
|
|
5109
5174
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
|
|
5111
5176
|
*/
|
|
5112
5177
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5113
5178
|
/**
|
|
5114
5179
|
* Add expiration conditions to TODO comments.
|
|
5115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
|
|
5116
5181
|
*/
|
|
5117
5182
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5118
5183
|
/**
|
|
5119
5184
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
|
|
5121
5186
|
*/
|
|
5122
5187
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5123
5188
|
/**
|
|
5124
5189
|
* Enforce a case style for filenames.
|
|
5125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
|
|
5126
5191
|
*/
|
|
5127
5192
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5128
5193
|
/**
|
|
5129
5194
|
* Enforce specific import styles per module.
|
|
5130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
|
|
5131
5196
|
*/
|
|
5132
5197
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5133
5198
|
/**
|
|
5134
5199
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
|
|
5136
5201
|
*/
|
|
5137
5202
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5138
5203
|
/**
|
|
5139
5204
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
|
|
5141
5206
|
*/
|
|
5142
5207
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5143
5208
|
/**
|
|
5144
5209
|
* Disallow recursive access to `this` within getters and setters.
|
|
5145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
|
|
5146
5211
|
*/
|
|
5147
5212
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5148
5213
|
/**
|
|
5149
5214
|
* Disallow anonymous functions and classes as the default export.
|
|
5150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
|
|
5151
5216
|
*/
|
|
5152
5217
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5153
5218
|
/**
|
|
5154
5219
|
* Prevent passing a function reference directly to iterator methods.
|
|
5155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
|
|
5156
5221
|
*/
|
|
5157
5222
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5158
5223
|
/**
|
|
5159
5224
|
* Prefer `for…of` over the `forEach` method.
|
|
5160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
|
|
5161
5226
|
*/
|
|
5162
5227
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5163
5228
|
/**
|
|
5164
5229
|
* Disallow using the `this` argument in array methods.
|
|
5165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
|
|
5166
5231
|
*/
|
|
5167
5232
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5168
5233
|
/**
|
|
5169
5234
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
|
|
5171
5236
|
* @deprecated
|
|
5172
5237
|
*/
|
|
5173
5238
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5174
5239
|
/**
|
|
5175
5240
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
|
|
5177
5242
|
*/
|
|
5178
5243
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5179
5244
|
/**
|
|
5180
5245
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
|
|
5182
5247
|
*/
|
|
5183
5248
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5249
|
+
/**
|
|
5250
|
+
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
|
|
5252
|
+
*/
|
|
5253
|
+
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5184
5254
|
/**
|
|
5185
5255
|
* Disallow member access from await expression.
|
|
5186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
|
|
5187
5257
|
*/
|
|
5188
5258
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5189
5259
|
/**
|
|
5190
5260
|
* Disallow using `await` in `Promise` method parameters.
|
|
5191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
|
|
5192
5262
|
*/
|
|
5193
5263
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5194
5264
|
/**
|
|
5195
5265
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
|
|
5197
5267
|
*/
|
|
5198
5268
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5199
5269
|
/**
|
|
5200
5270
|
* Do not use `document.cookie` directly.
|
|
5201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
|
|
5202
5272
|
*/
|
|
5203
5273
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5204
5274
|
/**
|
|
5205
5275
|
* Disallow empty files.
|
|
5206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
|
|
5207
5277
|
*/
|
|
5208
5278
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5209
5279
|
/**
|
|
5210
5280
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
|
|
5212
5282
|
*/
|
|
5213
5283
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5214
5284
|
/**
|
|
5215
5285
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
|
|
5217
5287
|
*/
|
|
5218
5288
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5219
5289
|
/**
|
|
5220
5290
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
|
|
5222
5292
|
* @deprecated
|
|
5223
5293
|
*/
|
|
5224
5294
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5225
5295
|
/**
|
|
5226
5296
|
* Disallow `instanceof` with built-in objects
|
|
5227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
|
|
5228
5298
|
*/
|
|
5229
5299
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5230
5300
|
/**
|
|
5231
5301
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
|
|
5233
5303
|
*/
|
|
5234
5304
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5235
5305
|
/**
|
|
5236
5306
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
|
|
5238
5308
|
*/
|
|
5239
5309
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5240
5310
|
/**
|
|
5241
5311
|
* Disallow identifiers starting with `new` or `class`.
|
|
5242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
|
|
5243
5313
|
*/
|
|
5244
5314
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5245
5315
|
/**
|
|
5246
5316
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5248
5318
|
* @deprecated
|
|
5249
5319
|
*/
|
|
5250
5320
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5251
5321
|
/**
|
|
5252
5322
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
|
|
5254
5324
|
*/
|
|
5255
5325
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5256
5326
|
/**
|
|
5257
5327
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
|
|
5259
5329
|
*/
|
|
5260
5330
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5261
5331
|
/**
|
|
5262
5332
|
* Disallow named usage of default import and export.
|
|
5263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
|
|
5264
5334
|
*/
|
|
5265
5335
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5266
5336
|
/**
|
|
5267
5337
|
* Disallow negated conditions.
|
|
5268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
|
|
5269
5339
|
*/
|
|
5270
5340
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5271
5341
|
/**
|
|
5272
5342
|
* Disallow negated expression in equality check.
|
|
5273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
|
|
5274
5344
|
*/
|
|
5275
5345
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5276
5346
|
/**
|
|
5277
5347
|
* Disallow nested ternary expressions.
|
|
5278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
|
|
5279
5349
|
*/
|
|
5280
5350
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5281
5351
|
/**
|
|
5282
5352
|
* Disallow `new Array()`.
|
|
5283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
|
|
5284
5354
|
*/
|
|
5285
5355
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5286
5356
|
/**
|
|
5287
5357
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
|
|
5289
5359
|
*/
|
|
5290
5360
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5291
5361
|
/**
|
|
5292
5362
|
* Disallow the use of the `null` literal.
|
|
5293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
|
|
5294
5364
|
*/
|
|
5295
5365
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5296
5366
|
/**
|
|
5297
5367
|
* Disallow the use of objects as default parameters.
|
|
5298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
|
|
5299
5369
|
*/
|
|
5300
5370
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5301
5371
|
/**
|
|
5302
5372
|
* Disallow `process.exit()`.
|
|
5303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
|
|
5304
5374
|
*/
|
|
5305
5375
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5306
5376
|
/**
|
|
5307
5377
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
|
|
5309
5379
|
*/
|
|
5310
5380
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5311
5381
|
/**
|
|
5312
5382
|
* Disallow classes that only have static members.
|
|
5313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
|
|
5314
5384
|
*/
|
|
5315
5385
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5316
5386
|
/**
|
|
5317
5387
|
* Disallow `then` property.
|
|
5318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
|
|
5319
5389
|
*/
|
|
5320
5390
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5321
5391
|
/**
|
|
5322
5392
|
* Disallow assigning `this` to a variable.
|
|
5323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
|
|
5324
5394
|
*/
|
|
5325
5395
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5326
5396
|
/**
|
|
5327
5397
|
* Disallow comparing `undefined` using `typeof`.
|
|
5328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
|
|
5329
5399
|
*/
|
|
5330
5400
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5331
5401
|
/**
|
|
5332
5402
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5334
5404
|
*/
|
|
5335
5405
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5336
5406
|
/**
|
|
5337
5407
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
|
|
5339
5409
|
*/
|
|
5340
5410
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5341
5411
|
/**
|
|
5342
5412
|
* Disallow awaiting non-promise values.
|
|
5343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
|
|
5344
5414
|
*/
|
|
5345
5415
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5346
5416
|
/**
|
|
5347
5417
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
|
|
5349
5419
|
*/
|
|
5350
5420
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5351
5421
|
/**
|
|
5352
5422
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
|
|
5354
5424
|
*/
|
|
5355
5425
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5356
5426
|
/**
|
|
5357
5427
|
* Disallow unreadable array destructuring.
|
|
5358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
|
|
5359
5429
|
*/
|
|
5360
5430
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5361
5431
|
/**
|
|
5362
5432
|
* Disallow unreadable IIFEs.
|
|
5363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
|
|
5364
5434
|
*/
|
|
5365
5435
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5366
5436
|
/**
|
|
5367
5437
|
* Disallow unused object properties.
|
|
5368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
|
|
5369
5439
|
*/
|
|
5370
5440
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5371
5441
|
/**
|
|
5372
5442
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5374
5444
|
*/
|
|
5375
5445
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5376
5446
|
/**
|
|
5377
5447
|
* Disallow useless fallback when spreading in object literals.
|
|
5378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
|
|
5379
5449
|
*/
|
|
5380
5450
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5381
5451
|
/**
|
|
5382
5452
|
* Disallow useless array length check.
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
|
|
5384
5454
|
*/
|
|
5385
5455
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5386
5456
|
/**
|
|
5387
5457
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
|
|
5389
5459
|
*/
|
|
5390
5460
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5391
5461
|
/**
|
|
5392
5462
|
* Disallow unnecessary spread.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
|
|
5394
5464
|
*/
|
|
5395
5465
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5396
5466
|
/**
|
|
5397
5467
|
* Disallow useless case in switch statements.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
|
|
5399
5469
|
*/
|
|
5400
5470
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5401
5471
|
/**
|
|
5402
5472
|
* Disallow useless `undefined`.
|
|
5403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
|
|
5404
5474
|
*/
|
|
5405
5475
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5406
5476
|
/**
|
|
5407
5477
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
|
|
5409
5479
|
*/
|
|
5410
5480
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5411
5481
|
/**
|
|
5412
5482
|
* Enforce proper case for numeric literals.
|
|
5413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
|
|
5414
5484
|
*/
|
|
5415
5485
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5416
5486
|
/**
|
|
5417
5487
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
|
|
5419
5489
|
*/
|
|
5420
5490
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5421
5491
|
/**
|
|
5422
5492
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
|
|
5424
5494
|
*/
|
|
5425
5495
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5426
5496
|
/**
|
|
5427
5497
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
|
|
5429
5499
|
*/
|
|
5430
5500
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5431
5501
|
/**
|
|
5432
5502
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
|
|
5434
5504
|
*/
|
|
5435
5505
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5436
5506
|
/**
|
|
5437
5507
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
|
|
5439
5509
|
*/
|
|
5440
5510
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5441
5511
|
/**
|
|
5442
5512
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
|
|
5444
5514
|
*/
|
|
5445
5515
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5446
5516
|
/**
|
|
5447
5517
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
|
|
5449
5519
|
*/
|
|
5450
5520
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5451
5521
|
/**
|
|
5452
5522
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
|
|
5454
5524
|
*/
|
|
5455
5525
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5526
|
+
/**
|
|
5527
|
+
* Prefer `BigInt` literals over the constructor.
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
|
|
5529
|
+
*/
|
|
5530
|
+
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5456
5531
|
/**
|
|
5457
5532
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
|
|
5459
5534
|
*/
|
|
5460
5535
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5461
5536
|
/**
|
|
5462
5537
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
|
|
5464
5539
|
*/
|
|
5465
5540
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5541
|
+
/**
|
|
5542
|
+
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
|
|
5544
|
+
*/
|
|
5545
|
+
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5466
5546
|
/**
|
|
5467
5547
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
|
|
5469
5549
|
*/
|
|
5470
5550
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5471
5551
|
/**
|
|
5472
5552
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
|
|
5474
5554
|
*/
|
|
5475
5555
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5476
5556
|
/**
|
|
5477
5557
|
* Prefer default parameters over reassignment.
|
|
5478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
|
|
5479
5559
|
*/
|
|
5480
5560
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5481
5561
|
/**
|
|
5482
5562
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
|
|
5484
5564
|
*/
|
|
5485
5565
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5486
5566
|
/**
|
|
5487
5567
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
|
|
5489
5569
|
*/
|
|
5490
5570
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5491
5571
|
/**
|
|
5492
5572
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
|
|
5494
5574
|
*/
|
|
5495
5575
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5496
5576
|
/**
|
|
5497
5577
|
* Prefer `.textContent` over `.innerText`.
|
|
5498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
|
|
5499
5579
|
*/
|
|
5500
5580
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5501
5581
|
/**
|
|
5502
5582
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
|
|
5504
5584
|
*/
|
|
5505
5585
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5506
5586
|
/**
|
|
5507
5587
|
* Prefer `export…from` when re-exporting.
|
|
5508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
|
|
5509
5589
|
*/
|
|
5510
5590
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5511
5591
|
/**
|
|
5512
5592
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
|
|
5514
5594
|
*/
|
|
5515
5595
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5516
5596
|
/**
|
|
5517
5597
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
|
|
5519
5599
|
*/
|
|
5520
5600
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5521
5601
|
/**
|
|
5522
5602
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
|
|
5524
5604
|
*/
|
|
5525
5605
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5526
5606
|
/**
|
|
5527
5607
|
* Prefer reading a JSON file as a buffer.
|
|
5528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
|
|
5529
5609
|
*/
|
|
5530
5610
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5531
5611
|
/**
|
|
5532
5612
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
|
|
5534
5614
|
*/
|
|
5535
5615
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5536
5616
|
/**
|
|
5537
5617
|
* Prefer using a logical operator over a ternary.
|
|
5538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5539
5619
|
*/
|
|
5540
5620
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5541
5621
|
/**
|
|
5542
5622
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
|
|
5544
5624
|
*/
|
|
5545
5625
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5546
5626
|
/**
|
|
5547
5627
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
|
|
5549
5629
|
*/
|
|
5550
5630
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5551
5631
|
/**
|
|
5552
5632
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
|
|
5554
5634
|
*/
|
|
5555
5635
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5556
5636
|
/**
|
|
5557
5637
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
|
|
5559
5639
|
*/
|
|
5560
5640
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5561
5641
|
/**
|
|
5562
5642
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
|
|
5564
5644
|
*/
|
|
5565
5645
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5566
5646
|
/**
|
|
5567
5647
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
|
|
5569
5649
|
*/
|
|
5570
5650
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5571
5651
|
/**
|
|
5572
5652
|
* Prefer negative index over `.length - index` when possible.
|
|
5573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
|
|
5574
5654
|
*/
|
|
5575
5655
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5576
5656
|
/**
|
|
5577
5657
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
|
|
5579
5659
|
*/
|
|
5580
5660
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5581
5661
|
/**
|
|
5582
5662
|
* Prefer `Number` static properties over global ones.
|
|
5583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
|
|
5584
5664
|
*/
|
|
5585
5665
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5586
5666
|
/**
|
|
5587
5667
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
|
|
5589
5669
|
*/
|
|
5590
5670
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5591
5671
|
/**
|
|
5592
5672
|
* Prefer omitting the `catch` binding parameter.
|
|
5593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
|
|
5594
5674
|
*/
|
|
5595
5675
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5596
5676
|
/**
|
|
5597
5677
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
|
|
5599
5679
|
*/
|
|
5600
5680
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5601
5681
|
/**
|
|
5602
5682
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
|
|
5604
5684
|
*/
|
|
5605
5685
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5606
5686
|
/**
|
|
5607
5687
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
|
|
5609
5689
|
*/
|
|
5610
5690
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5611
5691
|
/**
|
|
5612
5692
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
|
|
5614
5694
|
*/
|
|
5615
5695
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5616
5696
|
/**
|
|
5617
5697
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
|
|
5619
5699
|
*/
|
|
5620
5700
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5621
5701
|
/**
|
|
5622
5702
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
|
|
5624
5704
|
*/
|
|
5625
5705
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5626
5706
|
/**
|
|
5627
5707
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
|
|
5629
5709
|
*/
|
|
5630
5710
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5631
5711
|
/**
|
|
5632
5712
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
|
|
5634
5714
|
*/
|
|
5635
5715
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5636
5716
|
/**
|
|
5637
5717
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
|
|
5639
5719
|
*/
|
|
5640
5720
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5641
5721
|
/**
|
|
5642
5722
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
|
|
5644
5724
|
*/
|
|
5645
5725
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5646
5726
|
/**
|
|
5647
5727
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
|
|
5649
5729
|
*/
|
|
5650
5730
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5651
5731
|
/**
|
|
5652
5732
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
|
|
5654
5734
|
*/
|
|
5655
5735
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5656
5736
|
/**
|
|
5657
5737
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
|
|
5659
5739
|
*/
|
|
5660
5740
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5661
5741
|
/**
|
|
5662
5742
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
|
|
5664
5744
|
*/
|
|
5665
5745
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5666
5746
|
/**
|
|
5667
5747
|
* Prefer `switch` over multiple `else-if`.
|
|
5668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
|
|
5669
5749
|
*/
|
|
5670
5750
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5671
5751
|
/**
|
|
5672
5752
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
|
|
5674
5754
|
*/
|
|
5675
5755
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5676
5756
|
/**
|
|
5677
5757
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
|
|
5679
5759
|
*/
|
|
5680
5760
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5681
5761
|
/**
|
|
5682
5762
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
|
|
5684
5764
|
*/
|
|
5685
5765
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5686
5766
|
/**
|
|
5687
5767
|
* Prevent abbreviations.
|
|
5688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
|
|
5689
5769
|
*/
|
|
5690
5770
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5691
5771
|
/**
|
|
5692
5772
|
* Enforce consistent relative URL style.
|
|
5693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
|
|
5694
5774
|
*/
|
|
5695
5775
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5696
5776
|
/**
|
|
5697
5777
|
* Enforce using the separator argument with `Array#join()`.
|
|
5698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
|
|
5699
5779
|
*/
|
|
5700
5780
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5781
|
+
/**
|
|
5782
|
+
* Require non-empty module attributes for imports and exports
|
|
5783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
|
|
5784
|
+
*/
|
|
5785
|
+
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5701
5786
|
/**
|
|
5702
5787
|
* Require non-empty specifier list in import and export statements.
|
|
5703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
|
|
5704
5789
|
*/
|
|
5705
5790
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5706
5791
|
/**
|
|
5707
5792
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5709
5794
|
*/
|
|
5710
5795
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5711
5796
|
/**
|
|
5712
5797
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
|
|
5714
5799
|
*/
|
|
5715
5800
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5716
5801
|
/**
|
|
5717
5802
|
* Enforce better string content.
|
|
5718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
|
|
5719
5804
|
*/
|
|
5720
5805
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5721
5806
|
/**
|
|
5722
5807
|
* Enforce consistent brace style for `case` clauses.
|
|
5723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
|
|
5724
5809
|
*/
|
|
5725
5810
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5726
5811
|
/**
|
|
5727
5812
|
* Fix whitespace-insensitive template indentation.
|
|
5728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
|
|
5729
5814
|
*/
|
|
5730
5815
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5731
5816
|
/**
|
|
5732
5817
|
* Enforce consistent case for text encoding identifiers.
|
|
5733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
|
|
5734
5819
|
*/
|
|
5735
5820
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
5736
5821
|
/**
|
|
5737
5822
|
* Require `new` when creating an error.
|
|
5738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
|
|
5739
5824
|
*/
|
|
5740
5825
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5741
5826
|
/**
|
|
@@ -5944,6 +6029,11 @@ interface RuleOptions {
|
|
|
5944
6029
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
5945
6030
|
*/
|
|
5946
6031
|
'vitest/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
6032
|
+
/**
|
|
6033
|
+
* Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
|
|
6034
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
|
|
6035
|
+
*/
|
|
6036
|
+
'vitest/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>;
|
|
5947
6037
|
/**
|
|
5948
6038
|
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
5949
6039
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
@@ -6004,6 +6094,11 @@ interface RuleOptions {
|
|
|
6004
6094
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
6005
6095
|
*/
|
|
6006
6096
|
'vitest/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
6097
|
+
/**
|
|
6098
|
+
* prefer dynamic import in mock
|
|
6099
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
6100
|
+
*/
|
|
6101
|
+
'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
|
|
6007
6102
|
/**
|
|
6008
6103
|
* enforce importing Vitest globals
|
|
6009
6104
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -6293,7 +6388,6 @@ interface RuleOptions {
|
|
|
6293
6388
|
*/
|
|
6294
6389
|
'yoda'?: Linter.RuleEntry<Yoda>;
|
|
6295
6390
|
}
|
|
6296
|
-
|
|
6297
6391
|
/* ======= Declarations ======= */
|
|
6298
6392
|
// ----- @angular-eslint/component-class-suffix -----
|
|
6299
6393
|
type AngularEslintComponentClassSuffix = [] | [{
|
|
@@ -9766,6 +9860,7 @@ type JsdocCheckPropertyNames = [] | [{
|
|
|
9766
9860
|
type JsdocCheckTagNames = [] | [{
|
|
9767
9861
|
definedTags?: string[];
|
|
9768
9862
|
enableFixer?: boolean;
|
|
9863
|
+
inlineTags?: string[];
|
|
9769
9864
|
jsxTags?: boolean;
|
|
9770
9865
|
typed?: boolean;
|
|
9771
9866
|
}];
|
|
@@ -9808,6 +9903,12 @@ type JsdocConvertToJsdocComments = [] | [{
|
|
|
9808
9903
|
type JsdocEmptyTags = [] | [{
|
|
9809
9904
|
tags?: string[];
|
|
9810
9905
|
}];
|
|
9906
|
+
// ----- jsdoc/escape-inline-tags -----
|
|
9907
|
+
type JsdocEscapeInlineTags = [] | [{
|
|
9908
|
+
allowedInlineTags?: string[];
|
|
9909
|
+
enableFixer?: boolean;
|
|
9910
|
+
fixType?: ("backticks" | "backslash");
|
|
9911
|
+
}];
|
|
9811
9912
|
// ----- jsdoc/implements-on-classes -----
|
|
9812
9913
|
type JsdocImplementsOnClasses = [] | [{
|
|
9813
9914
|
contexts?: (string | {
|
|
@@ -9924,10 +10025,17 @@ type JsdocNoTypes = [] | [{
|
|
|
9924
10025
|
}];
|
|
9925
10026
|
// ----- jsdoc/no-undefined-types -----
|
|
9926
10027
|
type JsdocNoUndefinedTypes = [] | [{
|
|
10028
|
+
checkUsedTypedefs?: boolean;
|
|
9927
10029
|
definedTypes?: string[];
|
|
9928
10030
|
disableReporting?: boolean;
|
|
9929
10031
|
markVariablesAsUsed?: boolean;
|
|
9930
10032
|
}];
|
|
10033
|
+
// ----- jsdoc/prefer-import-tag -----
|
|
10034
|
+
type JsdocPreferImportTag = [] | [{
|
|
10035
|
+
enableFixer?: boolean;
|
|
10036
|
+
exemptTypedefs?: boolean;
|
|
10037
|
+
outputType?: ("named-import" | "namespaced-import");
|
|
10038
|
+
}];
|
|
9931
10039
|
// ----- jsdoc/require-asterisk-prefix -----
|
|
9932
10040
|
type JsdocRequireAsteriskPrefix = [] | [("always" | "never" | "any")] | [("always" | "never" | "any"), {
|
|
9933
10041
|
tags?: {
|
|
@@ -10034,6 +10142,7 @@ type JsdocRequireParam = [] | [{
|
|
|
10034
10142
|
enableRootFixer?: boolean;
|
|
10035
10143
|
exemptedBy?: string[];
|
|
10036
10144
|
ignoreWhenAllParamsMissing?: boolean;
|
|
10145
|
+
interfaceExemptsParamsCheck?: boolean;
|
|
10037
10146
|
unnamedRootBase?: string[];
|
|
10038
10147
|
useDefaultObjectProperties?: boolean;
|
|
10039
10148
|
}];
|
|
@@ -10086,6 +10195,7 @@ type JsdocRequireReturns = [] | [{
|
|
|
10086
10195
|
type JsdocRequireReturnsCheck = [] | [{
|
|
10087
10196
|
exemptAsync?: boolean;
|
|
10088
10197
|
exemptGenerators?: boolean;
|
|
10198
|
+
noNativeTypes?: boolean;
|
|
10089
10199
|
reportMissingReturnForUndefinedTypes?: boolean;
|
|
10090
10200
|
}];
|
|
10091
10201
|
// ----- jsdoc/require-returns-description -----
|
|
@@ -10102,6 +10212,14 @@ type JsdocRequireReturnsType = [] | [{
|
|
|
10102
10212
|
context?: string;
|
|
10103
10213
|
})[];
|
|
10104
10214
|
}];
|
|
10215
|
+
// ----- jsdoc/require-tags -----
|
|
10216
|
+
type JsdocRequireTags = [] | [{
|
|
10217
|
+
tags?: (string | {
|
|
10218
|
+
context?: string;
|
|
10219
|
+
tag?: string;
|
|
10220
|
+
[k: string]: unknown | undefined;
|
|
10221
|
+
})[];
|
|
10222
|
+
}];
|
|
10105
10223
|
// ----- jsdoc/require-template -----
|
|
10106
10224
|
type JsdocRequireTemplate = [] | [{
|
|
10107
10225
|
exemptedBy?: string[];
|
|
@@ -10135,7 +10253,6 @@ type JsdocRequireYieldsCheck = [] | [{
|
|
|
10135
10253
|
comment?: string;
|
|
10136
10254
|
context?: string;
|
|
10137
10255
|
})[];
|
|
10138
|
-
exemptedBy?: string[];
|
|
10139
10256
|
next?: boolean;
|
|
10140
10257
|
}];
|
|
10141
10258
|
// ----- jsdoc/sort-tags -----
|
|
@@ -10153,6 +10270,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
|
|
|
10153
10270
|
applyToEndTag?: boolean;
|
|
10154
10271
|
count?: number;
|
|
10155
10272
|
endLines?: (number | null);
|
|
10273
|
+
maxBlockLines?: (number | null);
|
|
10156
10274
|
startLines?: (number | null);
|
|
10157
10275
|
tags?: {
|
|
10158
10276
|
[k: string]: {
|
|
@@ -10166,6 +10284,21 @@ type JsdocTextEscaping = [] | [{
|
|
|
10166
10284
|
escapeHTML?: boolean;
|
|
10167
10285
|
escapeMarkdown?: boolean;
|
|
10168
10286
|
}];
|
|
10287
|
+
// ----- jsdoc/type-formatting -----
|
|
10288
|
+
type JsdocTypeFormatting = [] | [{
|
|
10289
|
+
arrayBrackets?: ("angle" | "square");
|
|
10290
|
+
enableFixer?: boolean;
|
|
10291
|
+
genericDot?: boolean;
|
|
10292
|
+
objectFieldIndent?: string;
|
|
10293
|
+
objectFieldQuote?: ("double" | "single" | null);
|
|
10294
|
+
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
10295
|
+
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
10296
|
+
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
10297
|
+
separatorForSingleObjectField?: boolean;
|
|
10298
|
+
stringQuotes?: ("double" | "single");
|
|
10299
|
+
typeBracketSpacing?: string;
|
|
10300
|
+
unionSpacing?: string;
|
|
10301
|
+
}];
|
|
10169
10302
|
// ----- jsdoc/valid-types -----
|
|
10170
10303
|
type JsdocValidTypes = [] | [{
|
|
10171
10304
|
allowEmptyNamepaths?: boolean;
|
|
@@ -11509,12 +11642,14 @@ type NoRestrictedImports = ((string | {
|
|
|
11509
11642
|
message?: string;
|
|
11510
11643
|
importNames?: string[];
|
|
11511
11644
|
allowImportNames?: string[];
|
|
11645
|
+
allowTypeImports?: boolean;
|
|
11512
11646
|
})[] | [] | [{
|
|
11513
11647
|
paths?: (string | {
|
|
11514
11648
|
name: string;
|
|
11515
11649
|
message?: string;
|
|
11516
11650
|
importNames?: string[];
|
|
11517
11651
|
allowImportNames?: string[];
|
|
11652
|
+
allowTypeImports?: boolean;
|
|
11518
11653
|
})[];
|
|
11519
11654
|
patterns?: (string[] | ({
|
|
11520
11655
|
[k: string]: unknown | undefined;
|
|
@@ -14026,6 +14161,10 @@ type UnicornNoArrayReduce = [] | [{
|
|
|
14026
14161
|
type UnicornNoArrayReverse = [] | [{
|
|
14027
14162
|
allowExpressionStatement?: boolean;
|
|
14028
14163
|
}];
|
|
14164
|
+
// ----- unicorn/no-array-sort -----
|
|
14165
|
+
type UnicornNoArraySort = [] | [{
|
|
14166
|
+
allowExpressionStatement?: boolean;
|
|
14167
|
+
}];
|
|
14029
14168
|
// ----- unicorn/no-instanceof-builtins -----
|
|
14030
14169
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
14031
14170
|
useErrorIsError?: boolean;
|
|
@@ -15525,18 +15664,10 @@ declare const GLOB_SRC: string;
|
|
|
15525
15664
|
* A glob pattern that matches JavaScript source files (including JSX).
|
|
15526
15665
|
*/
|
|
15527
15666
|
declare const GLOB_JS: string;
|
|
15528
|
-
/**
|
|
15529
|
-
* A glob pattern that matches the extensions of TypeScript source files (including TSX).
|
|
15530
|
-
*/
|
|
15531
|
-
|
|
15532
15667
|
/**
|
|
15533
15668
|
* A glob pattern that matches TypeScript source files (including TSX).
|
|
15534
15669
|
*/
|
|
15535
15670
|
declare const GLOB_TS: string;
|
|
15536
|
-
/**
|
|
15537
|
-
* A glob pattern that matches all CSS, LESS, and SCSS files.
|
|
15538
|
-
*/
|
|
15539
|
-
|
|
15540
15671
|
/**
|
|
15541
15672
|
* A glob pattern that matches HTML files.
|
|
15542
15673
|
*/
|
|
@@ -15545,9 +15676,6 @@ declare const GLOB_HTML: string;
|
|
|
15545
15676
|
* A glob pattern that matches test files.
|
|
15546
15677
|
*/
|
|
15547
15678
|
declare const GLOB_TESTS: string[];
|
|
15548
|
-
/**
|
|
15549
|
-
* A glob pattern that matches all source files.
|
|
15550
|
-
*/
|
|
15551
15679
|
//#endregion
|
|
15552
15680
|
//#region src/shared/utils.d.ts
|
|
15553
15681
|
/**
|