@lincy/eslint-config 4.6.0 → 4.6.2
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/README.md +19 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.cts +71 -79
- package/dist/index.d.ts +71 -79
- package/dist/index.js +5 -4
- package/package.json +17 -16
package/README.md
CHANGED
|
@@ -91,7 +91,12 @@ export default lincy()
|
|
|
91
91
|
"json",
|
|
92
92
|
"jsonc",
|
|
93
93
|
"yaml",
|
|
94
|
-
"toml"
|
|
94
|
+
"toml",
|
|
95
|
+
"css",
|
|
96
|
+
"less",
|
|
97
|
+
"scss",
|
|
98
|
+
"pcss",
|
|
99
|
+
"postcss"
|
|
95
100
|
]
|
|
96
101
|
}
|
|
97
102
|
```
|
|
@@ -204,6 +209,12 @@ export default lincy({
|
|
|
204
209
|
* @example 可选: false | { files?: string[] }
|
|
205
210
|
*/
|
|
206
211
|
markdown: false,
|
|
212
|
+
/**
|
|
213
|
+
* 是否启用 regexp 规则
|
|
214
|
+
* @default 默认值: true,
|
|
215
|
+
* @example 可选: false | { level?: 'error' | 'warn' }
|
|
216
|
+
*/
|
|
217
|
+
regexp: true,
|
|
207
218
|
/**
|
|
208
219
|
* 是否启用 formatters 规则
|
|
209
220
|
* @default 默认值: false,
|
|
@@ -249,6 +260,9 @@ export default lincy({
|
|
|
249
260
|
},
|
|
250
261
|
unocss: {
|
|
251
262
|
// unocss 规则
|
|
263
|
+
},
|
|
264
|
+
regexp: {
|
|
265
|
+
// regexp 规则
|
|
252
266
|
}
|
|
253
267
|
},
|
|
254
268
|
|
|
@@ -321,6 +335,7 @@ import {
|
|
|
321
335
|
node,
|
|
322
336
|
perfectionist,
|
|
323
337
|
react,
|
|
338
|
+
regexp,
|
|
324
339
|
sortPackageJson,
|
|
325
340
|
sortTsconfig,
|
|
326
341
|
stylistic,
|
|
@@ -350,6 +365,7 @@ export default combine(
|
|
|
350
365
|
yaml(),
|
|
351
366
|
toml(),
|
|
352
367
|
markdown(),
|
|
368
|
+
regexp(),
|
|
353
369
|
)
|
|
354
370
|
```
|
|
355
371
|
|
|
@@ -397,6 +413,7 @@ export default lincy(
|
|
|
397
413
|
jsonc: true,
|
|
398
414
|
yaml: true,
|
|
399
415
|
markdown: true,
|
|
416
|
+
regexp: true,
|
|
400
417
|
overrides: {}
|
|
401
418
|
},
|
|
402
419
|
{
|
|
@@ -450,6 +467,7 @@ export default lincy({
|
|
|
450
467
|
jsonc: {},
|
|
451
468
|
markdown: {},
|
|
452
469
|
test: {},
|
|
470
|
+
regexp: {},
|
|
453
471
|
|
|
454
472
|
// 追加自定义排除文件(夹)
|
|
455
473
|
ignores: [
|
package/dist/index.cjs
CHANGED
|
@@ -758,7 +758,7 @@ var parserPlain2 = __toESM(require("eslint-parser-plain"), 1);
|
|
|
758
758
|
var StylisticConfigDefaults = {
|
|
759
759
|
indent: 4,
|
|
760
760
|
jsx: true,
|
|
761
|
-
lessOpinionated:
|
|
761
|
+
lessOpinionated: false,
|
|
762
762
|
quotes: "single",
|
|
763
763
|
semi: false
|
|
764
764
|
};
|
|
@@ -796,11 +796,12 @@ async function stylistic(options = {}) {
|
|
|
796
796
|
...lessOpinionated ? {
|
|
797
797
|
curly: ["error", "all"]
|
|
798
798
|
} : {
|
|
799
|
+
"antfu/curly": "error",
|
|
799
800
|
"antfu/if-newline": "error",
|
|
800
|
-
"antfu/top-level-function": "error"
|
|
801
|
-
"curly": ["error", "multi-or-nest", "consistent"]
|
|
801
|
+
"antfu/top-level-function": "error"
|
|
802
802
|
},
|
|
803
803
|
// 覆盖`stylistic`默认规则
|
|
804
|
+
"style/brace-style": ["error", "stroustrup"],
|
|
804
805
|
"style/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
|
|
805
806
|
"style/multiline-ternary": ["error", "never"],
|
|
806
807
|
...overrides
|
|
@@ -1814,7 +1815,7 @@ async function vue(options = {}) {
|
|
|
1814
1815
|
"vue/arrow-spacing": ["error", { after: true, before: true }],
|
|
1815
1816
|
"vue/block-spacing": ["error", "always"],
|
|
1816
1817
|
"vue/block-tag-newline": ["error", { multiline: "always", singleline: "always" }],
|
|
1817
|
-
"vue/brace-style": ["error", "stroustrup", { allowSingleLine:
|
|
1818
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: false }],
|
|
1818
1819
|
"vue/comma-dangle": ["error", "always-multiline"],
|
|
1819
1820
|
"vue/comma-spacing": ["error", { after: true, before: false }],
|
|
1820
1821
|
"vue/comma-style": ["error", "last"],
|
package/dist/index.d.cts
CHANGED
|
@@ -119,6 +119,11 @@ interface RuleOptions {
|
|
|
119
119
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
|
|
120
120
|
*/
|
|
121
121
|
'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
|
|
122
|
+
/**
|
|
123
|
+
* Enforce Anthony's style of curly bracket
|
|
124
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
|
|
125
|
+
*/
|
|
126
|
+
'antfu/curly'?: Linter.RuleEntry<[]>
|
|
122
127
|
/**
|
|
123
128
|
* Newline after if
|
|
124
129
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
|
|
@@ -471,42 +476,42 @@ interface RuleOptions {
|
|
|
471
476
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
472
477
|
/**
|
|
473
478
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
474
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
479
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
|
|
475
480
|
*/
|
|
476
481
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
477
482
|
/**
|
|
478
483
|
* Ensure a default export is present, given a default import.
|
|
479
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
484
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
|
|
480
485
|
*/
|
|
481
486
|
'import/default'?: Linter.RuleEntry<[]>
|
|
482
487
|
/**
|
|
483
488
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
484
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
489
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
|
|
485
490
|
*/
|
|
486
491
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
487
492
|
/**
|
|
488
493
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
489
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
494
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
|
|
490
495
|
*/
|
|
491
496
|
'import/export'?: Linter.RuleEntry<[]>
|
|
492
497
|
/**
|
|
493
498
|
* Ensure all exports appear after other statements.
|
|
494
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
499
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
|
|
495
500
|
*/
|
|
496
501
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
497
502
|
/**
|
|
498
503
|
* Ensure consistent use of file extension within the import path.
|
|
499
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
504
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
|
|
500
505
|
*/
|
|
501
506
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
502
507
|
/**
|
|
503
508
|
* Ensure all imports appear before other statements.
|
|
504
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
509
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
|
|
505
510
|
*/
|
|
506
511
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
507
512
|
/**
|
|
508
513
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
509
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
514
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
|
|
510
515
|
*/
|
|
511
516
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
512
517
|
/**
|
|
@@ -517,182 +522,182 @@ interface RuleOptions {
|
|
|
517
522
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
518
523
|
/**
|
|
519
524
|
* Enforce the maximum number of dependencies a module can have.
|
|
520
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
525
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
|
|
521
526
|
*/
|
|
522
527
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
523
528
|
/**
|
|
524
529
|
* Ensure named imports correspond to a named export in the remote file.
|
|
525
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
530
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
|
|
526
531
|
*/
|
|
527
532
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
528
533
|
/**
|
|
529
534
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
530
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
535
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
|
|
531
536
|
*/
|
|
532
537
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
533
538
|
/**
|
|
534
539
|
* Enforce a newline after import statements.
|
|
535
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
540
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
|
|
536
541
|
*/
|
|
537
542
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
538
543
|
/**
|
|
539
544
|
* Forbid import of modules using absolute paths.
|
|
540
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
545
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
|
|
541
546
|
*/
|
|
542
547
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
543
548
|
/**
|
|
544
549
|
* Forbid AMD `require` and `define` calls.
|
|
545
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
550
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
|
|
546
551
|
*/
|
|
547
552
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
548
553
|
/**
|
|
549
554
|
* Forbid anonymous values as default exports.
|
|
550
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
555
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
|
|
551
556
|
*/
|
|
552
557
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
553
558
|
/**
|
|
554
559
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
555
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
560
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
|
|
556
561
|
*/
|
|
557
562
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
558
563
|
/**
|
|
559
564
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
560
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
565
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
|
|
561
566
|
*/
|
|
562
567
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
563
568
|
/**
|
|
564
569
|
* Forbid default exports.
|
|
565
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
570
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
|
|
566
571
|
*/
|
|
567
572
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
568
573
|
/**
|
|
569
574
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
570
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
575
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
|
|
571
576
|
*/
|
|
572
577
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
573
578
|
/**
|
|
574
579
|
* Forbid repeated import of the same module in multiple places.
|
|
575
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
580
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
|
|
576
581
|
*/
|
|
577
582
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
578
583
|
/**
|
|
579
584
|
* Forbid `require()` calls with expressions.
|
|
580
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
585
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
|
|
581
586
|
*/
|
|
582
587
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
583
588
|
/**
|
|
584
589
|
* Forbid empty named import blocks.
|
|
585
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
590
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
|
|
586
591
|
*/
|
|
587
592
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
588
593
|
/**
|
|
589
594
|
* Forbid the use of extraneous packages.
|
|
590
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
595
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
|
|
591
596
|
*/
|
|
592
597
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
593
598
|
/**
|
|
594
599
|
* Forbid import statements with CommonJS module.exports.
|
|
595
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
600
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
|
|
596
601
|
*/
|
|
597
602
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
598
603
|
/**
|
|
599
604
|
* Forbid importing the submodules of other modules.
|
|
600
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
605
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
|
|
601
606
|
*/
|
|
602
607
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
603
608
|
/**
|
|
604
609
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
605
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
610
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
|
|
606
611
|
*/
|
|
607
612
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
608
613
|
/**
|
|
609
614
|
* Forbid use of exported name as identifier of default export.
|
|
610
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
615
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
|
|
611
616
|
*/
|
|
612
617
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
613
618
|
/**
|
|
614
619
|
* Forbid use of exported name as property of default export.
|
|
615
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
620
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
|
|
616
621
|
*/
|
|
617
622
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
618
623
|
/**
|
|
619
624
|
* Forbid named default exports.
|
|
620
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
625
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
|
|
621
626
|
*/
|
|
622
627
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
623
628
|
/**
|
|
624
629
|
* Forbid named exports.
|
|
625
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
630
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
|
|
626
631
|
*/
|
|
627
632
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
628
633
|
/**
|
|
629
634
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
630
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
635
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
|
|
631
636
|
*/
|
|
632
637
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
633
638
|
/**
|
|
634
639
|
* Forbid Node.js builtin modules.
|
|
635
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
640
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
|
|
636
641
|
*/
|
|
637
642
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
638
643
|
/**
|
|
639
644
|
* Forbid importing packages through relative paths.
|
|
640
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
645
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
|
|
641
646
|
*/
|
|
642
647
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
643
648
|
/**
|
|
644
649
|
* Forbid importing modules from parent directories.
|
|
645
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
650
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
|
|
646
651
|
*/
|
|
647
652
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
648
653
|
/**
|
|
649
654
|
* Enforce which files can be imported in a given folder.
|
|
650
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
655
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
|
|
651
656
|
*/
|
|
652
657
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
653
658
|
/**
|
|
654
659
|
* Forbid a module from importing itself.
|
|
655
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
660
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
|
|
656
661
|
*/
|
|
657
662
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
658
663
|
/**
|
|
659
664
|
* Forbid unassigned imports.
|
|
660
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
665
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
|
|
661
666
|
*/
|
|
662
667
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
663
668
|
/**
|
|
664
669
|
* Ensure imports point to a file/module that can be resolved.
|
|
665
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
670
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
|
|
666
671
|
*/
|
|
667
672
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
668
673
|
/**
|
|
669
674
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
670
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
675
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
|
|
671
676
|
*/
|
|
672
677
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
673
678
|
/**
|
|
674
679
|
* Forbid unnecessary path segments in import and require statements.
|
|
675
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
680
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
|
|
676
681
|
*/
|
|
677
682
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
678
683
|
/**
|
|
679
684
|
* Forbid webpack loader syntax in imports.
|
|
680
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
685
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
|
|
681
686
|
*/
|
|
682
687
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
683
688
|
/**
|
|
684
689
|
* Enforce a convention in module import order.
|
|
685
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
690
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
|
|
686
691
|
*/
|
|
687
692
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
688
693
|
/**
|
|
689
694
|
* Prefer a default export if module exports a single name or multiple names.
|
|
690
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
695
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
|
|
691
696
|
*/
|
|
692
697
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
693
698
|
/**
|
|
694
699
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
695
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
700
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
|
|
696
701
|
*/
|
|
697
702
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
698
703
|
/**
|
|
@@ -1216,6 +1221,7 @@ interface RuleOptions {
|
|
|
1216
1221
|
/**
|
|
1217
1222
|
* Enforce position of line comments
|
|
1218
1223
|
* @see https://eslint.org/docs/latest/rules/line-comment-position
|
|
1224
|
+
* @deprecated
|
|
1219
1225
|
*/
|
|
1220
1226
|
'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
|
|
1221
1227
|
/**
|
|
@@ -1297,6 +1303,7 @@ interface RuleOptions {
|
|
|
1297
1303
|
/**
|
|
1298
1304
|
* Enforce a particular style for multiline comments
|
|
1299
1305
|
* @see https://eslint.org/docs/latest/rules/multiline-comment-style
|
|
1306
|
+
* @deprecated
|
|
1300
1307
|
*/
|
|
1301
1308
|
'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
|
|
1302
1309
|
/**
|
|
@@ -1669,7 +1676,7 @@ interface RuleOptions {
|
|
|
1669
1676
|
* Disallow characters which are made with multiple code points in character class syntax
|
|
1670
1677
|
* @see https://eslint.org/docs/latest/rules/no-misleading-character-class
|
|
1671
1678
|
*/
|
|
1672
|
-
'no-misleading-character-class'?: Linter.RuleEntry<
|
|
1679
|
+
'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
|
|
1673
1680
|
/**
|
|
1674
1681
|
* Disallow mixed binary operators
|
|
1675
1682
|
* @see https://eslint.org/docs/latest/rules/no-mixed-operators
|
|
@@ -4896,6 +4903,7 @@ interface RuleOptions {
|
|
|
4896
4903
|
/**
|
|
4897
4904
|
* Enforce using `@ts-expect-error` over `@ts-ignore`
|
|
4898
4905
|
* @see https://typescript-eslint.io/rules/prefer-ts-expect-error
|
|
4906
|
+
* @deprecated
|
|
4899
4907
|
*/
|
|
4900
4908
|
'ts/prefer-ts-expect-error'?: Linter.RuleEntry<[]>
|
|
4901
4909
|
/**
|
|
@@ -5709,21 +5717,11 @@ interface RuleOptions {
|
|
|
5709
5717
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5710
5718
|
*/
|
|
5711
5719
|
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
|
|
5712
|
-
/**
|
|
5713
|
-
* Disallow unused variables
|
|
5714
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5715
|
-
*/
|
|
5716
|
-
'unused-imports/no-unused-imports-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedImportsTs>
|
|
5717
5720
|
/**
|
|
5718
5721
|
* Disallow unused variables
|
|
5719
5722
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5720
5723
|
*/
|
|
5721
5724
|
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
|
|
5722
|
-
/**
|
|
5723
|
-
* Disallow unused variables
|
|
5724
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5725
|
-
*/
|
|
5726
|
-
'unused-imports/no-unused-vars-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedVarsTs>
|
|
5727
5725
|
/**
|
|
5728
5726
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
5729
5727
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -7141,6 +7139,8 @@ type AntfuConsistentListNewline = []|[{
|
|
|
7141
7139
|
ObjectPattern?: boolean
|
|
7142
7140
|
ArrayPattern?: boolean
|
|
7143
7141
|
JSXOpeningElement?: boolean
|
|
7142
|
+
JSONArrayExpression?: boolean
|
|
7143
|
+
JSONObjectExpression?: boolean
|
|
7144
7144
|
}]
|
|
7145
7145
|
// ----- antfu/indent-unindent -----
|
|
7146
7146
|
type AntfuIndentUnindent = []|[{
|
|
@@ -7327,6 +7327,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
|
|
|
7327
7327
|
// ----- func-style -----
|
|
7328
7328
|
type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
|
|
7329
7329
|
allowArrowFunctions?: boolean
|
|
7330
|
+
overrides?: {
|
|
7331
|
+
namedExports?: ("declaration" | "expression" | "ignore")
|
|
7332
|
+
}
|
|
7330
7333
|
}]
|
|
7331
7334
|
// ----- function-call-argument-newline -----
|
|
7332
7335
|
type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
@@ -8936,9 +8939,11 @@ type NoExtendNative = []|[{
|
|
|
8936
8939
|
exceptions?: string[]
|
|
8937
8940
|
}]
|
|
8938
8941
|
// ----- no-extra-boolean-cast -----
|
|
8939
|
-
type NoExtraBooleanCast = []|[{
|
|
8942
|
+
type NoExtraBooleanCast = []|[({
|
|
8943
|
+
enforceForInnerExpressions?: boolean
|
|
8944
|
+
} | {
|
|
8940
8945
|
enforceForLogicalOperands?: boolean
|
|
8941
|
-
}]
|
|
8946
|
+
})]
|
|
8942
8947
|
// ----- no-extra-parens -----
|
|
8943
8948
|
type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
8944
8949
|
conditionalAssign?: boolean
|
|
@@ -9012,6 +9017,10 @@ type NoMagicNumbers = []|[{
|
|
|
9012
9017
|
ignoreDefaultValues?: boolean
|
|
9013
9018
|
ignoreClassFieldInitialValues?: boolean
|
|
9014
9019
|
}]
|
|
9020
|
+
// ----- no-misleading-character-class -----
|
|
9021
|
+
type NoMisleadingCharacterClass = []|[{
|
|
9022
|
+
allowEscape?: boolean
|
|
9023
|
+
}]
|
|
9015
9024
|
// ----- no-mixed-operators -----
|
|
9016
9025
|
type NoMixedOperators = []|[{
|
|
9017
9026
|
groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
|
|
@@ -9068,8 +9077,10 @@ type NoRedeclare = []|[{
|
|
|
9068
9077
|
// ----- no-restricted-exports -----
|
|
9069
9078
|
type NoRestrictedExports = []|[({
|
|
9070
9079
|
restrictedNamedExports?: string[]
|
|
9080
|
+
restrictedNamedExportsPattern?: string
|
|
9071
9081
|
} | {
|
|
9072
9082
|
restrictedNamedExports?: string[]
|
|
9083
|
+
restrictedNamedExportsPattern?: string
|
|
9073
9084
|
restrictDefaultExports?: {
|
|
9074
9085
|
direct?: boolean
|
|
9075
9086
|
named?: boolean
|
|
@@ -12654,6 +12665,8 @@ type TsSortTypeConstituents = []|[{
|
|
|
12654
12665
|
|
|
12655
12666
|
checkUnions?: boolean
|
|
12656
12667
|
|
|
12668
|
+
caseSensitive?: boolean
|
|
12669
|
+
|
|
12657
12670
|
groupOrder?: ("conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union")[]
|
|
12658
12671
|
}]
|
|
12659
12672
|
// ----- ts/space-before-blocks -----
|
|
@@ -12951,17 +12964,6 @@ type UnusedImportsNoUnusedImports = []|[(("all" | "local") | {
|
|
|
12951
12964
|
caughtErrorsIgnorePattern?: string
|
|
12952
12965
|
destructuredArrayIgnorePattern?: string
|
|
12953
12966
|
})]
|
|
12954
|
-
// ----- unused-imports/no-unused-imports-ts -----
|
|
12955
|
-
type UnusedImportsNoUnusedImportsTs = []|[(("all" | "local") | {
|
|
12956
|
-
vars?: ("all" | "local")
|
|
12957
|
-
varsIgnorePattern?: string
|
|
12958
|
-
args?: ("all" | "after-used" | "none")
|
|
12959
|
-
ignoreRestSiblings?: boolean
|
|
12960
|
-
argsIgnorePattern?: string
|
|
12961
|
-
caughtErrors?: ("all" | "none")
|
|
12962
|
-
caughtErrorsIgnorePattern?: string
|
|
12963
|
-
destructuredArrayIgnorePattern?: string
|
|
12964
|
-
})]
|
|
12965
12967
|
// ----- unused-imports/no-unused-vars -----
|
|
12966
12968
|
type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
|
|
12967
12969
|
vars?: ("all" | "local")
|
|
@@ -12973,17 +12975,6 @@ type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
|
|
|
12973
12975
|
caughtErrorsIgnorePattern?: string
|
|
12974
12976
|
destructuredArrayIgnorePattern?: string
|
|
12975
12977
|
})]
|
|
12976
|
-
// ----- unused-imports/no-unused-vars-ts -----
|
|
12977
|
-
type UnusedImportsNoUnusedVarsTs = []|[(("all" | "local") | {
|
|
12978
|
-
vars?: ("all" | "local")
|
|
12979
|
-
varsIgnorePattern?: string
|
|
12980
|
-
args?: ("all" | "after-used" | "none")
|
|
12981
|
-
ignoreRestSiblings?: boolean
|
|
12982
|
-
argsIgnorePattern?: string
|
|
12983
|
-
caughtErrors?: ("all" | "none")
|
|
12984
|
-
caughtErrorsIgnorePattern?: string
|
|
12985
|
-
destructuredArrayIgnorePattern?: string
|
|
12986
|
-
})]
|
|
12987
12978
|
// ----- use-isnan -----
|
|
12988
12979
|
type UseIsnan = []|[{
|
|
12989
12980
|
enforceForSwitchCase?: boolean
|
|
@@ -14482,6 +14473,7 @@ interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'qu
|
|
|
14482
14473
|
* Including:
|
|
14483
14474
|
* - `antfu/top-level-function`
|
|
14484
14475
|
* - `antfu/if-newline`
|
|
14476
|
+
* - `antfu/curly`
|
|
14485
14477
|
*
|
|
14486
14478
|
* @default false
|
|
14487
14479
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,11 @@ interface RuleOptions {
|
|
|
119
119
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
|
|
120
120
|
*/
|
|
121
121
|
'antfu/consistent-list-newline'?: Linter.RuleEntry<AntfuConsistentListNewline>
|
|
122
|
+
/**
|
|
123
|
+
* Enforce Anthony's style of curly bracket
|
|
124
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.test.ts
|
|
125
|
+
*/
|
|
126
|
+
'antfu/curly'?: Linter.RuleEntry<[]>
|
|
122
127
|
/**
|
|
123
128
|
* Newline after if
|
|
124
129
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
|
|
@@ -471,42 +476,42 @@ interface RuleOptions {
|
|
|
471
476
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
472
477
|
/**
|
|
473
478
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
474
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
479
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/consistent-type-specifier-style.md
|
|
475
480
|
*/
|
|
476
481
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
477
482
|
/**
|
|
478
483
|
* Ensure a default export is present, given a default import.
|
|
479
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
484
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/default.md
|
|
480
485
|
*/
|
|
481
486
|
'import/default'?: Linter.RuleEntry<[]>
|
|
482
487
|
/**
|
|
483
488
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
484
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
489
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/dynamic-import-chunkname.md
|
|
485
490
|
*/
|
|
486
491
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
487
492
|
/**
|
|
488
493
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
489
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
494
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/export.md
|
|
490
495
|
*/
|
|
491
496
|
'import/export'?: Linter.RuleEntry<[]>
|
|
492
497
|
/**
|
|
493
498
|
* Ensure all exports appear after other statements.
|
|
494
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
499
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/exports-last.md
|
|
495
500
|
*/
|
|
496
501
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
497
502
|
/**
|
|
498
503
|
* Ensure consistent use of file extension within the import path.
|
|
499
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
504
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/extensions.md
|
|
500
505
|
*/
|
|
501
506
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
502
507
|
/**
|
|
503
508
|
* Ensure all imports appear before other statements.
|
|
504
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
509
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/first.md
|
|
505
510
|
*/
|
|
506
511
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
507
512
|
/**
|
|
508
513
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
509
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
514
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/group-exports.md
|
|
510
515
|
*/
|
|
511
516
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
512
517
|
/**
|
|
@@ -517,182 +522,182 @@ interface RuleOptions {
|
|
|
517
522
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
518
523
|
/**
|
|
519
524
|
* Enforce the maximum number of dependencies a module can have.
|
|
520
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
525
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/max-dependencies.md
|
|
521
526
|
*/
|
|
522
527
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
523
528
|
/**
|
|
524
529
|
* Ensure named imports correspond to a named export in the remote file.
|
|
525
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
530
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/named.md
|
|
526
531
|
*/
|
|
527
532
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
528
533
|
/**
|
|
529
534
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
530
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
535
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/namespace.md
|
|
531
536
|
*/
|
|
532
537
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
533
538
|
/**
|
|
534
539
|
* Enforce a newline after import statements.
|
|
535
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
540
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/newline-after-import.md
|
|
536
541
|
*/
|
|
537
542
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
538
543
|
/**
|
|
539
544
|
* Forbid import of modules using absolute paths.
|
|
540
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
545
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-absolute-path.md
|
|
541
546
|
*/
|
|
542
547
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
543
548
|
/**
|
|
544
549
|
* Forbid AMD `require` and `define` calls.
|
|
545
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
550
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-amd.md
|
|
546
551
|
*/
|
|
547
552
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
548
553
|
/**
|
|
549
554
|
* Forbid anonymous values as default exports.
|
|
550
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
555
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-anonymous-default-export.md
|
|
551
556
|
*/
|
|
552
557
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
553
558
|
/**
|
|
554
559
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
555
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
560
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-commonjs.md
|
|
556
561
|
*/
|
|
557
562
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
558
563
|
/**
|
|
559
564
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
560
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
565
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-cycle.md
|
|
561
566
|
*/
|
|
562
567
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
563
568
|
/**
|
|
564
569
|
* Forbid default exports.
|
|
565
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
570
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-default-export.md
|
|
566
571
|
*/
|
|
567
572
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
568
573
|
/**
|
|
569
574
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
570
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
575
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-deprecated.md
|
|
571
576
|
*/
|
|
572
577
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
573
578
|
/**
|
|
574
579
|
* Forbid repeated import of the same module in multiple places.
|
|
575
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
580
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-duplicates.md
|
|
576
581
|
*/
|
|
577
582
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
578
583
|
/**
|
|
579
584
|
* Forbid `require()` calls with expressions.
|
|
580
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
585
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-dynamic-require.md
|
|
581
586
|
*/
|
|
582
587
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
583
588
|
/**
|
|
584
589
|
* Forbid empty named import blocks.
|
|
585
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
590
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-empty-named-blocks.md
|
|
586
591
|
*/
|
|
587
592
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
588
593
|
/**
|
|
589
594
|
* Forbid the use of extraneous packages.
|
|
590
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
595
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-extraneous-dependencies.md
|
|
591
596
|
*/
|
|
592
597
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
593
598
|
/**
|
|
594
599
|
* Forbid import statements with CommonJS module.exports.
|
|
595
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
600
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-import-module-exports.md
|
|
596
601
|
*/
|
|
597
602
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
598
603
|
/**
|
|
599
604
|
* Forbid importing the submodules of other modules.
|
|
600
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
605
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-internal-modules.md
|
|
601
606
|
*/
|
|
602
607
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
603
608
|
/**
|
|
604
609
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
605
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
610
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-mutable-exports.md
|
|
606
611
|
*/
|
|
607
612
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
608
613
|
/**
|
|
609
614
|
* Forbid use of exported name as identifier of default export.
|
|
610
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
615
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default.md
|
|
611
616
|
*/
|
|
612
617
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
613
618
|
/**
|
|
614
619
|
* Forbid use of exported name as property of default export.
|
|
615
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
620
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-as-default-member.md
|
|
616
621
|
*/
|
|
617
622
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
618
623
|
/**
|
|
619
624
|
* Forbid named default exports.
|
|
620
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
625
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-default.md
|
|
621
626
|
*/
|
|
622
627
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
623
628
|
/**
|
|
624
629
|
* Forbid named exports.
|
|
625
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
630
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-named-export.md
|
|
626
631
|
*/
|
|
627
632
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
628
633
|
/**
|
|
629
634
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
630
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
635
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-namespace.md
|
|
631
636
|
*/
|
|
632
637
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
633
638
|
/**
|
|
634
639
|
* Forbid Node.js builtin modules.
|
|
635
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
640
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-nodejs-modules.md
|
|
636
641
|
*/
|
|
637
642
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
638
643
|
/**
|
|
639
644
|
* Forbid importing packages through relative paths.
|
|
640
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
645
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-packages.md
|
|
641
646
|
*/
|
|
642
647
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
643
648
|
/**
|
|
644
649
|
* Forbid importing modules from parent directories.
|
|
645
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
650
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-relative-parent-imports.md
|
|
646
651
|
*/
|
|
647
652
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
648
653
|
/**
|
|
649
654
|
* Enforce which files can be imported in a given folder.
|
|
650
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
655
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-restricted-paths.md
|
|
651
656
|
*/
|
|
652
657
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
653
658
|
/**
|
|
654
659
|
* Forbid a module from importing itself.
|
|
655
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
660
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-self-import.md
|
|
656
661
|
*/
|
|
657
662
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
658
663
|
/**
|
|
659
664
|
* Forbid unassigned imports.
|
|
660
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
665
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unassigned-import.md
|
|
661
666
|
*/
|
|
662
667
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
663
668
|
/**
|
|
664
669
|
* Ensure imports point to a file/module that can be resolved.
|
|
665
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
670
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unresolved.md
|
|
666
671
|
*/
|
|
667
672
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
668
673
|
/**
|
|
669
674
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
670
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
675
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-unused-modules.md
|
|
671
676
|
*/
|
|
672
677
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
673
678
|
/**
|
|
674
679
|
* Forbid unnecessary path segments in import and require statements.
|
|
675
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
680
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-useless-path-segments.md
|
|
676
681
|
*/
|
|
677
682
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
678
683
|
/**
|
|
679
684
|
* Forbid webpack loader syntax in imports.
|
|
680
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
685
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/no-webpack-loader-syntax.md
|
|
681
686
|
*/
|
|
682
687
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
683
688
|
/**
|
|
684
689
|
* Enforce a convention in module import order.
|
|
685
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
690
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/order.md
|
|
686
691
|
*/
|
|
687
692
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
688
693
|
/**
|
|
689
694
|
* Prefer a default export if module exports a single name or multiple names.
|
|
690
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
695
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/prefer-default-export.md
|
|
691
696
|
*/
|
|
692
697
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
693
698
|
/**
|
|
694
699
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
695
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
700
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.1/docs/rules/unambiguous.md
|
|
696
701
|
*/
|
|
697
702
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
698
703
|
/**
|
|
@@ -1216,6 +1221,7 @@ interface RuleOptions {
|
|
|
1216
1221
|
/**
|
|
1217
1222
|
* Enforce position of line comments
|
|
1218
1223
|
* @see https://eslint.org/docs/latest/rules/line-comment-position
|
|
1224
|
+
* @deprecated
|
|
1219
1225
|
*/
|
|
1220
1226
|
'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
|
|
1221
1227
|
/**
|
|
@@ -1297,6 +1303,7 @@ interface RuleOptions {
|
|
|
1297
1303
|
/**
|
|
1298
1304
|
* Enforce a particular style for multiline comments
|
|
1299
1305
|
* @see https://eslint.org/docs/latest/rules/multiline-comment-style
|
|
1306
|
+
* @deprecated
|
|
1300
1307
|
*/
|
|
1301
1308
|
'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
|
|
1302
1309
|
/**
|
|
@@ -1669,7 +1676,7 @@ interface RuleOptions {
|
|
|
1669
1676
|
* Disallow characters which are made with multiple code points in character class syntax
|
|
1670
1677
|
* @see https://eslint.org/docs/latest/rules/no-misleading-character-class
|
|
1671
1678
|
*/
|
|
1672
|
-
'no-misleading-character-class'?: Linter.RuleEntry<
|
|
1679
|
+
'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
|
|
1673
1680
|
/**
|
|
1674
1681
|
* Disallow mixed binary operators
|
|
1675
1682
|
* @see https://eslint.org/docs/latest/rules/no-mixed-operators
|
|
@@ -4896,6 +4903,7 @@ interface RuleOptions {
|
|
|
4896
4903
|
/**
|
|
4897
4904
|
* Enforce using `@ts-expect-error` over `@ts-ignore`
|
|
4898
4905
|
* @see https://typescript-eslint.io/rules/prefer-ts-expect-error
|
|
4906
|
+
* @deprecated
|
|
4899
4907
|
*/
|
|
4900
4908
|
'ts/prefer-ts-expect-error'?: Linter.RuleEntry<[]>
|
|
4901
4909
|
/**
|
|
@@ -5709,21 +5717,11 @@ interface RuleOptions {
|
|
|
5709
5717
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5710
5718
|
*/
|
|
5711
5719
|
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
|
|
5712
|
-
/**
|
|
5713
|
-
* Disallow unused variables
|
|
5714
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5715
|
-
*/
|
|
5716
|
-
'unused-imports/no-unused-imports-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedImportsTs>
|
|
5717
5720
|
/**
|
|
5718
5721
|
* Disallow unused variables
|
|
5719
5722
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5720
5723
|
*/
|
|
5721
5724
|
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
|
|
5722
|
-
/**
|
|
5723
|
-
* Disallow unused variables
|
|
5724
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
|
|
5725
|
-
*/
|
|
5726
|
-
'unused-imports/no-unused-vars-ts'?: Linter.RuleEntry<UnusedImportsNoUnusedVarsTs>
|
|
5727
5725
|
/**
|
|
5728
5726
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
5729
5727
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -7141,6 +7139,8 @@ type AntfuConsistentListNewline = []|[{
|
|
|
7141
7139
|
ObjectPattern?: boolean
|
|
7142
7140
|
ArrayPattern?: boolean
|
|
7143
7141
|
JSXOpeningElement?: boolean
|
|
7142
|
+
JSONArrayExpression?: boolean
|
|
7143
|
+
JSONObjectExpression?: boolean
|
|
7144
7144
|
}]
|
|
7145
7145
|
// ----- antfu/indent-unindent -----
|
|
7146
7146
|
type AntfuIndentUnindent = []|[{
|
|
@@ -7327,6 +7327,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
|
|
|
7327
7327
|
// ----- func-style -----
|
|
7328
7328
|
type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
|
|
7329
7329
|
allowArrowFunctions?: boolean
|
|
7330
|
+
overrides?: {
|
|
7331
|
+
namedExports?: ("declaration" | "expression" | "ignore")
|
|
7332
|
+
}
|
|
7330
7333
|
}]
|
|
7331
7334
|
// ----- function-call-argument-newline -----
|
|
7332
7335
|
type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
@@ -8936,9 +8939,11 @@ type NoExtendNative = []|[{
|
|
|
8936
8939
|
exceptions?: string[]
|
|
8937
8940
|
}]
|
|
8938
8941
|
// ----- no-extra-boolean-cast -----
|
|
8939
|
-
type NoExtraBooleanCast = []|[{
|
|
8942
|
+
type NoExtraBooleanCast = []|[({
|
|
8943
|
+
enforceForInnerExpressions?: boolean
|
|
8944
|
+
} | {
|
|
8940
8945
|
enforceForLogicalOperands?: boolean
|
|
8941
|
-
}]
|
|
8946
|
+
})]
|
|
8942
8947
|
// ----- no-extra-parens -----
|
|
8943
8948
|
type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
8944
8949
|
conditionalAssign?: boolean
|
|
@@ -9012,6 +9017,10 @@ type NoMagicNumbers = []|[{
|
|
|
9012
9017
|
ignoreDefaultValues?: boolean
|
|
9013
9018
|
ignoreClassFieldInitialValues?: boolean
|
|
9014
9019
|
}]
|
|
9020
|
+
// ----- no-misleading-character-class -----
|
|
9021
|
+
type NoMisleadingCharacterClass = []|[{
|
|
9022
|
+
allowEscape?: boolean
|
|
9023
|
+
}]
|
|
9015
9024
|
// ----- no-mixed-operators -----
|
|
9016
9025
|
type NoMixedOperators = []|[{
|
|
9017
9026
|
groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
|
|
@@ -9068,8 +9077,10 @@ type NoRedeclare = []|[{
|
|
|
9068
9077
|
// ----- no-restricted-exports -----
|
|
9069
9078
|
type NoRestrictedExports = []|[({
|
|
9070
9079
|
restrictedNamedExports?: string[]
|
|
9080
|
+
restrictedNamedExportsPattern?: string
|
|
9071
9081
|
} | {
|
|
9072
9082
|
restrictedNamedExports?: string[]
|
|
9083
|
+
restrictedNamedExportsPattern?: string
|
|
9073
9084
|
restrictDefaultExports?: {
|
|
9074
9085
|
direct?: boolean
|
|
9075
9086
|
named?: boolean
|
|
@@ -12654,6 +12665,8 @@ type TsSortTypeConstituents = []|[{
|
|
|
12654
12665
|
|
|
12655
12666
|
checkUnions?: boolean
|
|
12656
12667
|
|
|
12668
|
+
caseSensitive?: boolean
|
|
12669
|
+
|
|
12657
12670
|
groupOrder?: ("conditional" | "function" | "import" | "intersection" | "keyword" | "nullish" | "literal" | "named" | "object" | "operator" | "tuple" | "union")[]
|
|
12658
12671
|
}]
|
|
12659
12672
|
// ----- ts/space-before-blocks -----
|
|
@@ -12951,17 +12964,6 @@ type UnusedImportsNoUnusedImports = []|[(("all" | "local") | {
|
|
|
12951
12964
|
caughtErrorsIgnorePattern?: string
|
|
12952
12965
|
destructuredArrayIgnorePattern?: string
|
|
12953
12966
|
})]
|
|
12954
|
-
// ----- unused-imports/no-unused-imports-ts -----
|
|
12955
|
-
type UnusedImportsNoUnusedImportsTs = []|[(("all" | "local") | {
|
|
12956
|
-
vars?: ("all" | "local")
|
|
12957
|
-
varsIgnorePattern?: string
|
|
12958
|
-
args?: ("all" | "after-used" | "none")
|
|
12959
|
-
ignoreRestSiblings?: boolean
|
|
12960
|
-
argsIgnorePattern?: string
|
|
12961
|
-
caughtErrors?: ("all" | "none")
|
|
12962
|
-
caughtErrorsIgnorePattern?: string
|
|
12963
|
-
destructuredArrayIgnorePattern?: string
|
|
12964
|
-
})]
|
|
12965
12967
|
// ----- unused-imports/no-unused-vars -----
|
|
12966
12968
|
type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
|
|
12967
12969
|
vars?: ("all" | "local")
|
|
@@ -12973,17 +12975,6 @@ type UnusedImportsNoUnusedVars = []|[(("all" | "local") | {
|
|
|
12973
12975
|
caughtErrorsIgnorePattern?: string
|
|
12974
12976
|
destructuredArrayIgnorePattern?: string
|
|
12975
12977
|
})]
|
|
12976
|
-
// ----- unused-imports/no-unused-vars-ts -----
|
|
12977
|
-
type UnusedImportsNoUnusedVarsTs = []|[(("all" | "local") | {
|
|
12978
|
-
vars?: ("all" | "local")
|
|
12979
|
-
varsIgnorePattern?: string
|
|
12980
|
-
args?: ("all" | "after-used" | "none")
|
|
12981
|
-
ignoreRestSiblings?: boolean
|
|
12982
|
-
argsIgnorePattern?: string
|
|
12983
|
-
caughtErrors?: ("all" | "none")
|
|
12984
|
-
caughtErrorsIgnorePattern?: string
|
|
12985
|
-
destructuredArrayIgnorePattern?: string
|
|
12986
|
-
})]
|
|
12987
12978
|
// ----- use-isnan -----
|
|
12988
12979
|
type UseIsnan = []|[{
|
|
12989
12980
|
enforceForSwitchCase?: boolean
|
|
@@ -14482,6 +14473,7 @@ interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'qu
|
|
|
14482
14473
|
* Including:
|
|
14483
14474
|
* - `antfu/top-level-function`
|
|
14484
14475
|
* - `antfu/if-newline`
|
|
14476
|
+
* - `antfu/curly`
|
|
14485
14477
|
*
|
|
14486
14478
|
* @default false
|
|
14487
14479
|
*/
|
package/dist/index.js
CHANGED
|
@@ -665,7 +665,7 @@ import * as parserPlain2 from "eslint-parser-plain";
|
|
|
665
665
|
var StylisticConfigDefaults = {
|
|
666
666
|
indent: 4,
|
|
667
667
|
jsx: true,
|
|
668
|
-
lessOpinionated:
|
|
668
|
+
lessOpinionated: false,
|
|
669
669
|
quotes: "single",
|
|
670
670
|
semi: false
|
|
671
671
|
};
|
|
@@ -703,11 +703,12 @@ async function stylistic(options = {}) {
|
|
|
703
703
|
...lessOpinionated ? {
|
|
704
704
|
curly: ["error", "all"]
|
|
705
705
|
} : {
|
|
706
|
+
"antfu/curly": "error",
|
|
706
707
|
"antfu/if-newline": "error",
|
|
707
|
-
"antfu/top-level-function": "error"
|
|
708
|
-
"curly": ["error", "multi-or-nest", "consistent"]
|
|
708
|
+
"antfu/top-level-function": "error"
|
|
709
709
|
},
|
|
710
710
|
// 覆盖`stylistic`默认规则
|
|
711
|
+
"style/brace-style": ["error", "stroustrup"],
|
|
711
712
|
"style/member-delimiter-style": ["error", { multiline: { delimiter: "none" } }],
|
|
712
713
|
"style/multiline-ternary": ["error", "never"],
|
|
713
714
|
...overrides
|
|
@@ -1721,7 +1722,7 @@ async function vue(options = {}) {
|
|
|
1721
1722
|
"vue/arrow-spacing": ["error", { after: true, before: true }],
|
|
1722
1723
|
"vue/block-spacing": ["error", "always"],
|
|
1723
1724
|
"vue/block-tag-newline": ["error", { multiline: "always", singleline: "always" }],
|
|
1724
|
-
"vue/brace-style": ["error", "stroustrup", { allowSingleLine:
|
|
1725
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: false }],
|
|
1725
1726
|
"vue/comma-dangle": ["error", "always-multiline"],
|
|
1726
1727
|
"vue/comma-spacing": ["error", { after: true, before: false }],
|
|
1727
1728
|
"vue/comma-style": ["error", "last"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincy/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.6.
|
|
4
|
+
"version": "4.6.2",
|
|
5
5
|
"packageManager": "pnpm@9.1.0",
|
|
6
6
|
"description": "LinCenYing's ESLint config",
|
|
7
7
|
"author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
|
|
@@ -65,40 +65,40 @@
|
|
|
65
65
|
"@antfu/eslint-define-config": "1.23.0-2",
|
|
66
66
|
"@antfu/install-pkg": "^0.3.3",
|
|
67
67
|
"@stylistic/eslint-plugin": "2.1.0",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
69
|
-
"@typescript-eslint/parser": "^7.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
69
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
70
70
|
"eslint-config-flat-gitignore": "^0.1.5",
|
|
71
|
-
"eslint-flat-config-utils": "^0.2.
|
|
71
|
+
"eslint-flat-config-utils": "^0.2.5",
|
|
72
72
|
"eslint-merge-processors": "^0.1.0",
|
|
73
73
|
"eslint-parser-plain": "^0.1.0",
|
|
74
|
-
"eslint-plugin-antfu": "^2.
|
|
74
|
+
"eslint-plugin-antfu": "^2.3.3",
|
|
75
75
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
76
|
-
"eslint-plugin-import-x": "^0.5.
|
|
77
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
78
|
-
"eslint-plugin-jsonc": "^2.
|
|
76
|
+
"eslint-plugin-import-x": "^0.5.1",
|
|
77
|
+
"eslint-plugin-jsdoc": "^48.2.6",
|
|
78
|
+
"eslint-plugin-jsonc": "^2.16.0",
|
|
79
79
|
"eslint-plugin-markdown": "^5.0.0",
|
|
80
80
|
"eslint-plugin-n": "^17.7.0",
|
|
81
81
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
82
82
|
"eslint-plugin-perfectionist": "^2.10.0",
|
|
83
|
-
"eslint-plugin-regexp": "^2.
|
|
83
|
+
"eslint-plugin-regexp": "^2.6.0",
|
|
84
84
|
"eslint-plugin-toml": "^0.11.0",
|
|
85
85
|
"eslint-plugin-unicorn": "^53.0.0",
|
|
86
|
-
"eslint-plugin-unused-imports": "^
|
|
86
|
+
"eslint-plugin-unused-imports": "^4.0.0",
|
|
87
87
|
"eslint-plugin-vitest": "^0.5.4",
|
|
88
88
|
"eslint-plugin-vue": "^9.26.0",
|
|
89
89
|
"eslint-plugin-yml": "^1.14.0",
|
|
90
90
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
91
|
-
"globals": "^15.
|
|
91
|
+
"globals": "^15.3.0",
|
|
92
92
|
"jsonc-eslint-parser": "^2.4.0",
|
|
93
93
|
"local-pkg": "^0.5.0",
|
|
94
94
|
"prompts": "^2.4.2",
|
|
95
95
|
"toml-eslint-parser": "^0.9.3",
|
|
96
96
|
"vue-eslint-parser": "^9.4.2",
|
|
97
|
-
"yaml-eslint-parser": "^1.2.
|
|
97
|
+
"yaml-eslint-parser": "^1.2.3"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@antfu/ni": "^0.21.12",
|
|
101
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
101
|
+
"@eslint-react/eslint-plugin": "^1.5.13",
|
|
102
102
|
"@eslint-types/jsdoc": "48.2.2",
|
|
103
103
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
104
104
|
"@eslint-types/unicorn": "^52.0.0",
|
|
@@ -108,15 +108,16 @@
|
|
|
108
108
|
"@types/eslint": "^8.56.10",
|
|
109
109
|
"@types/node": "^20.12.12",
|
|
110
110
|
"@types/prompts": "^2.4.9",
|
|
111
|
-
"@unocss/eslint-plugin": "^0.60.
|
|
111
|
+
"@unocss/eslint-plugin": "^0.60.3",
|
|
112
112
|
"bumpp": "^9.4.1",
|
|
113
|
-
"eslint": "
|
|
113
|
+
"eslint": "npm:eslint-ts-patch@9.2.0-6",
|
|
114
114
|
"eslint-plugin-format": "^0.1.1",
|
|
115
115
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
116
116
|
"eslint-plugin-react-refresh": "^0.4.7",
|
|
117
|
+
"eslint-ts-patch": "9.2.0-6",
|
|
117
118
|
"eslint-typegen": "^0.2.4",
|
|
118
119
|
"esno": "^4.7.0",
|
|
119
|
-
"lint-staged": "^15.2.
|
|
120
|
+
"lint-staged": "^15.2.5",
|
|
120
121
|
"prettier": "^3.2.5",
|
|
121
122
|
"react": "^18.3.1",
|
|
122
123
|
"rimraf": "^5.0.7",
|