@ntnyq/eslint-config 7.0.0-beta.27 → 7.0.0-beta.29
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.mts +763 -500
- package/dist/index.mjs +51 -90
- package/package.json +20 -20
package/dist/index.d.mts
CHANGED
|
@@ -36,7 +36,6 @@ import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
|
36
36
|
import { ESLintPluginCommandOptions } from "eslint-plugin-command/types";
|
|
37
37
|
import { Linter } from "eslint";
|
|
38
38
|
import { BuiltInParserName, Options as Options$1 } from "prettier";
|
|
39
|
-
//#region src/types/utils.d.ts
|
|
40
39
|
/**
|
|
41
40
|
* @file Type Utils
|
|
42
41
|
*/
|
|
@@ -60,8 +59,6 @@ export type InteropModuleDefault<T> = T extends {
|
|
|
60
59
|
} ? U : T;
|
|
61
60
|
export type Pretty<T> = { [P in keyof T]: T[P]; } & {};
|
|
62
61
|
export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/configs/vue.d.ts
|
|
65
62
|
/**
|
|
66
63
|
* Options for a Vue config branch
|
|
67
64
|
*/
|
|
@@ -98,8 +95,6 @@ export type ConfigVueOptions = OptionsFiles & OptionsOverrides & OptionsShareabl
|
|
|
98
95
|
* @returns ESLint configs
|
|
99
96
|
*/
|
|
100
97
|
export declare const configVue: (options?: ConfigVueOptions) => TypedConfigItem[];
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/configs/yml.d.ts
|
|
103
98
|
/**
|
|
104
99
|
* Options type of {@link configYml}
|
|
105
100
|
*/
|
|
@@ -113,8 +108,6 @@ export type ConfigYmlOptions = OptionsOverrides & OptionsFiles & OptionsFormatte
|
|
|
113
108
|
* @returns ESLint configs
|
|
114
109
|
*/
|
|
115
110
|
export declare const configYml: (options?: ConfigYmlOptions) => TypedConfigItem[];
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/configs/html.d.ts
|
|
118
111
|
/**
|
|
119
112
|
* Options type of {@link configHtml}
|
|
120
113
|
*/
|
|
@@ -128,8 +121,6 @@ export type ConfigHtmlOptions = OptionsFiles & OptionsOverrides;
|
|
|
128
121
|
* @returns ESLint configs
|
|
129
122
|
*/
|
|
130
123
|
export declare const configHtml: (options?: ConfigHtmlOptions) => Promise<TypedConfigItem[]>;
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/configs/node.d.ts
|
|
133
124
|
/**
|
|
134
125
|
* Options type of {@link configNode}
|
|
135
126
|
*/
|
|
@@ -143,8 +134,6 @@ export type ConfigNodeOptions = OptionsOverrides;
|
|
|
143
134
|
* @returns ESLint configs
|
|
144
135
|
*/
|
|
145
136
|
export declare const configNode: (options?: ConfigNodeOptions) => TypedConfigItem[];
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/configs/pnpm.d.ts
|
|
148
137
|
/**
|
|
149
138
|
* Options for a pnpm config branch
|
|
150
139
|
*/
|
|
@@ -173,8 +162,6 @@ export interface ConfigPnpmOptions {
|
|
|
173
162
|
* @returns ESLint configs
|
|
174
163
|
*/
|
|
175
164
|
export declare const configPnpm: (options?: ConfigPnpmOptions) => Promise<TypedConfigItem[]>;
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/configs/sort.d.ts
|
|
178
165
|
/**
|
|
179
166
|
* Options type of {@link configSort}
|
|
180
167
|
*/
|
|
@@ -215,8 +202,6 @@ export interface ConfigSortOptions {
|
|
|
215
202
|
* @returns ESLint configs
|
|
216
203
|
*/
|
|
217
204
|
export declare const configSort: (options?: ConfigSortOptions) => TypedConfigItem[];
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region src/configs/svgo.d.ts
|
|
220
205
|
/**
|
|
221
206
|
* Options type of {@link configSVGO}
|
|
222
207
|
*/
|
|
@@ -230,8 +215,6 @@ export type ConfigSVGOOptions = OptionsFiles & OptionsIgnores & OptionsOverrides
|
|
|
230
215
|
* @returns ESLint configs
|
|
231
216
|
*/
|
|
232
217
|
export declare const configSVGO: (options?: ConfigSVGOOptions) => TypedConfigItem[];
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/configs/test.d.ts
|
|
235
218
|
/**
|
|
236
219
|
* Options for a test config branch
|
|
237
220
|
*/
|
|
@@ -260,8 +243,6 @@ export interface ConfigTestOptions extends OptionsFiles {
|
|
|
260
243
|
* @returns ESLint configs
|
|
261
244
|
*/
|
|
262
245
|
export declare const configTest: (options?: ConfigTestOptions) => TypedConfigItem[];
|
|
263
|
-
//#endregion
|
|
264
|
-
//#region src/configs/toml.d.ts
|
|
265
246
|
/**
|
|
266
247
|
* Options type of {@link configToml}
|
|
267
248
|
*/
|
|
@@ -275,8 +256,6 @@ export type ConfigTomlOptions = OptionsOverrides & OptionsFiles;
|
|
|
275
256
|
* @returns ESLint configs
|
|
276
257
|
*/
|
|
277
258
|
export declare const configToml: (options?: ConfigTomlOptions) => TypedConfigItem[];
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/configs/antfu.d.ts
|
|
280
259
|
/**
|
|
281
260
|
* Options type of {@link configAntfu}
|
|
282
261
|
*/
|
|
@@ -290,8 +269,6 @@ export type ConfigAntfuOptions = OptionsOverrides;
|
|
|
290
269
|
* @returns ESLint configs
|
|
291
270
|
*/
|
|
292
271
|
export declare const configAntfu: (options?: ConfigAntfuOptions) => TypedConfigItem[];
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region src/configs/astro.d.ts
|
|
295
272
|
/**
|
|
296
273
|
* Options type of {@link configAstro}
|
|
297
274
|
*/
|
|
@@ -305,8 +282,6 @@ export type ConfigAstroOptions = OptionsFiles & OptionsOverrides & OptionsSharea
|
|
|
305
282
|
* @returns ESLint configs
|
|
306
283
|
*/
|
|
307
284
|
export declare const configAstro: (options?: ConfigAstroOptions) => Promise<TypedConfigItem[]>;
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region src/configs/jsdoc.d.ts
|
|
310
285
|
/**
|
|
311
286
|
* Options type of {@link configJsdoc}
|
|
312
287
|
*/
|
|
@@ -320,8 +295,6 @@ export type ConfigJsdocOptions = OptionsOverrides;
|
|
|
320
295
|
* @returns ESLint configs
|
|
321
296
|
*/
|
|
322
297
|
export declare const configJsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region src/configs/jsonc.d.ts
|
|
325
298
|
/**
|
|
326
299
|
* Options type of {@link configJsonc}
|
|
327
300
|
*/
|
|
@@ -335,8 +308,6 @@ export type ConfigJsoncOptions = OptionsOverrides & OptionsFiles & OptionsFormat
|
|
|
335
308
|
* @returns ESLint configs
|
|
336
309
|
*/
|
|
337
310
|
export declare const configJsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
|
|
338
|
-
//#endregion
|
|
339
|
-
//#region src/configs/ntnyq.d.ts
|
|
340
311
|
/**
|
|
341
312
|
* Options type of {@link configNtnyq}
|
|
342
313
|
*/
|
|
@@ -350,8 +321,6 @@ export type ConfigNtnyqOptions = OptionsOverrides;
|
|
|
350
321
|
* @returns ESLint configs
|
|
351
322
|
*/
|
|
352
323
|
export declare const configNtnyq: (options?: ConfigNtnyqOptions) => TypedConfigItem[];
|
|
353
|
-
//#endregion
|
|
354
|
-
//#region src/configs/oxfmt.d.ts
|
|
355
324
|
/**
|
|
356
325
|
* Options type of {@link configOxfmt}
|
|
357
326
|
*/
|
|
@@ -366,8 +335,6 @@ export interface ConfigOxfmtOptions extends OptionsOverrides, OptionsFiles, Opti
|
|
|
366
335
|
* @returns ESLint configs
|
|
367
336
|
*/
|
|
368
337
|
export declare const configOxfmt: (options?: ConfigOxfmtOptions) => TypedConfigItem[];
|
|
369
|
-
//#endregion
|
|
370
|
-
//#region src/configs/pinia.d.ts
|
|
371
338
|
/**
|
|
372
339
|
* Options type of {@link configPinia}
|
|
373
340
|
*/
|
|
@@ -381,8 +348,6 @@ export type ConfigPiniaOptions = OptionsFiles & OptionsOverrides;
|
|
|
381
348
|
* @returns ESLint configs
|
|
382
349
|
*/
|
|
383
350
|
export declare const configPinia: (options?: ConfigPiniaOptions) => TypedConfigItem[];
|
|
384
|
-
//#endregion
|
|
385
|
-
//#region src/configs/depend.d.ts
|
|
386
351
|
/**
|
|
387
352
|
* Options type of {@link configDepend}
|
|
388
353
|
*/
|
|
@@ -423,8 +388,6 @@ export type ConfigDependOptions = OptionsFiles & OptionsOverrides & {
|
|
|
423
388
|
* @returns ESLint configs
|
|
424
389
|
*/
|
|
425
390
|
export declare const configDepend: (options?: ConfigDependOptions) => TypedConfigItem[];
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/configs/regexp.d.ts
|
|
428
391
|
/**
|
|
429
392
|
* Options type of {@link configRegexp}
|
|
430
393
|
*/
|
|
@@ -445,8 +408,6 @@ export type ConfigRegexpOptions = OptionsOverrides & {
|
|
|
445
408
|
* @returns ESLint configs
|
|
446
409
|
*/
|
|
447
410
|
export declare const configRegexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
|
|
448
|
-
//#endregion
|
|
449
|
-
//#region src/configs/svelte.d.ts
|
|
450
411
|
/**
|
|
451
412
|
* Options type of {@link configSvelte}
|
|
452
413
|
*/
|
|
@@ -460,8 +421,6 @@ export type ConfigSvelteOptions = OptionsFiles & OptionsOverrides & OptionsShare
|
|
|
460
421
|
* @returns ESLint configs
|
|
461
422
|
*/
|
|
462
423
|
export declare const configSvelte: (options?: ConfigSvelteOptions) => Promise<TypedConfigItem[]>;
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region src/configs/unocss.d.ts
|
|
465
424
|
/**
|
|
466
425
|
* Options type of {@link configUnoCSS}
|
|
467
426
|
*/
|
|
@@ -482,8 +441,6 @@ export type ConfigUnoCSSOptions = OptionsOverrides & {
|
|
|
482
441
|
* @returns ESLint configs
|
|
483
442
|
*/
|
|
484
443
|
export declare const configUnoCSS: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
|
|
485
|
-
//#endregion
|
|
486
|
-
//#region src/configs/command.d.ts
|
|
487
444
|
/**
|
|
488
445
|
* Options type of {@link configCommand}
|
|
489
446
|
*/
|
|
@@ -497,8 +454,6 @@ export type ConfigCommandOptions = ESLintPluginCommandOptions;
|
|
|
497
454
|
* @returns ESLint configs
|
|
498
455
|
*/
|
|
499
456
|
export declare const configCommand: (options?: ConfigCommandOptions) => TypedConfigItem[];
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region src/configs/ignores.d.ts
|
|
502
457
|
/**
|
|
503
458
|
* Options type for {@link configIgnores}
|
|
504
459
|
*
|
|
@@ -515,8 +470,6 @@ export type ConfigIgnoresOptions = string[] | ((ignores: string[]) => string[]);
|
|
|
515
470
|
* @returns ESLint configs
|
|
516
471
|
*/
|
|
517
472
|
export declare const configIgnores: (customIgnores?: ConfigIgnoresOptions) => TypedConfigItem[];
|
|
518
|
-
//#endregion
|
|
519
|
-
//#region src/configs/importX.d.ts
|
|
520
473
|
/**
|
|
521
474
|
* Options type of {@link configImportX}
|
|
522
475
|
*/
|
|
@@ -537,8 +490,6 @@ export type ConfigImportXOptions = Pick<OptionsShareable, 'typescript'> & Option
|
|
|
537
490
|
* @returns ESLint configs
|
|
538
491
|
*/
|
|
539
492
|
export declare const configImportX: (options?: ConfigImportXOptions) => TypedConfigItem[];
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/configs/unicorn.d.ts
|
|
542
493
|
/**
|
|
543
494
|
* Built-in presets of `eslint-plugin-unicorn`
|
|
544
495
|
*/
|
|
@@ -565,8 +516,6 @@ export type ConfigUnicornOptions = OptionsOverrides & {
|
|
|
565
516
|
* @returns ESLint configs
|
|
566
517
|
*/
|
|
567
518
|
export declare const configUnicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
568
|
-
//#endregion
|
|
569
|
-
//#region src/configs/deMorgan.d.ts
|
|
570
519
|
/**
|
|
571
520
|
* Options type of {@link configDeMorgan}
|
|
572
521
|
*/
|
|
@@ -580,8 +529,6 @@ export type ConfigDeMorganOptions = OptionsOverrides;
|
|
|
580
529
|
* @returns ESLint configs
|
|
581
530
|
*/
|
|
582
531
|
export declare const configDeMorgan: (options?: ConfigDeMorganOptions) => TypedConfigItem[];
|
|
583
|
-
//#endregion
|
|
584
|
-
//#region src/configs/markdown.d.ts
|
|
585
532
|
/**
|
|
586
533
|
* Options type of {@link configMarkdown}
|
|
587
534
|
*/
|
|
@@ -595,8 +542,6 @@ export type ConfigMarkdownOptions = OptionsFiles & OptionsOverrides & Pick<Optio
|
|
|
595
542
|
* @returns ESLint configs
|
|
596
543
|
*/
|
|
597
544
|
export declare const configMarkdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
|
|
598
|
-
//#endregion
|
|
599
|
-
//#region src/configs/prettier.d.ts
|
|
600
545
|
/**
|
|
601
546
|
* Options type of {@link configPrettier}
|
|
602
547
|
*/
|
|
@@ -629,8 +574,6 @@ export interface ConfigPrettierOptions extends OptionsOverrides {
|
|
|
629
574
|
* @returns ESLint configs
|
|
630
575
|
*/
|
|
631
576
|
export declare const configPrettier: (options?: ConfigPrettierOptions) => TypedConfigItem[];
|
|
632
|
-
//#endregion
|
|
633
|
-
//#region src/configs/specials.d.ts
|
|
634
577
|
/**
|
|
635
578
|
* Options for a special config branch
|
|
636
579
|
*/
|
|
@@ -681,8 +624,6 @@ export interface ConfigSpecialsOptions {
|
|
|
681
624
|
* @returns ESLint configs
|
|
682
625
|
*/
|
|
683
626
|
export declare const configSpecials: (options?: ConfigSpecialsOptions) => TypedConfigItem[];
|
|
684
|
-
//#endregion
|
|
685
|
-
//#region src/configs/gitignore.d.ts
|
|
686
627
|
/**
|
|
687
628
|
* Options type of {@link configGitIgnore}
|
|
688
629
|
*/
|
|
@@ -703,8 +644,6 @@ export type ConfigGitIgnoreOptions = Omit<FlatGitignoreOptions, 'strict'> & {
|
|
|
703
644
|
* @returns ESLint configs
|
|
704
645
|
*/
|
|
705
646
|
export declare const configGitIgnore: (options?: ConfigGitIgnoreOptions) => TypedConfigItem[];
|
|
706
|
-
//#endregion
|
|
707
|
-
//#region src/configs/javascript.d.ts
|
|
708
647
|
/**
|
|
709
648
|
* Options type of {@link configJavaScript}
|
|
710
649
|
*/
|
|
@@ -731,8 +670,6 @@ export type ConfigJavaScriptOptions = OptionsOverrides & {
|
|
|
731
670
|
*/
|
|
732
671
|
export declare const configJavaScript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
733
672
|
export declare const configJSX: () => TypedConfigItem[];
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region src/configs/typescript.d.ts
|
|
736
673
|
/**
|
|
737
674
|
* Options type of {@link configTypeScript}
|
|
738
675
|
*/
|
|
@@ -773,8 +710,6 @@ export type ConfigTypeScriptOptions = OptionsFiles & OptionsOverrides & Pick<Opt
|
|
|
773
710
|
* @returns ESLint configs
|
|
774
711
|
*/
|
|
775
712
|
export declare const configTypeScript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
776
|
-
//#endregion
|
|
777
|
-
//#region src/configs/eslintPlugin.d.ts
|
|
778
713
|
/**
|
|
779
714
|
* Options type of {@link configESLintPlugin}
|
|
780
715
|
*/
|
|
@@ -788,8 +723,6 @@ export type ConfigESLintPluginOptions = OptionsOverrides;
|
|
|
788
723
|
* @returns ESLint configs
|
|
789
724
|
*/
|
|
790
725
|
export declare const configESLintPlugin: (options?: ConfigESLintPluginOptions) => Promise<TypedConfigItem[]>;
|
|
791
|
-
//#endregion
|
|
792
|
-
//#region src/configs/githubAction.d.ts
|
|
793
726
|
/**
|
|
794
727
|
* Options type of {@link configGitHubAction}
|
|
795
728
|
*/
|
|
@@ -803,8 +736,6 @@ export type ConfigGitHubActionOptions = OptionsFiles & OptionsOverrides;
|
|
|
803
736
|
* @returns ESLint configs
|
|
804
737
|
*/
|
|
805
738
|
export declare const configGitHubAction: (options?: ConfigGitHubActionOptions) => TypedConfigItem[];
|
|
806
|
-
//#endregion
|
|
807
|
-
//#region src/configs/perfectionist.d.ts
|
|
808
739
|
/**
|
|
809
740
|
* Option `partitionByComment` type
|
|
810
741
|
*
|
|
@@ -869,8 +800,6 @@ export interface ConfigPerfectionistOptions {
|
|
|
869
800
|
* @returns ESLint configs
|
|
870
801
|
*/
|
|
871
802
|
export declare const configPerfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
|
|
872
|
-
//#endregion
|
|
873
|
-
//#region src/configs/unusedImports.d.ts
|
|
874
803
|
/**
|
|
875
804
|
* Options type of {@link configUnusedImports}
|
|
876
805
|
*/
|
|
@@ -884,8 +813,6 @@ export type ConfigUnusedImportsOptions = OptionsOverrides;
|
|
|
884
813
|
* @returns ESLint configs
|
|
885
814
|
*/
|
|
886
815
|
export declare const configUnusedImports: (options?: ConfigUnusedImportsOptions) => Promise<TypedConfigItem[]>;
|
|
887
|
-
//#endregion
|
|
888
|
-
//#region src/configs/eslintComments.d.ts
|
|
889
816
|
/**
|
|
890
817
|
* Options type of {@link configESLintComments}
|
|
891
818
|
*/
|
|
@@ -899,8 +826,6 @@ export type ConfigESLintCommentsOptions = OptionsOverrides;
|
|
|
899
826
|
* @returns ESLint configs
|
|
900
827
|
*/
|
|
901
828
|
export declare const configESLintComments: (options?: ConfigESLintCommentsOptions) => TypedConfigItem[];
|
|
902
|
-
//#endregion
|
|
903
|
-
//#region src/types/typegen.d.ts
|
|
904
829
|
interface RuleOptions {
|
|
905
830
|
/**
|
|
906
831
|
* require a `eslint-enable` comment for every `eslint-disable` comment
|
|
@@ -1291,7 +1216,7 @@ interface RuleOptions {
|
|
|
1291
1216
|
* Disallow awaiting a value that is not a Thenable
|
|
1292
1217
|
* @see https://typescript-eslint.io/rules/await-thenable
|
|
1293
1218
|
*/
|
|
1294
|
-
'@typescript-eslint/await-thenable'?: Linter.RuleEntry<
|
|
1219
|
+
'@typescript-eslint/await-thenable'?: Linter.RuleEntry<TypescriptEslintAwaitThenable>;
|
|
1295
1220
|
/**
|
|
1296
1221
|
* Disallow `@ts-<directive>` comments or require descriptions after directives
|
|
1297
1222
|
* @see https://typescript-eslint.io/rules/ban-ts-comment
|
|
@@ -2021,6 +1946,11 @@ interface RuleOptions {
|
|
|
2021
1946
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
|
|
2022
1947
|
*/
|
|
2023
1948
|
'antfu/no-ts-export-equal'?: Linter.RuleEntry<[]>;
|
|
1949
|
+
/**
|
|
1950
|
+
* Enforce multiline objects, arrays and ternaries when they are complex
|
|
1951
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/reasonable-newline.md
|
|
1952
|
+
*/
|
|
1953
|
+
'antfu/reasonable-newline'?: Linter.RuleEntry<AntfuReasonableNewline>;
|
|
2024
1954
|
/**
|
|
2025
1955
|
* Enforce top-level functions to be declared with function keyword
|
|
2026
1956
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
|
|
@@ -5154,6 +5084,11 @@ interface RuleOptions {
|
|
|
5154
5084
|
* @see https://perfectionist.dev/rules/sort-classes
|
|
5155
5085
|
*/
|
|
5156
5086
|
'perfectionist/sort-classes'?: Linter.RuleEntry<PerfectionistSortClasses>;
|
|
5087
|
+
/**
|
|
5088
|
+
* Enforce sorted constructor parameters.
|
|
5089
|
+
* @see https://perfectionist.dev/rules/sort-constructor-parameters
|
|
5090
|
+
*/
|
|
5091
|
+
'perfectionist/sort-constructor-parameters'?: Linter.RuleEntry<PerfectionistSortConstructorParameters>;
|
|
5157
5092
|
/**
|
|
5158
5093
|
* Enforce sorted decorators.
|
|
5159
5094
|
* @see https://perfectionist.dev/rules/sort-decorators
|
|
@@ -6531,2002 +6466,2002 @@ interface RuleOptions {
|
|
|
6531
6466
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6532
6467
|
/**
|
|
6533
6468
|
* Prefer better DOM traversal APIs.
|
|
6534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/better-dom-traversing.md
|
|
6535
6470
|
*/
|
|
6536
6471
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6537
6472
|
/**
|
|
6538
6473
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6540
6475
|
* @deprecated
|
|
6541
6476
|
*/
|
|
6542
6477
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6543
6478
|
/**
|
|
6544
6479
|
* Enforce a specific parameter name in catch clauses.
|
|
6545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/catch-error-name.md
|
|
6546
6481
|
*/
|
|
6547
6482
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6548
6483
|
/**
|
|
6549
6484
|
* Enforce consistent class references in static methods.
|
|
6550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6551
6486
|
*/
|
|
6552
6487
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6553
6488
|
/**
|
|
6554
6489
|
* Enforce consistent spacing before and after commas in JSON and SOML.
|
|
6555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comma-spacing.md
|
|
6556
6491
|
*/
|
|
6557
6492
|
'unicorn/comma-spacing'?: Linter.RuleEntry<[]>;
|
|
6558
6493
|
/**
|
|
6559
6494
|
* Enforce better comment content.
|
|
6560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/comment-content.md
|
|
6561
6496
|
*/
|
|
6562
6497
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6563
6498
|
/**
|
|
6564
6499
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
6565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-arrow-return-style.md
|
|
6566
6501
|
*/
|
|
6567
6502
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
6568
6503
|
/**
|
|
6569
6504
|
* Enforce consistent assertion style with `node:assert`.
|
|
6570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-assert.md
|
|
6571
6506
|
*/
|
|
6572
6507
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6573
6508
|
/**
|
|
6574
6509
|
* Enforce consistent naming for boolean names.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-boolean-name.md
|
|
6576
6511
|
*/
|
|
6577
6512
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6578
6513
|
/**
|
|
6579
6514
|
* Enforce consistent class member order.
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-class-member-order.md
|
|
6581
6516
|
*/
|
|
6582
6517
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6583
6518
|
/**
|
|
6584
6519
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-compound-words.md
|
|
6586
6521
|
*/
|
|
6587
6522
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6588
6523
|
/**
|
|
6589
6524
|
* Enforce consistent conditional object spread style.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6591
6526
|
*/
|
|
6592
6527
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6593
6528
|
/**
|
|
6594
6529
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-date-clone.md
|
|
6596
6531
|
*/
|
|
6597
6532
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6598
6533
|
/**
|
|
6599
6534
|
* Use destructured variables over properties.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-destructuring.md
|
|
6601
6536
|
*/
|
|
6602
6537
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6603
6538
|
/**
|
|
6604
6539
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6606
6541
|
*/
|
|
6607
6542
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6608
6543
|
/**
|
|
6609
6544
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-existence-index-check.md
|
|
6611
6546
|
*/
|
|
6612
6547
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6613
6548
|
/**
|
|
6614
6549
|
* Enforce consistent decorator position on exported classes.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6616
6551
|
*/
|
|
6617
6552
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6618
6553
|
/**
|
|
6619
6554
|
* Move function definitions to the highest possible scope.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-scoping.md
|
|
6621
6556
|
*/
|
|
6622
6557
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6623
6558
|
/**
|
|
6624
6559
|
* Enforce function syntax by role.
|
|
6625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-function-style.md
|
|
6626
6561
|
*/
|
|
6627
6562
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6628
6563
|
/**
|
|
6629
6564
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-json-file-read.md
|
|
6631
6566
|
*/
|
|
6632
6567
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6633
6568
|
/**
|
|
6634
6569
|
* Enforce consistent optional chaining for same-base member access.
|
|
6635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-optional-chaining.md
|
|
6636
6571
|
*/
|
|
6637
6572
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6638
6573
|
/**
|
|
6639
6574
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6641
6576
|
*/
|
|
6642
6577
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6643
6578
|
/**
|
|
6644
6579
|
* Enforce consistent labels on tuple type elements.
|
|
6645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/consistent-tuple-labels.md
|
|
6646
6581
|
*/
|
|
6647
6582
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6648
6583
|
/**
|
|
6649
6584
|
* Enforce correct `Error` subclassing.
|
|
6650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/custom-error-definition.md
|
|
6651
6586
|
*/
|
|
6652
6587
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6653
6588
|
/**
|
|
6654
6589
|
* Enforce consistent default export declarations.
|
|
6655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/default-export-style.md
|
|
6656
6591
|
*/
|
|
6657
6592
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6658
6593
|
/**
|
|
6659
6594
|
* Enforce consistent style for DOM element dataset access.
|
|
6660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/dom-node-dataset.md
|
|
6661
6596
|
*/
|
|
6662
6597
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6663
6598
|
/**
|
|
6664
6599
|
* Enforce no spaces between braces.
|
|
6665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/empty-brace-spaces.md
|
|
6666
6601
|
*/
|
|
6667
6602
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6668
6603
|
/**
|
|
6669
6604
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/error-message.md
|
|
6671
6606
|
*/
|
|
6672
6607
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6673
6608
|
/**
|
|
6674
6609
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/escape-case.md
|
|
6676
6611
|
*/
|
|
6677
6612
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6678
6613
|
/**
|
|
6679
6614
|
* Add expiration conditions to TODO comments.
|
|
6680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/expiring-todo-comments.md
|
|
6681
6616
|
*/
|
|
6682
6617
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6683
6618
|
/**
|
|
6684
6619
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-length-check.md
|
|
6686
6621
|
*/
|
|
6687
6622
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6688
6623
|
/**
|
|
6689
6624
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/explicit-timer-delay.md
|
|
6691
6626
|
*/
|
|
6692
6627
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6693
6628
|
/**
|
|
6694
6629
|
* Enforce a case style for filenames and directory names.
|
|
6695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/filename-case.md
|
|
6696
6631
|
*/
|
|
6697
6632
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6698
6633
|
/**
|
|
6699
6634
|
* Require identifiers to match a specified regular expression.
|
|
6700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/id-match.md
|
|
6701
6636
|
*/
|
|
6702
6637
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6703
6638
|
/**
|
|
6704
6639
|
* Enforce specific import styles per module.
|
|
6705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/import-style.md
|
|
6706
6641
|
*/
|
|
6707
6642
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6708
6643
|
/**
|
|
6709
6644
|
* Enforce consistent indentation in JSON and CSS.
|
|
6710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/indent.md
|
|
6711
6646
|
*/
|
|
6712
6647
|
'unicorn/indent'?: Linter.RuleEntry<UnicornIndent>;
|
|
6713
6648
|
/**
|
|
6714
6649
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/isolated-functions.md
|
|
6716
6651
|
*/
|
|
6717
6652
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6718
6653
|
/**
|
|
6719
6654
|
* Enforce a consistent style for optional loop sources.
|
|
6720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/iteration-fallback-style.md
|
|
6721
6656
|
*/
|
|
6722
6657
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
6723
6658
|
/**
|
|
6724
6659
|
* Enforce a case style for data keys.
|
|
6725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/key-name-casing.md
|
|
6726
6661
|
*/
|
|
6727
6662
|
'unicorn/key-name-casing'?: Linter.RuleEntry<UnicornKeyNameCasing>;
|
|
6728
6663
|
/**
|
|
6729
6664
|
* Require or disallow logical assignment operator shorthand
|
|
6730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/logical-assignment-operators.md
|
|
6731
6666
|
*/
|
|
6732
6667
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6733
6668
|
/**
|
|
6734
6669
|
* Limit the depth of nested calls.
|
|
6735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/max-nested-calls.md
|
|
6736
6671
|
*/
|
|
6737
6672
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6738
6673
|
/**
|
|
6739
6674
|
* Enforce replacements for variable, property, and filenames.
|
|
6740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/name-replacements.md
|
|
6741
6676
|
*/
|
|
6742
6677
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6743
6678
|
/**
|
|
6744
6679
|
* Enforce correct use of `new` for builtin constructors.
|
|
6745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/new-for-builtins.md
|
|
6746
6681
|
*/
|
|
6747
6682
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6748
6683
|
/**
|
|
6749
6684
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6751
6686
|
*/
|
|
6752
6687
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6753
6688
|
/**
|
|
6754
6689
|
* Disallow recursive access to `this` within getters and setters.
|
|
6755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accessor-recursion.md
|
|
6756
6691
|
*/
|
|
6757
6692
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6758
6693
|
/**
|
|
6759
6694
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6761
6696
|
*/
|
|
6762
6697
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6763
6698
|
/**
|
|
6764
6699
|
* Disallow anonymous functions and classes as the default export.
|
|
6765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-anonymous-default-export.md
|
|
6766
6701
|
*/
|
|
6767
6702
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6768
6703
|
/**
|
|
6769
6704
|
* Prevent passing a function reference directly to iterator methods.
|
|
6770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-callback-reference.md
|
|
6771
6706
|
*/
|
|
6772
6707
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6773
6708
|
/**
|
|
6774
6709
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6776
6711
|
*/
|
|
6777
6712
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6778
6713
|
/**
|
|
6779
6714
|
* Disallow using reference values as `Array#fill()` values.
|
|
6780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6781
6716
|
*/
|
|
6782
6717
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6783
6718
|
/**
|
|
6784
6719
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-from-fill.md
|
|
6786
6721
|
*/
|
|
6787
6722
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6788
6723
|
/**
|
|
6789
6724
|
* Disallow front-of-array mutation.
|
|
6790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-front-mutation.md
|
|
6791
6726
|
*/
|
|
6792
6727
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6793
6728
|
/**
|
|
6794
6729
|
* Disallow using the `this` argument in array methods.
|
|
6795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-method-this-argument.md
|
|
6796
6731
|
*/
|
|
6797
6732
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6798
6733
|
/**
|
|
6799
6734
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6801
6736
|
* @deprecated
|
|
6802
6737
|
*/
|
|
6803
6738
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6804
6739
|
/**
|
|
6805
6740
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reduce.md
|
|
6807
6742
|
*/
|
|
6808
6743
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6809
6744
|
/**
|
|
6810
6745
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-reverse.md
|
|
6812
6747
|
*/
|
|
6813
6748
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6814
6749
|
/**
|
|
6815
6750
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort.md
|
|
6817
6752
|
*/
|
|
6818
6753
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6819
6754
|
/**
|
|
6820
6755
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6822
6757
|
*/
|
|
6823
6758
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6824
6759
|
/**
|
|
6825
6760
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-array-splice.md
|
|
6827
6762
|
*/
|
|
6828
6763
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6829
6764
|
/**
|
|
6830
6765
|
* Disallow asterisk prefixes and shared indentation in multiline comments.
|
|
6831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6832
6767
|
*/
|
|
6833
6768
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6834
6769
|
/**
|
|
6835
6770
|
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
6836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-iterator-callback.md
|
|
6837
6772
|
*/
|
|
6838
6773
|
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
6839
6774
|
/**
|
|
6840
6775
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-async-promise-finally.md
|
|
6842
6777
|
*/
|
|
6843
6778
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6844
6779
|
/**
|
|
6845
6780
|
* Disallow member access from await expression.
|
|
6846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-expression-member.md
|
|
6847
6782
|
*/
|
|
6848
6783
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6849
6784
|
/**
|
|
6850
6785
|
* Disallow using `await` in `Promise` method parameters.
|
|
6851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6852
6787
|
*/
|
|
6853
6788
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6854
6789
|
/**
|
|
6855
6790
|
* Disallow barrel files.
|
|
6856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-barrel-files.md
|
|
6857
6792
|
*/
|
|
6858
6793
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
6859
6794
|
/**
|
|
6860
6795
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-blob-to-file.md
|
|
6862
6797
|
*/
|
|
6863
6798
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6864
6799
|
/**
|
|
6865
6800
|
* Disallow boolean-returning sort comparators.
|
|
6866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6867
6802
|
*/
|
|
6868
6803
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6869
6804
|
/**
|
|
6870
6805
|
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
6871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6872
6807
|
*/
|
|
6873
6808
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
6874
6809
|
/**
|
|
6875
6810
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-canvas-to-image.md
|
|
6877
6812
|
*/
|
|
6878
6813
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6879
6814
|
/**
|
|
6880
6815
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-chained-comparison.md
|
|
6882
6817
|
*/
|
|
6883
6818
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6884
6819
|
/**
|
|
6885
6820
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-collection-bracket-access.md
|
|
6887
6822
|
*/
|
|
6888
6823
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6889
6824
|
/**
|
|
6890
6825
|
* Disallow dynamic object property existence checks.
|
|
6891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6892
6827
|
*/
|
|
6893
6828
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6894
6829
|
/**
|
|
6895
6830
|
* Disallow conflicting CSS query and HTML form constraints.
|
|
6896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-conflicting-constraints.md
|
|
6897
6832
|
*/
|
|
6898
6833
|
'unicorn/no-conflicting-constraints'?: Linter.RuleEntry<[]>;
|
|
6899
6834
|
/**
|
|
6900
6835
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-splice.md
|
|
6902
6837
|
*/
|
|
6903
6838
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6904
6839
|
/**
|
|
6905
6840
|
* Disallow confusing uses of `Array#with()`.
|
|
6906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-confusing-array-with.md
|
|
6907
6842
|
*/
|
|
6908
6843
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6909
6844
|
/**
|
|
6910
6845
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-console-spaces.md
|
|
6912
6847
|
*/
|
|
6913
6848
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6914
6849
|
/**
|
|
6915
6850
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-constant-zero-expression.md
|
|
6917
6852
|
*/
|
|
6918
6853
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6919
6854
|
/**
|
|
6920
6855
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6922
6857
|
*/
|
|
6923
6858
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6924
6859
|
/**
|
|
6925
6860
|
* Moved to `eslint-cssicorn` as `cssicorn/no-deprecated-features`.
|
|
6926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-deprecated-css-features
|
|
6927
6862
|
* @deprecated
|
|
6928
6863
|
*/
|
|
6929
6864
|
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<[]>;
|
|
6930
6865
|
/**
|
|
6931
6866
|
* Do not use `document.cookie` directly.
|
|
6932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-document-cookie.md
|
|
6933
6868
|
*/
|
|
6934
6869
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6935
6870
|
/**
|
|
6936
6871
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-double-comparison.md
|
|
6938
6873
|
*/
|
|
6939
6874
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6940
6875
|
/**
|
|
6941
6876
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-selectors`.
|
|
6942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-css-selectors
|
|
6943
6878
|
* @deprecated
|
|
6944
6879
|
*/
|
|
6945
6880
|
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
6946
6881
|
/**
|
|
6947
6882
|
* Moved to `eslint-cssicorn` as `cssicorn/no-duplicate-font-family-names`.
|
|
6948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-duplicate-font-family-names
|
|
6949
6884
|
* @deprecated
|
|
6950
6885
|
*/
|
|
6951
6886
|
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
6952
6887
|
/**
|
|
6953
6888
|
* Disallow duplicate adjacent branches in if chains.
|
|
6954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6955
6890
|
*/
|
|
6956
6891
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6957
6892
|
/**
|
|
6958
6893
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6960
6895
|
*/
|
|
6961
6896
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6962
6897
|
/**
|
|
6963
6898
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-loops.md
|
|
6965
6900
|
*/
|
|
6966
6901
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6967
6902
|
/**
|
|
6968
6903
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-duplicate-set-values.md
|
|
6970
6905
|
*/
|
|
6971
6906
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6972
6907
|
/**
|
|
6973
6908
|
* Disallow empty files.
|
|
6974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-file.md
|
|
6975
6910
|
*/
|
|
6976
6911
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6977
6912
|
/**
|
|
6978
6913
|
* Disallow empty link text in Markdown.
|
|
6979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-empty-link-text.md
|
|
6980
6915
|
*/
|
|
6981
6916
|
'unicorn/no-empty-link-text'?: Linter.RuleEntry<[]>;
|
|
6982
6917
|
/**
|
|
6983
6918
|
* Disallow assigning to built-in error properties.
|
|
6984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-error-property-assignment.md
|
|
6985
6920
|
*/
|
|
6986
6921
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6987
6922
|
/**
|
|
6988
6923
|
* Disallow exports in scripts.
|
|
6989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-exports-in-scripts.md
|
|
6990
6925
|
*/
|
|
6991
6926
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6992
6927
|
/**
|
|
6993
6928
|
* Prefer `for…of` over the `forEach` method.
|
|
6994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-each.md
|
|
6995
6930
|
*/
|
|
6996
6931
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6997
6932
|
/**
|
|
6998
6933
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-for-loop.md
|
|
7000
6935
|
*/
|
|
7001
6936
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7002
6937
|
/**
|
|
7003
6938
|
* Disallow assigning properties on the global object.
|
|
7004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7005
6940
|
*/
|
|
7006
6941
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7007
6942
|
/**
|
|
7008
6943
|
* Replaced by `unicorn/prefer-literal-ascii` and `unicorn/prefer-unicode-code-point-escapes`, which cover more cases.
|
|
7009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7010
6945
|
* @deprecated
|
|
7011
6946
|
*/
|
|
7012
6947
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7013
6948
|
/**
|
|
7014
6949
|
* Disallow immediate mutation after assignment and initialization immediately after declaration.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-immediate-mutation.md
|
|
7016
6951
|
*/
|
|
7017
6952
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
7018
6953
|
/**
|
|
7019
6954
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7021
6956
|
*/
|
|
7022
6957
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7023
6958
|
/**
|
|
7024
6959
|
* Disallow class accessors that hide an inherited getter or setter.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incomplete-accessor-override.md
|
|
7026
6961
|
*/
|
|
7027
6962
|
'unicorn/no-incomplete-accessor-override'?: Linter.RuleEntry<[]>;
|
|
7028
6963
|
/**
|
|
7029
6964
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7031
6966
|
*/
|
|
7032
6967
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7033
6968
|
/**
|
|
7034
6969
|
* Disallow incorrect template literal interpolation syntax.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7036
6971
|
*/
|
|
7037
6972
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7038
6973
|
/**
|
|
7039
6974
|
* Disallow ineffective CSP directives in `<meta>` elements.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-ineffective-csp-directives.md
|
|
7041
6976
|
*/
|
|
7042
6977
|
'unicorn/no-ineffective-csp-directives'?: Linter.RuleEntry<[]>;
|
|
7043
6978
|
/**
|
|
7044
6979
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7046
6981
|
* @deprecated
|
|
7047
6982
|
*/
|
|
7048
6983
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7049
6984
|
/**
|
|
7050
6985
|
* Disallow `instanceof` with built-in objects
|
|
7051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-instanceof-builtins.md
|
|
7052
6987
|
*/
|
|
7053
6988
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7054
6989
|
/**
|
|
7055
6990
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-argument-count.md
|
|
7057
6992
|
*/
|
|
7058
6993
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7059
6994
|
/**
|
|
7060
6995
|
* Disallow invalid values for HTML boolean attributes.
|
|
7061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-boolean-attribute-value.md
|
|
7062
6997
|
*/
|
|
7063
6998
|
'unicorn/no-invalid-boolean-attribute-value'?: Linter.RuleEntry<[]>;
|
|
7064
6999
|
/**
|
|
7065
7000
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7067
7002
|
*/
|
|
7068
7003
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7069
7004
|
/**
|
|
7070
7005
|
* Disallow invalid DOM tokens.
|
|
7071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-dom-token.md
|
|
7072
7007
|
*/
|
|
7073
7008
|
'unicorn/no-invalid-dom-token'?: Linter.RuleEntry<[]>;
|
|
7074
7009
|
/**
|
|
7075
7010
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7077
7012
|
*/
|
|
7078
7013
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7079
7014
|
/**
|
|
7080
7015
|
* Disallow invalid `accept` values on file inputs.
|
|
7081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7082
7017
|
*/
|
|
7083
7018
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7084
7019
|
/**
|
|
7085
7020
|
* Disallow invalid subresource integrity metadata.
|
|
7086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-integrity.md
|
|
7087
7022
|
*/
|
|
7088
7023
|
'unicorn/no-invalid-integrity'?: Linter.RuleEntry<[]>;
|
|
7089
7024
|
/**
|
|
7090
7025
|
* Disallow invalid or ignored Intl options.
|
|
7091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-intl-options.md
|
|
7092
7027
|
*/
|
|
7093
7028
|
'unicorn/no-invalid-intl-options'?: Linter.RuleEntry<[]>;
|
|
7094
7029
|
/**
|
|
7095
7030
|
* Moved to `eslint-cssicorn` as `cssicorn/no-invalid-media-features`.
|
|
7096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-invalid-media-features
|
|
7097
7032
|
* @deprecated
|
|
7098
7033
|
*/
|
|
7099
7034
|
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
7100
7035
|
/**
|
|
7101
7036
|
* Disallow invalid property descriptors.
|
|
7102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-property-descriptor.md
|
|
7103
7038
|
*/
|
|
7104
7039
|
'unicorn/no-invalid-property-descriptor'?: Linter.RuleEntry<[]>;
|
|
7105
7040
|
/**
|
|
7106
7041
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7108
7043
|
*/
|
|
7109
7044
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7110
7045
|
/**
|
|
7111
7046
|
* Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
|
|
7112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-response-options.md
|
|
7113
7048
|
*/
|
|
7114
7049
|
'unicorn/no-invalid-response-options'?: Linter.RuleEntry<[]>;
|
|
7115
7050
|
/**
|
|
7116
7051
|
* Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.
|
|
7117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-style-set-property.md
|
|
7118
7053
|
*/
|
|
7119
7054
|
'unicorn/no-invalid-style-set-property'?: Linter.RuleEntry<[]>;
|
|
7120
7055
|
/**
|
|
7121
7056
|
* Disallow statically known invalid Temporal arithmetic.
|
|
7122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-temporal-arithmetic.md
|
|
7123
7058
|
*/
|
|
7124
7059
|
'unicorn/no-invalid-temporal-arithmetic'?: Linter.RuleEntry<[]>;
|
|
7125
7060
|
/**
|
|
7126
7061
|
* Disallow invalid protocol strings in comparisons with `URL#protocol`.
|
|
7127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-url-protocol-comparison.md
|
|
7128
7063
|
*/
|
|
7129
7064
|
'unicorn/no-invalid-url-protocol-comparison'?: Linter.RuleEntry<[]>;
|
|
7130
7065
|
/**
|
|
7131
7066
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7133
7068
|
*/
|
|
7134
7069
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7135
7070
|
/**
|
|
7136
7071
|
* Disallow `javascript:` URLs in Markdown.
|
|
7137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-javascript-url.md
|
|
7138
7073
|
*/
|
|
7139
7074
|
'unicorn/no-javascript-url'?: Linter.RuleEntry<[]>;
|
|
7140
7075
|
/**
|
|
7141
7076
|
* Disallow identifiers starting with `new` or `class`.
|
|
7142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-keyword-prefix.md
|
|
7143
7078
|
*/
|
|
7144
7079
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7145
7080
|
/**
|
|
7146
7081
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-current-target-access.md
|
|
7148
7083
|
*/
|
|
7149
7084
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7150
7085
|
/**
|
|
7151
7086
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-late-event-control.md
|
|
7153
7088
|
*/
|
|
7154
7089
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7155
7090
|
/**
|
|
7156
7091
|
* Disallow empty lines at the beginning of a file.
|
|
7157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-leading-empty-lines.md
|
|
7158
7093
|
*/
|
|
7159
7094
|
'unicorn/no-leading-empty-lines'?: Linter.RuleEntry<[]>;
|
|
7160
7095
|
/**
|
|
7161
7096
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7163
7098
|
* @deprecated
|
|
7164
7099
|
*/
|
|
7165
7100
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7166
7101
|
/**
|
|
7167
7102
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-lonely-if.md
|
|
7169
7104
|
*/
|
|
7170
7105
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7171
7106
|
/**
|
|
7172
7107
|
* Disallow mutating a loop iterable during iteration.
|
|
7173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7174
7109
|
*/
|
|
7175
7110
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7176
7111
|
/**
|
|
7177
7112
|
* Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
|
|
7178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-loss-of-precision.md
|
|
7179
7114
|
*/
|
|
7180
7115
|
'unicorn/no-loss-of-precision'?: Linter.RuleEntry<[]>;
|
|
7181
7116
|
/**
|
|
7182
7117
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7184
7119
|
*/
|
|
7185
7120
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7186
7121
|
/**
|
|
7187
7122
|
* Disallow manually wrapped comments.
|
|
7188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7189
7124
|
*/
|
|
7190
7125
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7191
7126
|
/**
|
|
7192
7127
|
* Disallow checking a Map key before accessing a different key.
|
|
7193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-mismatched-map-key.md
|
|
7194
7129
|
*/
|
|
7195
7130
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7196
7131
|
/**
|
|
7197
7132
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7199
7134
|
*/
|
|
7200
7135
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7201
7136
|
/**
|
|
7202
7137
|
* Disallow references to missing local resources.
|
|
7203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-missing-local-resource.md
|
|
7204
7139
|
*/
|
|
7205
7140
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
7206
7141
|
/**
|
|
7207
7142
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
7208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
7209
7144
|
*/
|
|
7210
7145
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
7211
7146
|
/**
|
|
7212
7147
|
* Disallow named usage of default import and export.
|
|
7213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-named-default.md
|
|
7214
7149
|
*/
|
|
7215
7150
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7216
7151
|
/**
|
|
7217
7152
|
* Disallow negated array predicate calls.
|
|
7218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-array-predicate.md
|
|
7219
7154
|
*/
|
|
7220
7155
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7221
7156
|
/**
|
|
7222
7157
|
* Disallow negated comparisons.
|
|
7223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-comparison.md
|
|
7224
7159
|
*/
|
|
7225
7160
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7226
7161
|
/**
|
|
7227
7162
|
* Disallow negated conditions.
|
|
7228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negated-condition.md
|
|
7229
7164
|
*/
|
|
7230
7165
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7231
7166
|
/**
|
|
7232
7167
|
* Disallow negated expression in equality check.
|
|
7233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7234
7169
|
*/
|
|
7235
7170
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7236
7171
|
/**
|
|
7237
7172
|
* Disallow nested ternary expressions.
|
|
7238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nested-ternary.md
|
|
7239
7174
|
*/
|
|
7240
7175
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7241
7176
|
/**
|
|
7242
7177
|
* Moved to `eslint-cssicorn` as `cssicorn/no-nesting-with-mixed-specificity`.
|
|
7243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-nesting-with-mixed-specificity
|
|
7244
7179
|
* @deprecated
|
|
7245
7180
|
*/
|
|
7246
7181
|
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
7247
7182
|
/**
|
|
7248
7183
|
* Disallow `new Array()`.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-array.md
|
|
7250
7185
|
*/
|
|
7251
7186
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7252
7187
|
/**
|
|
7253
7188
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-new-buffer.md
|
|
7255
7190
|
*/
|
|
7256
7191
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7257
7192
|
/**
|
|
7258
7193
|
* Disallow non-function values with function-style verb prefixes.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7260
7195
|
*/
|
|
7261
7196
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7262
7197
|
/**
|
|
7263
7198
|
* Disallow non-standard properties on built-in objects.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7265
7200
|
*/
|
|
7266
7201
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7267
7202
|
/**
|
|
7268
7203
|
* Disallow the use of the `null` literal.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-null.md
|
|
7270
7205
|
*/
|
|
7271
7206
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7272
7207
|
/**
|
|
7273
7208
|
* Disallow the use of objects as default parameters.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7275
7210
|
*/
|
|
7276
7211
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7277
7212
|
/**
|
|
7278
7213
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7280
7215
|
*/
|
|
7281
7216
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7282
7217
|
/**
|
|
7283
7218
|
* Disallow optional chaining on undeclared variables.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7285
7220
|
*/
|
|
7286
7221
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7287
7222
|
/**
|
|
7288
7223
|
* Disallow ineffective `preventDefault()` calls in passive event listeners.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-prevent-default-in-passive-listener.md
|
|
7290
7225
|
*/
|
|
7291
7226
|
'unicorn/no-prevent-default-in-passive-listener'?: Linter.RuleEntry<[]>;
|
|
7292
7227
|
/**
|
|
7293
7228
|
* Disallow `process.exit()`.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-process-exit.md
|
|
7295
7230
|
*/
|
|
7296
7231
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7297
7232
|
/**
|
|
7298
7233
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-redundant-comparison.md
|
|
7300
7235
|
*/
|
|
7301
7236
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7302
7237
|
/**
|
|
7303
7238
|
* Moved to `eslint-cssicorn` as `cssicorn/no-redundant-nested-style-rules`.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-redundant-nested-style-rules
|
|
7305
7240
|
* @deprecated
|
|
7306
7241
|
*/
|
|
7307
7242
|
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
7308
7243
|
/**
|
|
7309
7244
|
* Disallow repeating the same wrapper at every call to a function.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-repeated-call-wrappers.md
|
|
7311
7246
|
*/
|
|
7312
7247
|
'unicorn/no-repeated-call-wrappers'?: Linter.RuleEntry<[]>;
|
|
7313
7248
|
/**
|
|
7314
7249
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-return-array-push.md
|
|
7316
7251
|
*/
|
|
7317
7252
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7318
7253
|
/**
|
|
7319
7254
|
* Disallow selector syntax in DOM names.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7321
7256
|
*/
|
|
7322
7257
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7323
7258
|
/**
|
|
7324
7259
|
* Disallow shorthand properties that override related longhand properties.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
7326
7261
|
*/
|
|
7327
7262
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
7328
7263
|
/**
|
|
7329
7264
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7331
7266
|
*/
|
|
7332
7267
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7333
7268
|
/**
|
|
7334
7269
|
* Disallow classes that only have static members.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-static-only-class.md
|
|
7336
7271
|
*/
|
|
7337
7272
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7338
7273
|
/**
|
|
7339
7274
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-subtraction-comparison.md
|
|
7341
7276
|
*/
|
|
7342
7277
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7343
7278
|
/**
|
|
7344
7279
|
* Disallow `then` property.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-thenable.md
|
|
7346
7281
|
*/
|
|
7347
7282
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7348
7283
|
/**
|
|
7349
7284
|
* Disallow assigning `this` to a variable.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-assignment.md
|
|
7351
7286
|
*/
|
|
7352
7287
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7353
7288
|
/**
|
|
7354
7289
|
* Disallow `this` outside of classes.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-this-outside-of-class.md
|
|
7356
7291
|
*/
|
|
7357
7292
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7358
7293
|
/**
|
|
7359
7294
|
* Disallow assigning to top-level variables from inside functions.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7361
7296
|
*/
|
|
7362
7297
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7363
7298
|
/**
|
|
7364
7299
|
* Disallow top-level side effects in exported modules.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-top-level-side-effects.md
|
|
7366
7301
|
*/
|
|
7367
7302
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<UnicornNoTopLevelSideEffects>;
|
|
7368
7303
|
/**
|
|
7369
7304
|
* Disallow `all` as a transition property.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-transition-all.md
|
|
7371
7306
|
*/
|
|
7372
7307
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
7373
7308
|
/**
|
|
7374
7309
|
* Disallow comparing `undefined` using `typeof`.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-typeof-undefined.md
|
|
7376
7311
|
*/
|
|
7377
7312
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7378
7313
|
/**
|
|
7379
7314
|
* Disallow referencing methods without calling them.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-uncalled-method.md
|
|
7381
7316
|
*/
|
|
7382
7317
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7383
7318
|
/**
|
|
7384
7319
|
* Require class members to be declared.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-undeclared-class-members.md
|
|
7386
7321
|
*/
|
|
7387
7322
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7388
7323
|
/**
|
|
7389
7324
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-annotations`.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-css-annotations
|
|
7391
7326
|
* @deprecated
|
|
7392
7327
|
*/
|
|
7393
7328
|
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
7394
7329
|
/**
|
|
7395
7330
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unknown-pseudo-selectors`.
|
|
7396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unknown-pseudo-selectors
|
|
7397
7332
|
* @deprecated
|
|
7398
7333
|
*/
|
|
7399
7334
|
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<[]>;
|
|
7400
7335
|
/**
|
|
7401
7336
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7403
7338
|
*/
|
|
7404
7339
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7405
7340
|
/**
|
|
7406
7341
|
* Disallow unnecessary use of `Array#flatMap()`.
|
|
7407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7408
7343
|
*/
|
|
7409
7344
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7410
7345
|
/**
|
|
7411
7346
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7413
7348
|
*/
|
|
7414
7349
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7415
7350
|
/**
|
|
7416
7351
|
* Disallow awaiting non-promise values.
|
|
7417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-await.md
|
|
7418
7353
|
*/
|
|
7419
7354
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7420
7355
|
/**
|
|
7421
7356
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7423
7358
|
*/
|
|
7424
7359
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7425
7360
|
/**
|
|
7426
7361
|
* Disallow arguments that match their parameter defaults.
|
|
7427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-default-arguments.md
|
|
7428
7363
|
*/
|
|
7429
7364
|
'unicorn/no-unnecessary-default-arguments'?: Linter.RuleEntry<[]>;
|
|
7430
7365
|
/**
|
|
7431
7366
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7433
7368
|
*/
|
|
7434
7369
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7435
7370
|
/**
|
|
7436
7371
|
* Disallow unnecessary `globalThis` references.
|
|
7437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7438
7373
|
*/
|
|
7439
7374
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7440
7375
|
/**
|
|
7441
7376
|
* Disallow unnecessary nested ternary expressions.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7443
7378
|
*/
|
|
7444
7379
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7445
7380
|
/**
|
|
7446
7381
|
* Disallow parameters that receive the same value at every call.
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-parameters.md
|
|
7448
7383
|
*/
|
|
7449
7384
|
'unicorn/no-unnecessary-parameters'?: Linter.RuleEntry<UnicornNoUnnecessaryParameters>;
|
|
7450
7385
|
/**
|
|
7451
7386
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7453
7388
|
*/
|
|
7454
7389
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7455
7390
|
/**
|
|
7456
7391
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7458
7393
|
*/
|
|
7459
7394
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7460
7395
|
/**
|
|
7461
7396
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-splice.md
|
|
7463
7398
|
*/
|
|
7464
7399
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7465
7400
|
/**
|
|
7466
7401
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
7468
7403
|
*/
|
|
7469
7404
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
7470
7405
|
/**
|
|
7471
7406
|
* Disallow unreadable array destructuring.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7473
7408
|
*/
|
|
7474
7409
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7475
7410
|
/**
|
|
7476
7411
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7478
7413
|
*/
|
|
7479
7414
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7480
7415
|
/**
|
|
7481
7416
|
* Disallow unreadable IIFEs.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-iife.md
|
|
7483
7418
|
*/
|
|
7484
7419
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7485
7420
|
/**
|
|
7486
7421
|
* Disallow unreadable `new` expressions.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7488
7423
|
*/
|
|
7489
7424
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7490
7425
|
/**
|
|
7491
7426
|
* Disallow unreadable object destructuring.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7493
7428
|
*/
|
|
7494
7429
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7495
7430
|
/**
|
|
7496
7431
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7498
7433
|
*/
|
|
7499
7434
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7500
7435
|
/**
|
|
7501
7436
|
* Disallow unsafe DOM HTML APIs.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7503
7438
|
*/
|
|
7504
7439
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7505
7440
|
/**
|
|
7506
7441
|
* Disallow known values that JSON serialization cannot represent faithfully.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-json-serialization.md
|
|
7508
7443
|
*/
|
|
7509
7444
|
'unicorn/no-unsafe-json-serialization'?: Linter.RuleEntry<[]>;
|
|
7510
7445
|
/**
|
|
7511
7446
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
7513
7448
|
*/
|
|
7514
7449
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
7515
7450
|
/**
|
|
7516
7451
|
* Disallow unsafe values as property keys.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-property-key.md
|
|
7518
7453
|
*/
|
|
7519
7454
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7520
7455
|
/**
|
|
7521
7456
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
7523
7458
|
*/
|
|
7524
7459
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
7525
7460
|
/**
|
|
7526
7461
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7528
7463
|
*/
|
|
7529
7464
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7530
7465
|
/**
|
|
7531
7466
|
* Moved to `eslint-cssicorn` as `cssicorn/no-unscoped-nesting-selector`.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unscoped-css-nesting-selector
|
|
7533
7468
|
* @deprecated
|
|
7534
7469
|
*/
|
|
7535
7470
|
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<[]>;
|
|
7536
7471
|
/**
|
|
7537
7472
|
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
7539
7474
|
* @deprecated
|
|
7540
7475
|
*/
|
|
7541
7476
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7542
7477
|
/**
|
|
7543
7478
|
* Disallow ignoring the return value of selected built-in methods.
|
|
7544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
7545
7480
|
*/
|
|
7546
7481
|
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
7547
7482
|
/**
|
|
7548
7483
|
* Disallow discarding lazy iterator helpers.
|
|
7549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-iterator-helper.md
|
|
7550
7485
|
*/
|
|
7551
7486
|
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
7552
7487
|
/**
|
|
7553
7488
|
* Disallow unused object properties.
|
|
7554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-unused-properties.md
|
|
7555
7490
|
*/
|
|
7556
7491
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7557
7492
|
/**
|
|
7558
7493
|
* Disallow passing full URLs to `URLSearchParams`.
|
|
7559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-url-in-search-params.md
|
|
7560
7495
|
*/
|
|
7561
7496
|
'unicorn/no-url-in-search-params'?: Linter.RuleEntry<[]>;
|
|
7562
7497
|
/**
|
|
7563
7498
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
7564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-boolean-cast.md
|
|
7565
7500
|
*/
|
|
7566
7501
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
7567
7502
|
/**
|
|
7568
7503
|
* Disallow useless type coercions of values that are already of the target type.
|
|
7569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-coercion.md
|
|
7570
7505
|
*/
|
|
7571
7506
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7572
7507
|
/**
|
|
7573
7508
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-collection-argument.md
|
|
7575
7510
|
*/
|
|
7576
7511
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7577
7512
|
/**
|
|
7578
7513
|
* Disallow useless compound assignments such as `x += 0`.
|
|
7579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-compound-assignment.md
|
|
7580
7515
|
*/
|
|
7581
7516
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
7582
7517
|
/**
|
|
7583
7518
|
* Disallow useless concatenation of literals.
|
|
7584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-concat.md
|
|
7585
7520
|
*/
|
|
7586
7521
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
7587
7522
|
/**
|
|
7588
7523
|
* Disallow useless `continue` statements.
|
|
7589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-continue.md
|
|
7590
7525
|
*/
|
|
7591
7526
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
7592
7527
|
/**
|
|
7593
7528
|
* Disallow unnecessary existence checks before deletion.
|
|
7594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-delete-check.md
|
|
7595
7530
|
*/
|
|
7596
7531
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7597
7532
|
/**
|
|
7598
7533
|
* Disallow `else` after a statement that exits.
|
|
7599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-else.md
|
|
7600
7535
|
*/
|
|
7601
7536
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7602
7537
|
/**
|
|
7603
7538
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7605
7540
|
*/
|
|
7606
7541
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7607
7542
|
/**
|
|
7608
7543
|
* Disallow useless fallback when spreading in object literals.
|
|
7609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7610
7545
|
*/
|
|
7611
7546
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7612
7547
|
/**
|
|
7613
7548
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7615
7550
|
*/
|
|
7616
7551
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7617
7552
|
/**
|
|
7618
7553
|
* Disallow useless array length check.
|
|
7619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-length-check.md
|
|
7620
7555
|
*/
|
|
7621
7556
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7622
7557
|
/**
|
|
7623
7558
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-logical-operand.md
|
|
7625
7560
|
*/
|
|
7626
7561
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7627
7562
|
/**
|
|
7628
7563
|
* Disallow useless overrides of class methods.
|
|
7629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-override.md
|
|
7630
7565
|
*/
|
|
7631
7566
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7632
7567
|
/**
|
|
7633
7568
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7635
7570
|
*/
|
|
7636
7571
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7637
7572
|
/**
|
|
7638
7573
|
* Disallow redundant re-exports.
|
|
7639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-re-export.md
|
|
7640
7575
|
*/
|
|
7641
7576
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7642
7577
|
/**
|
|
7643
7578
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-recursion.md
|
|
7645
7580
|
*/
|
|
7646
7581
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7647
7582
|
/**
|
|
7648
7583
|
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
7649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-set-construction.md
|
|
7650
7585
|
*/
|
|
7651
7586
|
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
7652
7587
|
/**
|
|
7653
7588
|
* Disallow unnecessary spread.
|
|
7654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-spread.md
|
|
7655
7590
|
*/
|
|
7656
7591
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7657
7592
|
/**
|
|
7658
7593
|
* Disallow useless case in switch statements.
|
|
7659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-switch-case.md
|
|
7660
7595
|
*/
|
|
7661
7596
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7662
7597
|
/**
|
|
7663
7598
|
* Disallow useless template literal expressions.
|
|
7664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-template-literals.md
|
|
7665
7600
|
*/
|
|
7666
7601
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7667
7602
|
/**
|
|
7668
7603
|
* Disallow useless `undefined`.
|
|
7669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-useless-undefined.md
|
|
7670
7605
|
*/
|
|
7671
7606
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7672
7607
|
/**
|
|
7673
7608
|
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
7674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-using-resource-escape.md
|
|
7675
7610
|
*/
|
|
7676
7611
|
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
7677
7612
|
/**
|
|
7678
7613
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7680
7615
|
*/
|
|
7681
7616
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7682
7617
|
/**
|
|
7683
7618
|
* Require consistent decimal numbers without redundant zeros.
|
|
7684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/no-zero-fractions.md
|
|
7685
7620
|
*/
|
|
7686
7621
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7687
7622
|
/**
|
|
7688
7623
|
* Enforce proper case for numeric literals.
|
|
7689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/number-literal-case.md
|
|
7690
7625
|
*/
|
|
7691
7626
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7692
7627
|
/**
|
|
7693
7628
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/numeric-separators-style.md
|
|
7695
7630
|
*/
|
|
7696
7631
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7697
7632
|
/**
|
|
7698
7633
|
* Require assignment operator shorthand where possible.
|
|
7699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/operator-assignment.md
|
|
7700
7635
|
*/
|
|
7701
7636
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7702
7637
|
/**
|
|
7703
7638
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7705
7640
|
*/
|
|
7706
7641
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7707
7642
|
/**
|
|
7708
7643
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7710
7645
|
*/
|
|
7711
7646
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7712
7647
|
/**
|
|
7713
7648
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener.md
|
|
7715
7650
|
*/
|
|
7716
7651
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7717
7652
|
/**
|
|
7718
7653
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7720
7655
|
*/
|
|
7721
7656
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7722
7657
|
/**
|
|
7723
7658
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-aggregate-error.md
|
|
7725
7660
|
*/
|
|
7726
7661
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7727
7662
|
/**
|
|
7728
7663
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-find.md
|
|
7730
7665
|
*/
|
|
7731
7666
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7732
7667
|
/**
|
|
7733
7668
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat.md
|
|
7735
7670
|
*/
|
|
7736
7671
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7737
7672
|
/**
|
|
7738
7673
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-flat-map.md
|
|
7740
7675
|
*/
|
|
7741
7676
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7742
7677
|
/**
|
|
7743
7678
|
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
7744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-async.md
|
|
7745
7680
|
*/
|
|
7746
7681
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7747
7682
|
/**
|
|
7748
7683
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-map.md
|
|
7750
7685
|
*/
|
|
7751
7686
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7752
7687
|
/**
|
|
7753
7688
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-from-range.md
|
|
7755
7690
|
*/
|
|
7756
7691
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7757
7692
|
/**
|
|
7758
7693
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-index-of.md
|
|
7760
7695
|
*/
|
|
7761
7696
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7762
7697
|
/**
|
|
7763
7698
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7765
7700
|
*/
|
|
7766
7701
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7767
7702
|
/**
|
|
7768
7703
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-last-methods.md
|
|
7770
7705
|
*/
|
|
7771
7706
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7772
7707
|
/**
|
|
7773
7708
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-slice.md
|
|
7775
7710
|
*/
|
|
7776
7711
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7777
7712
|
/**
|
|
7778
7713
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-array-some.md
|
|
7780
7715
|
*/
|
|
7781
7716
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7782
7717
|
/**
|
|
7783
7718
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-at.md
|
|
7785
7720
|
*/
|
|
7786
7721
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7787
7722
|
/**
|
|
7788
7723
|
* Prefer `await` over promise chaining.
|
|
7789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-await.md
|
|
7790
7725
|
*/
|
|
7791
7726
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7792
7727
|
/**
|
|
7793
7728
|
* Prefer `BigInt` literals over the constructor.
|
|
7794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-bigint-literals.md
|
|
7795
7730
|
*/
|
|
7796
7731
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7797
7732
|
/**
|
|
7798
7733
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7800
7735
|
*/
|
|
7801
7736
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7802
7737
|
/**
|
|
7803
7738
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7805
7740
|
*/
|
|
7806
7741
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7807
7742
|
/**
|
|
7808
7743
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-boolean-return.md
|
|
7810
7745
|
*/
|
|
7811
7746
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7812
7747
|
/**
|
|
7813
7748
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-class-fields.md
|
|
7815
7750
|
*/
|
|
7816
7751
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7817
7752
|
/**
|
|
7818
7753
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7820
7755
|
*/
|
|
7821
7756
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7822
7757
|
/**
|
|
7823
7758
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-code-point.md
|
|
7825
7760
|
*/
|
|
7826
7761
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7827
7762
|
/**
|
|
7828
7763
|
* Prefer combining consecutive guards with identical exit statements.
|
|
7829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-combined-guards.md
|
|
7830
7765
|
*/
|
|
7831
7766
|
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
7832
7767
|
/**
|
|
7833
7768
|
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
7834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-continue.md
|
|
7835
7770
|
*/
|
|
7836
7771
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7837
7772
|
/**
|
|
7838
7773
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-date-now.md
|
|
7840
7775
|
*/
|
|
7841
7776
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7842
7777
|
/**
|
|
7843
7778
|
* Prefer default parameters and destructuring defaults over reassignment and fallback expressions.
|
|
7844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-default-parameters.md
|
|
7845
7780
|
*/
|
|
7846
7781
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<UnicornPreferDefaultParameters>;
|
|
7847
7782
|
/**
|
|
7848
7783
|
* Prefer direct iteration over default iterator method calls.
|
|
7849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-direct-iteration.md
|
|
7850
7785
|
*/
|
|
7851
7786
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7852
7787
|
/**
|
|
7853
7788
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dispose.md
|
|
7855
7790
|
*/
|
|
7856
7791
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7857
7792
|
/**
|
|
7858
7793
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-append.md
|
|
7860
7795
|
*/
|
|
7861
7796
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7862
7797
|
/**
|
|
7863
7798
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7865
7800
|
* @deprecated
|
|
7866
7801
|
*/
|
|
7867
7802
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7868
7803
|
/**
|
|
7869
7804
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7871
7806
|
*/
|
|
7872
7807
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7873
7808
|
/**
|
|
7874
7809
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7876
7811
|
*/
|
|
7877
7812
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7878
7813
|
/**
|
|
7879
7814
|
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
7880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7881
7816
|
*/
|
|
7882
7817
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7883
7818
|
/**
|
|
7884
7819
|
* Prefer `.textContent` over `.innerText`.
|
|
7885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7886
7821
|
*/
|
|
7887
7822
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7888
7823
|
/**
|
|
7889
7824
|
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
7890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-early-return.md
|
|
7891
7826
|
*/
|
|
7892
7827
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7893
7828
|
/**
|
|
7894
7829
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-else-if.md
|
|
7896
7831
|
*/
|
|
7897
7832
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7898
7833
|
/**
|
|
7899
7834
|
* Prefer `Error.isError()` when checking for errors.
|
|
7900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-error-is-error.md
|
|
7901
7836
|
*/
|
|
7902
7837
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7903
7838
|
/**
|
|
7904
7839
|
* Prefer escape sequences for irregular whitespace characters.
|
|
7905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-escaped-irregular-whitespace.md
|
|
7906
7841
|
*/
|
|
7907
7842
|
'unicorn/prefer-escaped-irregular-whitespace'?: Linter.RuleEntry<[]>;
|
|
7908
7843
|
/**
|
|
7909
7844
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-event-target.md
|
|
7911
7846
|
*/
|
|
7912
7847
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7913
7848
|
/**
|
|
7914
7849
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-explicit-viewport-units`.
|
|
7915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-explicit-viewport-units
|
|
7916
7851
|
* @deprecated
|
|
7917
7852
|
*/
|
|
7918
7853
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<[]>;
|
|
7919
7854
|
/**
|
|
7920
7855
|
* Prefer `export…from` when re-exporting.
|
|
7921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-export-from.md
|
|
7922
7857
|
*/
|
|
7923
7858
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7924
7859
|
/**
|
|
7925
7860
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7927
7862
|
*/
|
|
7928
7863
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7929
7864
|
/**
|
|
7930
7865
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7932
7867
|
*/
|
|
7933
7868
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7934
7869
|
/**
|
|
7935
7870
|
* Prefer global numeric constants over `Number` static properties.
|
|
7936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-number-constants.md
|
|
7937
7872
|
*/
|
|
7938
7873
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7939
7874
|
/**
|
|
7940
7875
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-global-this.md
|
|
7942
7877
|
*/
|
|
7943
7878
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7944
7879
|
/**
|
|
7945
7880
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
7946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-group-by.md
|
|
7947
7882
|
*/
|
|
7948
7883
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7949
7884
|
/**
|
|
7950
7885
|
* Prefer `.has()` when checking existence.
|
|
7951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-has-check.md
|
|
7952
7887
|
*/
|
|
7953
7888
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7954
7889
|
/**
|
|
7955
7890
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7957
7892
|
*/
|
|
7958
7893
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7959
7894
|
/**
|
|
7960
7895
|
* Prefer HTTPS over HTTP.
|
|
7961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-https.md
|
|
7962
7897
|
*/
|
|
7963
7898
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
7964
7899
|
/**
|
|
7965
7900
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7967
7902
|
*/
|
|
7968
7903
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7969
7904
|
/**
|
|
7970
7905
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7972
7907
|
*/
|
|
7973
7908
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7974
7909
|
/**
|
|
7975
7910
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes.md
|
|
7977
7912
|
*/
|
|
7978
7913
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7979
7914
|
/**
|
|
7980
7915
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7982
7917
|
*/
|
|
7983
7918
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7984
7919
|
/**
|
|
7985
7920
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7987
7922
|
*/
|
|
7988
7923
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7989
7924
|
/**
|
|
7990
7925
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-concat.md
|
|
7992
7927
|
*/
|
|
7993
7928
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7994
7929
|
/**
|
|
7995
7930
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7997
7932
|
*/
|
|
7998
7933
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7999
7934
|
/**
|
|
8000
7935
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8002
7937
|
*/
|
|
8003
7938
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8004
7939
|
/**
|
|
8005
7940
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8007
7942
|
*/
|
|
8008
7943
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8009
7944
|
/**
|
|
8010
7945
|
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
8011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-iterator-zip.md
|
|
8012
7947
|
*/
|
|
8013
7948
|
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
8014
7949
|
/**
|
|
8015
7950
|
* Prefer JSON imports over reading and parsing JSON files.
|
|
8016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-json-import.md
|
|
8017
7952
|
*/
|
|
8018
7953
|
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
8019
7954
|
/**
|
|
8020
7955
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8022
7957
|
* @deprecated
|
|
8023
7958
|
*/
|
|
8024
7959
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8025
7960
|
/**
|
|
8026
7961
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
8028
7963
|
*/
|
|
8029
7964
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8030
7965
|
/**
|
|
8031
7966
|
* Prefer literal printable ASCII characters over escape sequences.
|
|
8032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-literal-ascii.md
|
|
8033
7968
|
*/
|
|
8034
7969
|
'unicorn/prefer-literal-ascii'?: Linter.RuleEntry<[]>;
|
|
8035
7970
|
/**
|
|
8036
7971
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-location-assign.md
|
|
8038
7973
|
*/
|
|
8039
7974
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8040
7975
|
/**
|
|
8041
7976
|
* Prefer using a logical operator over a ternary.
|
|
8042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8043
7978
|
*/
|
|
8044
7979
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8045
7980
|
/**
|
|
8046
7981
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-map-from-entries.md
|
|
8048
7983
|
*/
|
|
8049
7984
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8050
7985
|
/**
|
|
8051
7986
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-abs.md
|
|
8053
7988
|
*/
|
|
8054
7989
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8055
7990
|
/**
|
|
8056
7991
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-constants.md
|
|
8058
7993
|
*/
|
|
8059
7994
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8060
7995
|
/**
|
|
8061
7996
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-min-max.md
|
|
8063
7998
|
*/
|
|
8064
7999
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8065
8000
|
/**
|
|
8066
8001
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-math-trunc.md
|
|
8068
8003
|
*/
|
|
8069
8004
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8070
8005
|
/**
|
|
8071
8006
|
* Moved to `eslint-cssicorn` as `cssicorn/prefer-media-feature-range-syntax`.
|
|
8072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prefer-media-feature-range-syntax
|
|
8073
8008
|
* @deprecated
|
|
8074
8009
|
*/
|
|
8075
8010
|
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
8076
8011
|
/**
|
|
8077
8012
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8079
8014
|
*/
|
|
8080
8015
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8081
8016
|
/**
|
|
8082
8017
|
* Prefer modern DOM APIs.
|
|
8083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
8084
8019
|
*/
|
|
8085
8020
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8086
8021
|
/**
|
|
8087
8022
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8088
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-modern-math-apis.md
|
|
8089
8024
|
*/
|
|
8090
8025
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8091
8026
|
/**
|
|
8092
8027
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8093
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-module.md
|
|
8094
8029
|
*/
|
|
8095
8030
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8096
8031
|
/**
|
|
8097
8032
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
8099
8034
|
*/
|
|
8100
8035
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8101
8036
|
/**
|
|
8102
8037
|
* Prefer negative index over `.length - index` when possible.
|
|
8103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-negative-index.md
|
|
8104
8039
|
*/
|
|
8105
8040
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8106
8041
|
/**
|
|
8107
8042
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-node-protocol.md
|
|
8109
8044
|
*/
|
|
8110
8045
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8111
8046
|
/**
|
|
8112
8047
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-coercion.md
|
|
8114
8049
|
*/
|
|
8115
8050
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8116
8051
|
/**
|
|
8117
8052
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8119
8054
|
*/
|
|
8120
8055
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8121
8056
|
/**
|
|
8122
8057
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-number-properties.md
|
|
8124
8059
|
*/
|
|
8125
8060
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8126
8061
|
/**
|
|
8127
8062
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-define-properties.md
|
|
8129
8064
|
*/
|
|
8130
8065
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8131
8066
|
/**
|
|
8132
8067
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8134
8069
|
*/
|
|
8135
8070
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8136
8071
|
/**
|
|
8137
8072
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-from-entries.md
|
|
8139
8074
|
*/
|
|
8140
8075
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8141
8076
|
/**
|
|
8142
8077
|
* Prefer the most specific `Object` iterable method.
|
|
8143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8144
8079
|
*/
|
|
8145
8080
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8146
8081
|
/**
|
|
8147
8082
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-observer-apis.md
|
|
8149
8084
|
*/
|
|
8150
8085
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8151
8086
|
/**
|
|
8152
8087
|
* Prefer omitting the `catch` binding parameter.
|
|
8153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
8154
8089
|
*/
|
|
8155
8090
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8156
8091
|
/**
|
|
8157
8092
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-path2d.md
|
|
8159
8094
|
*/
|
|
8160
8095
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8161
8096
|
/**
|
|
8162
8097
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-private-class-fields.md
|
|
8164
8099
|
*/
|
|
8165
8100
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8166
8101
|
/**
|
|
8167
8102
|
* Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-static-methods.md
|
|
8169
8104
|
*/
|
|
8170
8105
|
'unicorn/prefer-promise-static-methods'?: Linter.RuleEntry<[]>;
|
|
8171
8106
|
/**
|
|
8172
8107
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-try.md
|
|
8174
8109
|
*/
|
|
8175
8110
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8176
8111
|
/**
|
|
8177
8112
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8179
8114
|
*/
|
|
8180
8115
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8181
8116
|
/**
|
|
8182
8117
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-prototype-methods.md
|
|
8184
8119
|
*/
|
|
8185
8120
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8186
8121
|
/**
|
|
8187
8122
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-query-selector.md
|
|
8189
8124
|
*/
|
|
8190
8125
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8191
8126
|
/**
|
|
8192
8127
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-queue-microtask.md
|
|
8194
8129
|
*/
|
|
8195
8130
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8196
8131
|
/**
|
|
8197
8132
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-reflect-apply.md
|
|
8199
8134
|
*/
|
|
8200
8135
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8201
8136
|
/**
|
|
8202
8137
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-escape.md
|
|
8204
8139
|
*/
|
|
8205
8140
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8206
8141
|
/**
|
|
8207
8142
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-regexp-test.md
|
|
8209
8144
|
*/
|
|
8210
8145
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8211
8146
|
/**
|
|
8212
8147
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-response-static-json.md
|
|
8214
8149
|
*/
|
|
8215
8150
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8216
8151
|
/**
|
|
8217
8152
|
* Prefer `:scope` when using element query selector methods.
|
|
8218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-scoped-selector.md
|
|
8219
8154
|
*/
|
|
8220
8155
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8221
8156
|
/**
|
|
8222
8157
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-has.md
|
|
8224
8159
|
*/
|
|
8225
8160
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8226
8161
|
/**
|
|
8227
8162
|
* Prefer `Set` methods for Set operations.
|
|
8228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-methods.md
|
|
8229
8164
|
*/
|
|
8230
8165
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8231
8166
|
/**
|
|
8232
8167
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-set-size.md
|
|
8234
8169
|
*/
|
|
8235
8170
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8236
8171
|
/**
|
|
8237
8172
|
* Prefer arrow function properties over methods with a single return.
|
|
8238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8239
8174
|
*/
|
|
8240
8175
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
8241
8176
|
/**
|
|
8242
8177
|
* Prefer shorter alternatives to Unicode escape sequences.
|
|
8243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-short-escape-sequences.md
|
|
8244
8179
|
*/
|
|
8245
8180
|
'unicorn/prefer-short-escape-sequences'?: Linter.RuleEntry<[]>;
|
|
8246
8181
|
/**
|
|
8247
8182
|
* Prefer simple conditions first in logical expressions.
|
|
8248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-condition-first.md
|
|
8249
8184
|
*/
|
|
8250
8185
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8251
8186
|
/**
|
|
8252
8187
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8254
8189
|
*/
|
|
8255
8190
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8256
8191
|
/**
|
|
8257
8192
|
* Prefer simplified conditions.
|
|
8258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-simplified-conditions.md
|
|
8259
8194
|
*/
|
|
8260
8195
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<UnicornPreferSimplifiedConditions>;
|
|
8261
8196
|
/**
|
|
8262
8197
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8264
8199
|
*/
|
|
8265
8200
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8266
8201
|
/**
|
|
8267
8202
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-call.md
|
|
8269
8204
|
*/
|
|
8270
8205
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8271
8206
|
/**
|
|
8272
8207
|
* Prefer a single object destructuring declaration per local const source.
|
|
8273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8274
8209
|
*/
|
|
8275
8210
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8276
8211
|
/**
|
|
8277
8212
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-single-replace.md
|
|
8279
8214
|
*/
|
|
8280
8215
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8281
8216
|
/**
|
|
8282
|
-
* Prefer declaring variables in the smallest possible scope.
|
|
8283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8217
|
+
* Prefer declaring variables and type aliases in the smallest possible scope.
|
|
8218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-smaller-scope.md
|
|
8284
8219
|
*/
|
|
8285
8220
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8286
8221
|
/**
|
|
8287
8222
|
* Prefer `String#split()` with a limit.
|
|
8288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-split-limit.md
|
|
8289
8224
|
*/
|
|
8290
8225
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8291
8226
|
/**
|
|
8292
8227
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-spread.md
|
|
8294
8229
|
*/
|
|
8295
8230
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8296
8231
|
/**
|
|
8297
8232
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-match-all.md
|
|
8299
8234
|
*/
|
|
8300
8235
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8301
8236
|
/**
|
|
8302
8237
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8304
8239
|
*/
|
|
8305
8240
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8306
8241
|
/**
|
|
8307
8242
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-raw.md
|
|
8309
8244
|
*/
|
|
8310
8245
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8311
8246
|
/**
|
|
8312
8247
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-repeat.md
|
|
8314
8249
|
*/
|
|
8315
8250
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8316
8251
|
/**
|
|
8317
8252
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-replace-all.md
|
|
8319
8254
|
*/
|
|
8320
8255
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8321
8256
|
/**
|
|
8322
8257
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-slice.md
|
|
8324
8259
|
*/
|
|
8325
8260
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8326
8261
|
/**
|
|
8327
8262
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
8328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8329
8264
|
*/
|
|
8330
8265
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8331
8266
|
/**
|
|
8332
8267
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
8334
8269
|
*/
|
|
8335
8270
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8336
8271
|
/**
|
|
8337
8272
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-structured-clone.md
|
|
8339
8274
|
*/
|
|
8340
8275
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8341
8276
|
/**
|
|
8342
8277
|
* Prefer `switch` over multiple `else-if`.
|
|
8343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-switch.md
|
|
8344
8279
|
*/
|
|
8345
8280
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8346
8281
|
/**
|
|
8347
8282
|
* Prefer `Temporal` over `Date`.
|
|
8348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal.md
|
|
8349
8284
|
*/
|
|
8350
8285
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8351
8286
|
/**
|
|
8352
8287
|
* Prefer direct Temporal conversion methods.
|
|
8353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-temporal-conversion.md
|
|
8354
8289
|
*/
|
|
8355
8290
|
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
8356
8291
|
/**
|
|
8357
8292
|
* Prefer ternary expressions over simple `if` statements.
|
|
8358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-ternary.md
|
|
8359
8294
|
*/
|
|
8360
8295
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8361
8296
|
/**
|
|
8362
8297
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
8363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-then-catch.md
|
|
8364
8299
|
*/
|
|
8365
8300
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
8366
8301
|
/**
|
|
8367
8302
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8369
8304
|
*/
|
|
8370
8305
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8371
8306
|
/**
|
|
8372
8307
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-top-level-await.md
|
|
8374
8309
|
*/
|
|
8375
8310
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8376
8311
|
/**
|
|
8377
8312
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-error.md
|
|
8379
8314
|
*/
|
|
8380
8315
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8381
8316
|
/**
|
|
8382
8317
|
* Require type literals to be last in union types.
|
|
8383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-type-literal-last.md
|
|
8384
8319
|
*/
|
|
8385
8320
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8386
8321
|
/**
|
|
8387
8322
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
8388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8389
8324
|
*/
|
|
8390
8325
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8391
8326
|
/**
|
|
8392
8327
|
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
8393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-uint8array-hex.md
|
|
8394
8329
|
*/
|
|
8395
8330
|
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
8396
8331
|
/**
|
|
8397
8332
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unary-minus.md
|
|
8399
8334
|
*/
|
|
8400
8335
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8401
8336
|
/**
|
|
8402
8337
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8404
8339
|
*/
|
|
8405
8340
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8406
8341
|
/**
|
|
8407
8342
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-can-parse.md
|
|
8409
8344
|
*/
|
|
8410
8345
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8411
8346
|
/**
|
|
8412
8347
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-href.md
|
|
8414
8349
|
*/
|
|
8415
8350
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8416
8351
|
/**
|
|
8417
8352
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8419
8354
|
*/
|
|
8420
8355
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8421
8356
|
/**
|
|
8422
8357
|
* Prefer putting the condition in the while statement.
|
|
8423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8424
8359
|
*/
|
|
8425
8360
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8426
8361
|
/**
|
|
8427
8362
|
* Renamed to `unicorn/name-replacements`.
|
|
8428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8429
8364
|
* @deprecated
|
|
8430
8365
|
*/
|
|
8431
8366
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8432
8367
|
/**
|
|
8433
8368
|
* Enforce consistent relative URL style.
|
|
8434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/relative-url-style.md
|
|
8435
8370
|
*/
|
|
8436
8371
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8437
8372
|
/**
|
|
8438
8373
|
* Enforce using the separator argument with `Array#join()`.
|
|
8439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-join-separator.md
|
|
8440
8375
|
*/
|
|
8441
8376
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8442
8377
|
/**
|
|
8443
8378
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-array-sort-compare.md
|
|
8445
8380
|
*/
|
|
8446
8381
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8447
8382
|
/**
|
|
8448
8383
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-css-escape.md
|
|
8450
8385
|
*/
|
|
8451
8386
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8452
8387
|
/**
|
|
8453
8388
|
* Require configured YAML frontmatter fields.
|
|
8454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-frontmatter-fields.md
|
|
8455
8390
|
*/
|
|
8456
8391
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
8457
8392
|
/**
|
|
8458
8393
|
* Require non-empty module attributes for imports and exports
|
|
8459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-attributes.md
|
|
8460
8395
|
*/
|
|
8461
8396
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8462
8397
|
/**
|
|
8463
8398
|
* Require non-empty specifier list in import and export statements.
|
|
8464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-module-specifiers.md
|
|
8465
8400
|
*/
|
|
8466
8401
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8467
8402
|
/**
|
|
8468
8403
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8470
8405
|
*/
|
|
8471
8406
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8472
8407
|
/**
|
|
8473
8408
|
* Require passive event listeners for high-frequency events.
|
|
8474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-passive-events.md
|
|
8475
8410
|
*/
|
|
8476
8411
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8477
8412
|
/**
|
|
8478
8413
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-post-message-target-origin.md
|
|
8480
8415
|
*/
|
|
8481
8416
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8482
8417
|
/**
|
|
8483
8418
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8485
8420
|
*/
|
|
8486
8421
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8487
8422
|
/**
|
|
8488
8423
|
* Require streaming decoding of fetch-body chunks with `TextDecoder`.
|
|
8489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/require-text-decoder-streaming.md
|
|
8490
8425
|
*/
|
|
8491
8426
|
'unicorn/require-text-decoder-streaming'?: Linter.RuleEntry<[]>;
|
|
8492
8427
|
/**
|
|
8493
8428
|
* Enforce a consistent style for single-line block comments.
|
|
8494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/single-line-block-comment-style.md
|
|
8495
8430
|
*/
|
|
8496
8431
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
8497
8432
|
/**
|
|
8498
8433
|
* Enforce better string content.
|
|
8499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/string-content.md
|
|
8500
8435
|
*/
|
|
8501
8436
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8502
8437
|
/**
|
|
8503
8438
|
* Enforce consistent brace style for `case` clauses.
|
|
8504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-braces.md
|
|
8505
8440
|
*/
|
|
8506
8441
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8507
8442
|
/**
|
|
8508
8443
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/switch-case-break-position.md
|
|
8510
8445
|
*/
|
|
8511
8446
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8512
8447
|
/**
|
|
8513
8448
|
* Fix whitespace-insensitive template indentation.
|
|
8514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/template-indent.md
|
|
8515
8450
|
*/
|
|
8516
8451
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8517
8452
|
/**
|
|
8518
8453
|
* Enforce consistent case for text encoding identifiers.
|
|
8519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/text-encoding-identifier-case.md
|
|
8520
8455
|
*/
|
|
8521
8456
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8522
8457
|
/**
|
|
8523
8458
|
* Require `new` when creating an error.
|
|
8524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/throw-new-error.md
|
|
8525
8460
|
*/
|
|
8526
8461
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8527
8462
|
/**
|
|
8528
8463
|
* Limit the complexity of `try` blocks.
|
|
8529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v79.0.0/docs/rules/try-complexity.md
|
|
8530
8465
|
*/
|
|
8531
8466
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8532
8467
|
/**
|
|
@@ -9005,11 +8940,21 @@ interface RuleOptions {
|
|
|
9005
8940
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-macros-type-style.md
|
|
9006
8941
|
*/
|
|
9007
8942
|
'vue-perfectionist/define-macros-type-style'?: Linter.RuleEntry<VuePerfectionistDefineMacrosTypeStyle>;
|
|
8943
|
+
/**
|
|
8944
|
+
* enforce casing for explicit defineModel names.
|
|
8945
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-model-name-casing.md
|
|
8946
|
+
*/
|
|
8947
|
+
'vue-perfectionist/define-model-name-casing'?: Linter.RuleEntry<VuePerfectionistDefineModelNameCasing>;
|
|
9008
8948
|
/**
|
|
9009
8949
|
* enforce a maximum number of lines in inline callbacks for Vue APIs.
|
|
9010
8950
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/max-lines-per-callback.md
|
|
9011
8951
|
*/
|
|
9012
8952
|
'vue-perfectionist/max-lines-per-callback'?: Linter.RuleEntry<VuePerfectionistMaxLinesPerCallback>;
|
|
8953
|
+
/**
|
|
8954
|
+
* enforce limits on logical operators and conditional nesting in Vue templates.
|
|
8955
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/no-complex-template-expression.md
|
|
8956
|
+
*/
|
|
8957
|
+
'vue-perfectionist/no-complex-template-expression'?: Linter.RuleEntry<VuePerfectionistNoComplexTemplateExpression>;
|
|
9013
8958
|
/**
|
|
9014
8959
|
* disallow complex expressions in Vue v-for sources.
|
|
9015
8960
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/no-complex-v-for-source.md
|
|
@@ -9025,6 +8970,11 @@ interface RuleOptions {
|
|
|
9025
8970
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-composable-options.md
|
|
9026
8971
|
*/
|
|
9027
8972
|
'vue-perfectionist/prefer-composable-options'?: Linter.RuleEntry<VuePerfectionistPreferComposableOptions>;
|
|
8973
|
+
/**
|
|
8974
|
+
* require defineModel instead of matching prop and update event declarations.
|
|
8975
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-define-model.md
|
|
8976
|
+
*/
|
|
8977
|
+
'vue-perfectionist/prefer-define-model'?: Linter.RuleEntry<[]>;
|
|
9028
8978
|
/**
|
|
9029
8979
|
* require function declarations at the top level of SFCs and composables.
|
|
9030
8980
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-function-declaration.md
|
|
@@ -9035,6 +8985,11 @@ interface RuleOptions {
|
|
|
9035
8985
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-function-result-pattern.md
|
|
9036
8986
|
*/
|
|
9037
8987
|
'vue-perfectionist/prefer-function-result-pattern'?: Linter.RuleEntry<VuePerfectionistPreferFunctionResultPattern>;
|
|
8988
|
+
/**
|
|
8989
|
+
* require scope-based cleanup in named Vue composables.
|
|
8990
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-on-scope-dispose.md
|
|
8991
|
+
*/
|
|
8992
|
+
'vue-perfectionist/prefer-on-scope-dispose'?: Linter.RuleEntry<VuePerfectionistPreferOnScopeDispose>;
|
|
9038
8993
|
/**
|
|
9039
8994
|
* enforce a naming pattern for Vue template references.
|
|
9040
8995
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-ref-pattern.md
|
|
@@ -9055,6 +9010,11 @@ interface RuleOptions {
|
|
|
9055
9010
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-use-template-ref-inference.md
|
|
9056
9011
|
*/
|
|
9057
9012
|
'vue-perfectionist/prefer-use-template-ref-inference'?: Linter.RuleEntry<VuePerfectionistPreferUseTemplateRefInference>;
|
|
9013
|
+
/**
|
|
9014
|
+
* require dedicated aliases for post and sync watch effects.
|
|
9015
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-watch-effect-alias.md
|
|
9016
|
+
*/
|
|
9017
|
+
'vue-perfectionist/prefer-watch-effect-alias'?: Linter.RuleEntry<VuePerfectionistPreferWatchEffectAlias>;
|
|
9058
9018
|
/**
|
|
9059
9019
|
* require configured props at Vue component usage sites.
|
|
9060
9020
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-component-props.md
|
|
@@ -9065,6 +9025,11 @@ interface RuleOptions {
|
|
|
9065
9025
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-component-slots.md
|
|
9066
9026
|
*/
|
|
9067
9027
|
'vue-perfectionist/require-component-slots'?: Linter.RuleEntry<VuePerfectionistRequireComponentSlots>;
|
|
9028
|
+
/**
|
|
9029
|
+
* disallow string keys in Vue provide and inject calls.
|
|
9030
|
+
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-injection-key.md
|
|
9031
|
+
*/
|
|
9032
|
+
'vue-perfectionist/require-injection-key'?: Linter.RuleEntry<VuePerfectionistRequireInjectionKey>;
|
|
9068
9033
|
/**
|
|
9069
9034
|
* require exact call-site names for Vue macro type arguments.
|
|
9070
9035
|
* @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-macro-type-name.md
|
|
@@ -9405,11 +9370,21 @@ interface RuleOptions {
|
|
|
9405
9370
|
* @see https://eslint.vuejs.org/rules/no-constant-condition.html
|
|
9406
9371
|
*/
|
|
9407
9372
|
'vue/no-constant-condition'?: Linter.RuleEntry<VueNoConstantCondition>;
|
|
9373
|
+
/**
|
|
9374
|
+
* disallow content outside of the top-level blocks
|
|
9375
|
+
* @see https://eslint.vuejs.org/rules/no-content-outside-block.html
|
|
9376
|
+
*/
|
|
9377
|
+
'vue/no-content-outside-block'?: Linter.RuleEntry<[]>;
|
|
9408
9378
|
/**
|
|
9409
9379
|
* disallow custom modifiers on v-model used on the component
|
|
9410
9380
|
* @see https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html
|
|
9411
9381
|
*/
|
|
9412
9382
|
'vue/no-custom-modifiers-on-v-model'?: Linter.RuleEntry<[]>;
|
|
9383
|
+
/**
|
|
9384
|
+
* disallow default values in `defineModel`
|
|
9385
|
+
* @see https://eslint.vuejs.org/rules/no-define-model-default.html
|
|
9386
|
+
*/
|
|
9387
|
+
'vue/no-define-model-default'?: Linter.RuleEntry<[]>;
|
|
9413
9388
|
/**
|
|
9414
9389
|
* disallow using deprecated object declaration on data (in Vue.js 3.0.0+)
|
|
9415
9390
|
* @see https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html
|
|
@@ -9645,6 +9620,11 @@ interface RuleOptions {
|
|
|
9645
9620
|
* @see https://eslint.vuejs.org/rules/no-potential-component-option-typo.html
|
|
9646
9621
|
*/
|
|
9647
9622
|
'vue/no-potential-component-option-typo'?: Linter.RuleEntry<VueNoPotentialComponentOptionTypo>;
|
|
9623
|
+
/**
|
|
9624
|
+
* disallow declarations that shadow props in `<script setup>`
|
|
9625
|
+
* @see https://eslint.vuejs.org/rules/no-props-shadow.html
|
|
9626
|
+
*/
|
|
9627
|
+
'vue/no-props-shadow'?: Linter.RuleEntry<[]>;
|
|
9648
9628
|
/**
|
|
9649
9629
|
* disallow use of value wrapped by `ref()` (Composition API) as an operand
|
|
9650
9630
|
* @see https://eslint.vuejs.org/rules/no-ref-as-operand.html
|
|
@@ -10682,6 +10662,10 @@ type TypescriptEslintArrayType = [] | [{
|
|
|
10682
10662
|
default?: ("array" | "generic" | "array-simple");
|
|
10683
10663
|
readonly?: ("array" | "generic" | "array-simple");
|
|
10684
10664
|
}];
|
|
10665
|
+
// ----- @typescript-eslint/await-thenable -----
|
|
10666
|
+
type TypescriptEslintAwaitThenable = [] | [{
|
|
10667
|
+
allowMixedPromiseArrays?: boolean;
|
|
10668
|
+
}];
|
|
10685
10669
|
// ----- @typescript-eslint/ban-ts-comment -----
|
|
10686
10670
|
type TypescriptEslintBanTsComment = [] | [{
|
|
10687
10671
|
minimumDescriptionLength?: number;
|
|
@@ -11691,6 +11675,13 @@ type AntfuIndentUnindent = [] | [{
|
|
|
11691
11675
|
indent?: number;
|
|
11692
11676
|
tags?: string[];
|
|
11693
11677
|
}];
|
|
11678
|
+
// ----- antfu/reasonable-newline -----
|
|
11679
|
+
type AntfuReasonableNewline = [] | [{
|
|
11680
|
+
minObjectProperties?: number;
|
|
11681
|
+
objectLineLength?: number;
|
|
11682
|
+
minArrayItems?: number;
|
|
11683
|
+
arrayLineLength?: number;
|
|
11684
|
+
}];
|
|
11694
11685
|
// ----- array-bracket-newline -----
|
|
11695
11686
|
type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
11696
11687
|
multiline?: boolean;
|
|
@@ -15281,6 +15272,266 @@ type PerfectionistSortClasses = {
|
|
|
15281
15272
|
});
|
|
15282
15273
|
partitionByNewLine?: boolean;
|
|
15283
15274
|
}[];
|
|
15275
|
+
// ----- perfectionist/sort-constructor-parameters -----
|
|
15276
|
+
type PerfectionistSortConstructorParameters = [{
|
|
15277
|
+
fallbackSort?: {
|
|
15278
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15279
|
+
order?: ("asc" | "desc");
|
|
15280
|
+
};
|
|
15281
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15282
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
15283
|
+
ignoreCase?: boolean;
|
|
15284
|
+
alphabet?: string;
|
|
15285
|
+
locales?: (string | string[]);
|
|
15286
|
+
order?: ("asc" | "desc");
|
|
15287
|
+
customGroups?: ({
|
|
15288
|
+
fallbackSort?: {
|
|
15289
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15290
|
+
order?: ("asc" | "desc");
|
|
15291
|
+
};
|
|
15292
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15293
|
+
groupName: string;
|
|
15294
|
+
newlinesInside?: ("ignore" | number);
|
|
15295
|
+
order?: ("asc" | "desc");
|
|
15296
|
+
anyOf: [{
|
|
15297
|
+
elementNamePattern?: (({
|
|
15298
|
+
pattern: string;
|
|
15299
|
+
flags?: string;
|
|
15300
|
+
} | string)[] | ({
|
|
15301
|
+
pattern: string;
|
|
15302
|
+
flags?: string;
|
|
15303
|
+
} | string));
|
|
15304
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15305
|
+
selector?: "parameter";
|
|
15306
|
+
decoratorNamePattern?: (({
|
|
15307
|
+
pattern: string;
|
|
15308
|
+
flags?: string;
|
|
15309
|
+
} | string)[] | ({
|
|
15310
|
+
pattern: string;
|
|
15311
|
+
flags?: string;
|
|
15312
|
+
} | string));
|
|
15313
|
+
}, ...({
|
|
15314
|
+
elementNamePattern?: (({
|
|
15315
|
+
pattern: string;
|
|
15316
|
+
flags?: string;
|
|
15317
|
+
} | string)[] | ({
|
|
15318
|
+
pattern: string;
|
|
15319
|
+
flags?: string;
|
|
15320
|
+
} | string));
|
|
15321
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15322
|
+
selector?: "parameter";
|
|
15323
|
+
decoratorNamePattern?: (({
|
|
15324
|
+
pattern: string;
|
|
15325
|
+
flags?: string;
|
|
15326
|
+
} | string)[] | ({
|
|
15327
|
+
pattern: string;
|
|
15328
|
+
flags?: string;
|
|
15329
|
+
} | string));
|
|
15330
|
+
})[]];
|
|
15331
|
+
} | {
|
|
15332
|
+
fallbackSort?: {
|
|
15333
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15334
|
+
order?: ("asc" | "desc");
|
|
15335
|
+
};
|
|
15336
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15337
|
+
groupName: string;
|
|
15338
|
+
newlinesInside?: ("ignore" | number);
|
|
15339
|
+
order?: ("asc" | "desc");
|
|
15340
|
+
elementNamePattern?: (({
|
|
15341
|
+
pattern: string;
|
|
15342
|
+
flags?: string;
|
|
15343
|
+
} | string)[] | ({
|
|
15344
|
+
pattern: string;
|
|
15345
|
+
flags?: string;
|
|
15346
|
+
} | string));
|
|
15347
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15348
|
+
selector?: "parameter";
|
|
15349
|
+
decoratorNamePattern?: (({
|
|
15350
|
+
pattern: string;
|
|
15351
|
+
flags?: string;
|
|
15352
|
+
} | string)[] | ({
|
|
15353
|
+
pattern: string;
|
|
15354
|
+
flags?: string;
|
|
15355
|
+
} | string));
|
|
15356
|
+
})[];
|
|
15357
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
15358
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
15359
|
+
newlinesBetween: ("ignore" | number);
|
|
15360
|
+
} | {
|
|
15361
|
+
group: (string | [string, ...(string)[]]);
|
|
15362
|
+
fallbackSort?: {
|
|
15363
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15364
|
+
order?: ("asc" | "desc");
|
|
15365
|
+
};
|
|
15366
|
+
commentAbove?: string;
|
|
15367
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15368
|
+
newlinesInside?: ("ignore" | number);
|
|
15369
|
+
order?: ("asc" | "desc");
|
|
15370
|
+
})[];
|
|
15371
|
+
newlinesBetween?: ("ignore" | number);
|
|
15372
|
+
useConfigurationIf: {
|
|
15373
|
+
allNamesMatchPattern?: (({
|
|
15374
|
+
pattern: string;
|
|
15375
|
+
flags?: string;
|
|
15376
|
+
} | string)[] | ({
|
|
15377
|
+
pattern: string;
|
|
15378
|
+
flags?: string;
|
|
15379
|
+
} | string));
|
|
15380
|
+
matchesAstSelector?: string;
|
|
15381
|
+
};
|
|
15382
|
+
partitionByComment?: (boolean | (({
|
|
15383
|
+
pattern: string;
|
|
15384
|
+
flags?: string;
|
|
15385
|
+
} | string)[] | ({
|
|
15386
|
+
pattern: string;
|
|
15387
|
+
flags?: string;
|
|
15388
|
+
} | string)) | {
|
|
15389
|
+
block?: (boolean | (({
|
|
15390
|
+
pattern: string;
|
|
15391
|
+
flags?: string;
|
|
15392
|
+
} | string)[] | ({
|
|
15393
|
+
pattern: string;
|
|
15394
|
+
flags?: string;
|
|
15395
|
+
} | string)));
|
|
15396
|
+
line?: (boolean | (({
|
|
15397
|
+
pattern: string;
|
|
15398
|
+
flags?: string;
|
|
15399
|
+
} | string)[] | ({
|
|
15400
|
+
pattern: string;
|
|
15401
|
+
flags?: string;
|
|
15402
|
+
} | string)));
|
|
15403
|
+
});
|
|
15404
|
+
partitionByNewLine?: boolean;
|
|
15405
|
+
}, ...({
|
|
15406
|
+
fallbackSort?: {
|
|
15407
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15408
|
+
order?: ("asc" | "desc");
|
|
15409
|
+
};
|
|
15410
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15411
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
15412
|
+
ignoreCase?: boolean;
|
|
15413
|
+
alphabet?: string;
|
|
15414
|
+
locales?: (string | string[]);
|
|
15415
|
+
order?: ("asc" | "desc");
|
|
15416
|
+
customGroups?: ({
|
|
15417
|
+
fallbackSort?: {
|
|
15418
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15419
|
+
order?: ("asc" | "desc");
|
|
15420
|
+
};
|
|
15421
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15422
|
+
groupName: string;
|
|
15423
|
+
newlinesInside?: ("ignore" | number);
|
|
15424
|
+
order?: ("asc" | "desc");
|
|
15425
|
+
anyOf: [{
|
|
15426
|
+
elementNamePattern?: (({
|
|
15427
|
+
pattern: string;
|
|
15428
|
+
flags?: string;
|
|
15429
|
+
} | string)[] | ({
|
|
15430
|
+
pattern: string;
|
|
15431
|
+
flags?: string;
|
|
15432
|
+
} | string));
|
|
15433
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15434
|
+
selector?: "parameter";
|
|
15435
|
+
decoratorNamePattern?: (({
|
|
15436
|
+
pattern: string;
|
|
15437
|
+
flags?: string;
|
|
15438
|
+
} | string)[] | ({
|
|
15439
|
+
pattern: string;
|
|
15440
|
+
flags?: string;
|
|
15441
|
+
} | string));
|
|
15442
|
+
}, ...({
|
|
15443
|
+
elementNamePattern?: (({
|
|
15444
|
+
pattern: string;
|
|
15445
|
+
flags?: string;
|
|
15446
|
+
} | string)[] | ({
|
|
15447
|
+
pattern: string;
|
|
15448
|
+
flags?: string;
|
|
15449
|
+
} | string));
|
|
15450
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15451
|
+
selector?: "parameter";
|
|
15452
|
+
decoratorNamePattern?: (({
|
|
15453
|
+
pattern: string;
|
|
15454
|
+
flags?: string;
|
|
15455
|
+
} | string)[] | ({
|
|
15456
|
+
pattern: string;
|
|
15457
|
+
flags?: string;
|
|
15458
|
+
} | string));
|
|
15459
|
+
})[]];
|
|
15460
|
+
} | {
|
|
15461
|
+
fallbackSort?: {
|
|
15462
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15463
|
+
order?: ("asc" | "desc");
|
|
15464
|
+
};
|
|
15465
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15466
|
+
groupName: string;
|
|
15467
|
+
newlinesInside?: ("ignore" | number);
|
|
15468
|
+
order?: ("asc" | "desc");
|
|
15469
|
+
elementNamePattern?: (({
|
|
15470
|
+
pattern: string;
|
|
15471
|
+
flags?: string;
|
|
15472
|
+
} | string)[] | ({
|
|
15473
|
+
pattern: string;
|
|
15474
|
+
flags?: string;
|
|
15475
|
+
} | string));
|
|
15476
|
+
modifiers?: ("decorated" | "override" | "readonly" | "protected" | "private" | "public")[];
|
|
15477
|
+
selector?: "parameter";
|
|
15478
|
+
decoratorNamePattern?: (({
|
|
15479
|
+
pattern: string;
|
|
15480
|
+
flags?: string;
|
|
15481
|
+
} | string)[] | ({
|
|
15482
|
+
pattern: string;
|
|
15483
|
+
flags?: string;
|
|
15484
|
+
} | string));
|
|
15485
|
+
})[];
|
|
15486
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
15487
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
15488
|
+
newlinesBetween: ("ignore" | number);
|
|
15489
|
+
} | {
|
|
15490
|
+
group: (string | [string, ...(string)[]]);
|
|
15491
|
+
fallbackSort?: {
|
|
15492
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15493
|
+
order?: ("asc" | "desc");
|
|
15494
|
+
};
|
|
15495
|
+
commentAbove?: string;
|
|
15496
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
15497
|
+
newlinesInside?: ("ignore" | number);
|
|
15498
|
+
order?: ("asc" | "desc");
|
|
15499
|
+
})[];
|
|
15500
|
+
newlinesBetween?: ("ignore" | number);
|
|
15501
|
+
useConfigurationIf: {
|
|
15502
|
+
allNamesMatchPattern?: (({
|
|
15503
|
+
pattern: string;
|
|
15504
|
+
flags?: string;
|
|
15505
|
+
} | string)[] | ({
|
|
15506
|
+
pattern: string;
|
|
15507
|
+
flags?: string;
|
|
15508
|
+
} | string));
|
|
15509
|
+
matchesAstSelector?: string;
|
|
15510
|
+
};
|
|
15511
|
+
partitionByComment?: (boolean | (({
|
|
15512
|
+
pattern: string;
|
|
15513
|
+
flags?: string;
|
|
15514
|
+
} | string)[] | ({
|
|
15515
|
+
pattern: string;
|
|
15516
|
+
flags?: string;
|
|
15517
|
+
} | string)) | {
|
|
15518
|
+
block?: (boolean | (({
|
|
15519
|
+
pattern: string;
|
|
15520
|
+
flags?: string;
|
|
15521
|
+
} | string)[] | ({
|
|
15522
|
+
pattern: string;
|
|
15523
|
+
flags?: string;
|
|
15524
|
+
} | string)));
|
|
15525
|
+
line?: (boolean | (({
|
|
15526
|
+
pattern: string;
|
|
15527
|
+
flags?: string;
|
|
15528
|
+
} | string)[] | ({
|
|
15529
|
+
pattern: string;
|
|
15530
|
+
flags?: string;
|
|
15531
|
+
} | string)));
|
|
15532
|
+
});
|
|
15533
|
+
partitionByNewLine?: boolean;
|
|
15534
|
+
})[]];
|
|
15284
15535
|
// ----- perfectionist/sort-decorators -----
|
|
15285
15536
|
type PerfectionistSortDecorators = {
|
|
15286
15537
|
fallbackSort?: {
|
|
@@ -18747,6 +18998,9 @@ type UnicornClassReferenceInStaticMethods = [] | [{
|
|
|
18747
18998
|
}];
|
|
18748
18999
|
// ----- unicorn/comment-content -----
|
|
18749
19000
|
type UnicornCommentContent = [] | [{
|
|
19001
|
+
ignore?: (string | {
|
|
19002
|
+
[k: string]: unknown | undefined;
|
|
19003
|
+
})[];
|
|
18750
19004
|
checkUniformCase?: boolean;
|
|
18751
19005
|
extendDefaultReplacements?: boolean;
|
|
18752
19006
|
replacements?: {
|
|
@@ -19023,6 +19277,7 @@ type UnicornNoNull = [] | [{
|
|
|
19023
19277
|
}];
|
|
19024
19278
|
// ----- unicorn/no-top-level-side-effects -----
|
|
19025
19279
|
type UnicornNoTopLevelSideEffects = [] | [{
|
|
19280
|
+
checkUnknownCalls?: boolean;
|
|
19026
19281
|
allow?: {
|
|
19027
19282
|
[k: string]: string[] | undefined;
|
|
19028
19283
|
};
|
|
@@ -19438,6 +19693,11 @@ type VuePerfectionistDefineMacrosTypeStyle = [] | [{
|
|
|
19438
19693
|
defineSlots?: (("inline" | "local" | "imported") | [("inline" | "local" | "imported"), ...(("inline" | "local" | "imported"))[]] | false);
|
|
19439
19694
|
};
|
|
19440
19695
|
}];
|
|
19696
|
+
// ----- vue-perfectionist/define-model-name-casing -----
|
|
19697
|
+
type VuePerfectionistDefineModelNameCasing = [] | [{
|
|
19698
|
+
casing?: ("camelCase" | "PascalCase" | "kebab-case" | "snake_case");
|
|
19699
|
+
fix?: boolean;
|
|
19700
|
+
}];
|
|
19441
19701
|
// ----- vue-perfectionist/max-lines-per-callback -----
|
|
19442
19702
|
type VuePerfectionistMaxLinesPerCallback = [] | [{
|
|
19443
19703
|
customCallbacks?: {
|
|
@@ -19454,6 +19714,14 @@ type VuePerfectionistMaxLinesPerCallback = [] | [{
|
|
|
19454
19714
|
skipBlankLines?: boolean;
|
|
19455
19715
|
skipComments?: boolean;
|
|
19456
19716
|
}];
|
|
19717
|
+
// ----- vue-perfectionist/no-complex-template-expression -----
|
|
19718
|
+
type VuePerfectionistNoComplexTemplateExpression = [] | [{
|
|
19719
|
+
maxLogicalExpressions?: number;
|
|
19720
|
+
maxConditionalDepth?: number;
|
|
19721
|
+
directives?: ("if" | "else-if" | "show" | "bind" | "text" | "html" | "model" | "memo")[];
|
|
19722
|
+
checkInterpolations?: boolean;
|
|
19723
|
+
ignoreScopeReferences?: boolean;
|
|
19724
|
+
}];
|
|
19457
19725
|
// ----- vue-perfectionist/no-complex-v-for-source -----
|
|
19458
19726
|
type VuePerfectionistNoComplexVForSource = [] | [{
|
|
19459
19727
|
allowCallExpression?: boolean;
|
|
@@ -19491,6 +19759,14 @@ type VuePerfectionistPreferFunctionResultPattern = [] | [{
|
|
|
19491
19759
|
autoImport?: boolean;
|
|
19492
19760
|
}[];
|
|
19493
19761
|
}];
|
|
19762
|
+
// ----- vue-perfectionist/prefer-on-scope-dispose -----
|
|
19763
|
+
type VuePerfectionistPreferOnScopeDispose = [] | [{
|
|
19764
|
+
functionPattern?: string;
|
|
19765
|
+
ignoreNames?: string[];
|
|
19766
|
+
hooks?: ("onUnmounted" | "onBeforeUnmount")[];
|
|
19767
|
+
vueGlobals?: string[];
|
|
19768
|
+
vueImportSources?: string[];
|
|
19769
|
+
}];
|
|
19494
19770
|
// ----- vue-perfectionist/prefer-ref-pattern -----
|
|
19495
19771
|
type VuePerfectionistPreferRefPattern = [] | [{
|
|
19496
19772
|
pattern?: string;
|
|
@@ -19510,6 +19786,11 @@ type VuePerfectionistPreferTemplateLiteralInInterpolation = [] | [{
|
|
|
19510
19786
|
type VuePerfectionistPreferUseTemplateRefInference = [] | [{
|
|
19511
19787
|
ignoreRefs?: string[];
|
|
19512
19788
|
}];
|
|
19789
|
+
// ----- vue-perfectionist/prefer-watch-effect-alias -----
|
|
19790
|
+
type VuePerfectionistPreferWatchEffectAlias = [] | [{
|
|
19791
|
+
vueGlobals?: string[];
|
|
19792
|
+
vueImportSources?: string[];
|
|
19793
|
+
}];
|
|
19513
19794
|
// ----- vue-perfectionist/require-component-props -----
|
|
19514
19795
|
type VuePerfectionistRequireComponentProps = [] | [{
|
|
19515
19796
|
targets?: {
|
|
@@ -19526,6 +19807,13 @@ type VuePerfectionistRequireComponentSlots = [] | [{
|
|
|
19526
19807
|
}[];
|
|
19527
19808
|
unknownSlots?: ("report" | "ignore");
|
|
19528
19809
|
}];
|
|
19810
|
+
// ----- vue-perfectionist/require-injection-key -----
|
|
19811
|
+
type VuePerfectionistRequireInjectionKey = [] | [{
|
|
19812
|
+
strict?: boolean;
|
|
19813
|
+
allowStrings?: string[];
|
|
19814
|
+
vueGlobals?: string[];
|
|
19815
|
+
vueImportSources?: string[];
|
|
19816
|
+
}];
|
|
19529
19817
|
// ----- vue-perfectionist/require-macro-type-name -----
|
|
19530
19818
|
type VuePerfectionistRequireMacroTypeName = [] | [{
|
|
19531
19819
|
macros?: {
|
|
@@ -19780,6 +20068,7 @@ type VueBlockLang = [] | [{
|
|
|
19780
20068
|
[k: string]: {
|
|
19781
20069
|
lang?: (string | string[]);
|
|
19782
20070
|
allowNoLang?: boolean;
|
|
20071
|
+
required?: boolean;
|
|
19783
20072
|
};
|
|
19784
20073
|
}];
|
|
19785
20074
|
// ----- vue/block-order -----
|
|
@@ -20822,6 +21111,7 @@ type VueRequireDirectExport = [] | [{
|
|
|
20822
21111
|
// ----- vue/require-explicit-emits -----
|
|
20823
21112
|
type VueRequireExplicitEmits = [] | [{
|
|
20824
21113
|
allowProps?: boolean;
|
|
21114
|
+
ignoreMixins?: boolean;
|
|
20825
21115
|
}];
|
|
20826
21116
|
// ----- vue/require-macro-variable-name -----
|
|
20827
21117
|
type VueRequireMacroVariableName = [] | [{
|
|
@@ -21177,8 +21467,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
21177
21467
|
}];
|
|
21178
21468
|
// Names of all the configs
|
|
21179
21469
|
type ConfigNames = 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/jsx' | 'ntnyq/node' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/javascript/recommended' | 'ntnyq/javascript/core' | 'ntnyq/import-x' | 'ntnyq/jsdoc/base' | 'ntnyq/jsdoc/javascript' | 'ntnyq/jsdoc/typescript' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/unicorn' | 'ntnyq/pinia' | 'ntnyq/de-morgan' | 'ntnyq/regexp' | 'ntnyq/typescript/setup' | 'ntnyq/typescript/parser' | 'ntnyq/typescript/parser-type-aware' | 'ntnyq/typescript/rules' | 'ntnyq/typescript/rules/type-aware' | 'ntnyq/typescript/types' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/vue/vue-perfectionist' | 'ntnyq/yml' | 'ntnyq/toml' | 'ntnyq/jsonc' | 'ntnyq/astro' | 'ntnyq/svelte' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/json-schema' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/unocss' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/code-blocks' | 'ntnyq/antfu' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/ntnyq' | 'ntnyq/github-action' | 'ntnyq/eslint-plugin' | 'ntnyq/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | 'ntnyq/svgo' | 'ntnyq/html' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/specials/shadcn-vue' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/oxfmt/native-files' | 'ntnyq/oxfmt/plain-parser-files';
|
|
21180
|
-
//#endregion
|
|
21181
|
-
//#region src/types/eslint.d.ts
|
|
21182
21470
|
/**
|
|
21183
21471
|
* ESLint config
|
|
21184
21472
|
*/
|
|
@@ -21218,8 +21506,6 @@ export type TypedConfigItem = Omit<Linter.Config<ESLintRulesRecord & RuleOptions
|
|
|
21218
21506
|
*/
|
|
21219
21507
|
plugins?: Record<string, any>;
|
|
21220
21508
|
};
|
|
21221
|
-
//#endregion
|
|
21222
|
-
//#region src/types/options.d.ts
|
|
21223
21509
|
/**
|
|
21224
21510
|
* Options for overrides `files`
|
|
21225
21511
|
*/
|
|
@@ -21266,8 +21552,6 @@ export interface OptionsShareable {
|
|
|
21266
21552
|
*/
|
|
21267
21553
|
typescript?: boolean;
|
|
21268
21554
|
}
|
|
21269
|
-
//#endregion
|
|
21270
|
-
//#region src/types/config.d.ts
|
|
21271
21555
|
/**
|
|
21272
21556
|
* Config factory options
|
|
21273
21557
|
*/
|
|
@@ -21329,22 +21613,16 @@ export interface ConfigOptions {
|
|
|
21329
21613
|
svgo?: boolean | ConfigSVGOOptions;
|
|
21330
21614
|
unusedImports?: boolean | ConfigUnusedImportsOptions;
|
|
21331
21615
|
}
|
|
21332
|
-
//#endregion
|
|
21333
|
-
//#region src/types/prettier.d.ts
|
|
21334
21616
|
/**
|
|
21335
21617
|
* Prettier options
|
|
21336
21618
|
*/
|
|
21337
21619
|
export type PrettierOptions = Pick<Options$1, 'arrowParens' | 'bracketSameLine' | 'bracketSpacing' | 'embeddedLanguageFormatting' | 'endOfLine' | 'experimentalOperatorPosition' | 'experimentalTernaries' | 'htmlWhitespaceSensitivity' | 'insertPragma' | 'jsxSingleQuote' | 'objectWrap' | 'plugins' | 'printWidth' | 'proseWrap' | 'quoteProps' | 'rangeEnd' | 'rangeStart' | 'requirePragma' | 'semi' | 'singleAttributePerLine' | 'singleQuote' | 'tabWidth' | 'trailingComma' | 'useTabs' | 'vueIndentScriptAndStyle'> & {
|
|
21338
21620
|
parser?: BuiltInParserName;
|
|
21339
21621
|
};
|
|
21340
|
-
//#endregion
|
|
21341
|
-
//#region src/core.d.ts
|
|
21342
21622
|
/**
|
|
21343
21623
|
* Config factory
|
|
21344
21624
|
*/
|
|
21345
21625
|
export declare function defineESLintConfig(options?: ConfigOptions, ...userConfigs: Awaitable<TypedConfigItem | TypedConfigItem[] | ESLintConfig[]>[]): FlatConfigComposer<TypedConfigItem, ConfigNames>;
|
|
21346
|
-
//#endregion
|
|
21347
|
-
//#region src/globs.d.ts
|
|
21348
21626
|
/**
|
|
21349
21627
|
* @file globs constants
|
|
21350
21628
|
*/
|
|
@@ -21392,8 +21670,6 @@ export declare const GLOB_NODE_MODULES: string;
|
|
|
21392
21670
|
export declare const GLOB_DIST: string;
|
|
21393
21671
|
export declare const GLOB_LOCKFILE: string[];
|
|
21394
21672
|
export declare const GLOB_EXCLUDE: string[];
|
|
21395
|
-
//#endregion
|
|
21396
|
-
//#region src/utils/env.d.ts
|
|
21397
21673
|
type ExistChecker = () => boolean;
|
|
21398
21674
|
/**
|
|
21399
21675
|
* Check whether Pinia is available in the current project.
|
|
@@ -21431,8 +21707,6 @@ export declare const hasPrettier: ExistChecker;
|
|
|
21431
21707
|
* Check whether AutoImport is available in the current project.
|
|
21432
21708
|
*/
|
|
21433
21709
|
export declare const hasAutoImport: ExistChecker;
|
|
21434
|
-
//#endregion
|
|
21435
|
-
//#region src/utils/getOverrides.d.ts
|
|
21436
21710
|
/**
|
|
21437
21711
|
* Read rule overrides from a config sub-option.
|
|
21438
21712
|
*
|
|
@@ -21441,8 +21715,6 @@ export declare const hasAutoImport: ExistChecker;
|
|
|
21441
21715
|
* @returns Rule override map when provided, otherwise an empty object.
|
|
21442
21716
|
*/
|
|
21443
21717
|
export declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<TypedConfigItem['rules'] & RuleOptions>;
|
|
21444
|
-
//#endregion
|
|
21445
|
-
//#region src/utils/ensurePackages.d.ts
|
|
21446
21718
|
/**
|
|
21447
21719
|
* @copyright {@link https://github.com/antfu/eslint-config}
|
|
21448
21720
|
*/
|
|
@@ -21455,16 +21727,12 @@ export declare function getOverrides<K extends keyof ConfigOptions>(options: Con
|
|
|
21455
21727
|
* @param packages - Package names to verify and optionally install.
|
|
21456
21728
|
*/
|
|
21457
21729
|
export declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
|
|
21458
|
-
//#endregion
|
|
21459
|
-
//#region src/utils/interopDefault.d.ts
|
|
21460
21730
|
/**
|
|
21461
21731
|
* Interop default export from a module
|
|
21462
21732
|
* @param mod - The module
|
|
21463
21733
|
* @returns The default export
|
|
21464
21734
|
*/
|
|
21465
21735
|
export declare function interopDefault<T>(mod: Awaitable<T>): Promise<InteropModuleDefault<T>>;
|
|
21466
|
-
//#endregion
|
|
21467
|
-
//#region src/utils/resolveSubOptions.d.ts
|
|
21468
21736
|
/**
|
|
21469
21737
|
* Normalize a sub-option value to an object.
|
|
21470
21738
|
*
|
|
@@ -21476,14 +21744,10 @@ export declare function interopDefault<T>(mod: Awaitable<T>): Promise<InteropMod
|
|
|
21476
21744
|
* @returns Normalized sub-options object.
|
|
21477
21745
|
*/
|
|
21478
21746
|
export declare function resolveSubOptions<T extends Record<string, any>, K extends keyof T>(options: T, key: K): Partial<ResolvedOptions<T[K]>>;
|
|
21479
|
-
//#endregion
|
|
21480
|
-
//#region src/utils/isInGitHooksOrRunBySpecifyPackages.d.ts
|
|
21481
21747
|
/**
|
|
21482
21748
|
* Detect whether current execution is triggered by git hook tooling.
|
|
21483
21749
|
*/
|
|
21484
21750
|
export declare function isInGitHooksOrRunBySpecifyPackages(): boolean;
|
|
21485
|
-
//#endregion
|
|
21486
|
-
//#region src/constants/perfectionist.d.ts
|
|
21487
21751
|
/**
|
|
21488
21752
|
* Shared constants about eslint-plugin-perfectionist
|
|
21489
21753
|
*
|
|
@@ -21515,5 +21779,4 @@ export declare const PERFECTIONIST: Readonly<{
|
|
|
21515
21779
|
sortNamedImportsGroups: string[];
|
|
21516
21780
|
sortObjectsGroups: string[];
|
|
21517
21781
|
}>;
|
|
21518
|
-
//#endregion
|
|
21519
21782
|
export { type ConfigNames, type RuleOptions, configsTypeScript, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginDeMorgan, pluginDepend, pluginESLintComments, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginOxfmt, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginVuePerfectionist, pluginYml, processorPassThrough, processorVueBlocks };
|