@ivanmaxlogiudice/eslint-config 2.0.1 → 2.0.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 +1 -0
- package/dist/cli.cjs +24 -23
- package/dist/cli.js +24 -23
- package/dist/index.cjs +49 -45
- package/dist/index.d.cts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +49 -45
- package/package.json +22 -22
package/README.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -40,8 +40,8 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
40
40
|
// package.json
|
|
41
41
|
var package_default = {
|
|
42
42
|
name: "@ivanmaxlogiudice/eslint-config",
|
|
43
|
-
version: "2.0.
|
|
44
|
-
packageManager: "pnpm@9.0
|
|
43
|
+
version: "2.0.2",
|
|
44
|
+
packageManager: "pnpm@9.1.0",
|
|
45
45
|
description: "Personal ESLint config",
|
|
46
46
|
type: "module",
|
|
47
47
|
keywords: [
|
|
@@ -99,32 +99,32 @@ var package_default = {
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
dependencies: {
|
|
102
|
-
"@antfu/install-pkg": "^0.3.
|
|
102
|
+
"@antfu/install-pkg": "^0.3.3",
|
|
103
103
|
"@clack/prompts": "^0.7.0",
|
|
104
|
-
"@stylistic/eslint-plugin": "^1.
|
|
105
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
106
|
-
"@typescript-eslint/parser": "^7.
|
|
104
|
+
"@stylistic/eslint-plugin": "^1.8.1",
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
|
106
|
+
"@typescript-eslint/parser": "^7.8.0",
|
|
107
107
|
"detect-indent": "^7.0.1",
|
|
108
108
|
"eslint-config-flat-gitignore": "^0.1.5",
|
|
109
|
-
"eslint-flat-config-utils": "^0.2.
|
|
109
|
+
"eslint-flat-config-utils": "^0.2.4",
|
|
110
110
|
"eslint-merge-processors": "^0.1.0",
|
|
111
|
-
"eslint-plugin-antfu": "^2.1.
|
|
111
|
+
"eslint-plugin-antfu": "^2.1.3",
|
|
112
112
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
113
113
|
"eslint-plugin-import-x": "^0.5.0",
|
|
114
114
|
"eslint-plugin-jsdoc": "^48.2.3",
|
|
115
115
|
"eslint-plugin-jsonc": "^2.15.1",
|
|
116
|
-
"eslint-plugin-markdown": "^
|
|
117
|
-
"eslint-plugin-n": "^17.
|
|
116
|
+
"eslint-plugin-markdown": "^5.0.0",
|
|
117
|
+
"eslint-plugin-n": "^17.5.1",
|
|
118
118
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
119
|
-
"eslint-plugin-perfectionist": "^2.
|
|
119
|
+
"eslint-plugin-perfectionist": "^2.10.0",
|
|
120
120
|
"eslint-plugin-unicorn": "^52.0.0",
|
|
121
|
-
"eslint-plugin-unused-imports": "^3.
|
|
122
|
-
"eslint-plugin-vitest": "^0.5.
|
|
121
|
+
"eslint-plugin-unused-imports": "^3.2.0",
|
|
122
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
123
123
|
"eslint-plugin-vue": "^9.25.0",
|
|
124
124
|
"eslint-plugin-yml": "^1.14.0",
|
|
125
125
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
126
|
-
"eslint-typegen": "^0.2.
|
|
127
|
-
globals: "^15.
|
|
126
|
+
"eslint-typegen": "^0.2.4",
|
|
127
|
+
globals: "^15.1.0",
|
|
128
128
|
"jsonc-eslint-parser": "^2.4.0",
|
|
129
129
|
"local-pkg": "^0.5.0",
|
|
130
130
|
"parse-gitignore": "^2.0.0",
|
|
@@ -134,17 +134,17 @@ var package_default = {
|
|
|
134
134
|
yargs: "^17.7.2"
|
|
135
135
|
},
|
|
136
136
|
devDependencies: {
|
|
137
|
-
"@eslint/config-inspector": "^0.4.
|
|
138
|
-
"@stylistic/eslint-plugin-migrate": "^1.
|
|
137
|
+
"@eslint/config-inspector": "^0.4.8",
|
|
138
|
+
"@stylistic/eslint-plugin-migrate": "^1.8.1",
|
|
139
139
|
"@types/eslint": "^8.56.10",
|
|
140
140
|
"@types/fs-extra": "^11.0.4",
|
|
141
|
-
"@types/node": "^20.12.
|
|
141
|
+
"@types/node": "^20.12.10",
|
|
142
142
|
"@types/prompts": "^2.4.9",
|
|
143
143
|
"@types/yargs": "^17.0.32",
|
|
144
144
|
"@unocss/eslint-plugin": "^0.59.4",
|
|
145
|
-
bumpp: "^9.4.
|
|
146
|
-
"bundle-require": "^4.0
|
|
147
|
-
eslint: "^9.
|
|
145
|
+
bumpp: "^9.4.1",
|
|
146
|
+
"bundle-require": "^4.1.0",
|
|
147
|
+
eslint: "^9.2.0",
|
|
148
148
|
"eslint-plugin-format": "^0.1.1",
|
|
149
149
|
esno: "^4.7.0",
|
|
150
150
|
execa: "^8.0.1",
|
|
@@ -154,8 +154,8 @@ var package_default = {
|
|
|
154
154
|
"simple-git-hooks": "^2.11.1",
|
|
155
155
|
tsup: "^8.0.2",
|
|
156
156
|
typescript: "^5.4.5",
|
|
157
|
-
vitest: "^1.
|
|
158
|
-
vue: "^3.4.
|
|
157
|
+
vitest: "^1.6.0",
|
|
158
|
+
vue: "^3.4.27"
|
|
159
159
|
},
|
|
160
160
|
engines: {
|
|
161
161
|
node: ">=18.12.0"
|
|
@@ -175,6 +175,7 @@ var CROSS = import_picocolors.default.red("\u2718");
|
|
|
175
175
|
var WARN = import_picocolors.default.yellow("\u2139");
|
|
176
176
|
var vscodeSettingsString = `
|
|
177
177
|
// Enable the ESlint flat config support
|
|
178
|
+
// (remove this if your ESLint extension above v3.0.5)
|
|
178
179
|
"eslint.useFlatConfig": true,
|
|
179
180
|
|
|
180
181
|
// Disable the default formatter, use eslint instead
|
package/dist/cli.js
CHANGED
|
@@ -11,8 +11,8 @@ import c from "picocolors";
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@ivanmaxlogiudice/eslint-config",
|
|
14
|
-
version: "2.0.
|
|
15
|
-
packageManager: "pnpm@9.0
|
|
14
|
+
version: "2.0.2",
|
|
15
|
+
packageManager: "pnpm@9.1.0",
|
|
16
16
|
description: "Personal ESLint config",
|
|
17
17
|
type: "module",
|
|
18
18
|
keywords: [
|
|
@@ -70,32 +70,32 @@ var package_default = {
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
dependencies: {
|
|
73
|
-
"@antfu/install-pkg": "^0.3.
|
|
73
|
+
"@antfu/install-pkg": "^0.3.3",
|
|
74
74
|
"@clack/prompts": "^0.7.0",
|
|
75
|
-
"@stylistic/eslint-plugin": "^1.
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
77
|
-
"@typescript-eslint/parser": "^7.
|
|
75
|
+
"@stylistic/eslint-plugin": "^1.8.1",
|
|
76
|
+
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
|
77
|
+
"@typescript-eslint/parser": "^7.8.0",
|
|
78
78
|
"detect-indent": "^7.0.1",
|
|
79
79
|
"eslint-config-flat-gitignore": "^0.1.5",
|
|
80
|
-
"eslint-flat-config-utils": "^0.2.
|
|
80
|
+
"eslint-flat-config-utils": "^0.2.4",
|
|
81
81
|
"eslint-merge-processors": "^0.1.0",
|
|
82
|
-
"eslint-plugin-antfu": "^2.1.
|
|
82
|
+
"eslint-plugin-antfu": "^2.1.3",
|
|
83
83
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
84
84
|
"eslint-plugin-import-x": "^0.5.0",
|
|
85
85
|
"eslint-plugin-jsdoc": "^48.2.3",
|
|
86
86
|
"eslint-plugin-jsonc": "^2.15.1",
|
|
87
|
-
"eslint-plugin-markdown": "^
|
|
88
|
-
"eslint-plugin-n": "^17.
|
|
87
|
+
"eslint-plugin-markdown": "^5.0.0",
|
|
88
|
+
"eslint-plugin-n": "^17.5.1",
|
|
89
89
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
90
|
-
"eslint-plugin-perfectionist": "^2.
|
|
90
|
+
"eslint-plugin-perfectionist": "^2.10.0",
|
|
91
91
|
"eslint-plugin-unicorn": "^52.0.0",
|
|
92
|
-
"eslint-plugin-unused-imports": "^3.
|
|
93
|
-
"eslint-plugin-vitest": "^0.5.
|
|
92
|
+
"eslint-plugin-unused-imports": "^3.2.0",
|
|
93
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
94
94
|
"eslint-plugin-vue": "^9.25.0",
|
|
95
95
|
"eslint-plugin-yml": "^1.14.0",
|
|
96
96
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
97
|
-
"eslint-typegen": "^0.2.
|
|
98
|
-
globals: "^15.
|
|
97
|
+
"eslint-typegen": "^0.2.4",
|
|
98
|
+
globals: "^15.1.0",
|
|
99
99
|
"jsonc-eslint-parser": "^2.4.0",
|
|
100
100
|
"local-pkg": "^0.5.0",
|
|
101
101
|
"parse-gitignore": "^2.0.0",
|
|
@@ -105,17 +105,17 @@ var package_default = {
|
|
|
105
105
|
yargs: "^17.7.2"
|
|
106
106
|
},
|
|
107
107
|
devDependencies: {
|
|
108
|
-
"@eslint/config-inspector": "^0.4.
|
|
109
|
-
"@stylistic/eslint-plugin-migrate": "^1.
|
|
108
|
+
"@eslint/config-inspector": "^0.4.8",
|
|
109
|
+
"@stylistic/eslint-plugin-migrate": "^1.8.1",
|
|
110
110
|
"@types/eslint": "^8.56.10",
|
|
111
111
|
"@types/fs-extra": "^11.0.4",
|
|
112
|
-
"@types/node": "^20.12.
|
|
112
|
+
"@types/node": "^20.12.10",
|
|
113
113
|
"@types/prompts": "^2.4.9",
|
|
114
114
|
"@types/yargs": "^17.0.32",
|
|
115
115
|
"@unocss/eslint-plugin": "^0.59.4",
|
|
116
|
-
bumpp: "^9.4.
|
|
117
|
-
"bundle-require": "^4.0
|
|
118
|
-
eslint: "^9.
|
|
116
|
+
bumpp: "^9.4.1",
|
|
117
|
+
"bundle-require": "^4.1.0",
|
|
118
|
+
eslint: "^9.2.0",
|
|
119
119
|
"eslint-plugin-format": "^0.1.1",
|
|
120
120
|
esno: "^4.7.0",
|
|
121
121
|
execa: "^8.0.1",
|
|
@@ -125,8 +125,8 @@ var package_default = {
|
|
|
125
125
|
"simple-git-hooks": "^2.11.1",
|
|
126
126
|
tsup: "^8.0.2",
|
|
127
127
|
typescript: "^5.4.5",
|
|
128
|
-
vitest: "^1.
|
|
129
|
-
vue: "^3.4.
|
|
128
|
+
vitest: "^1.6.0",
|
|
129
|
+
vue: "^3.4.27"
|
|
130
130
|
},
|
|
131
131
|
engines: {
|
|
132
132
|
node: ">=18.12.0"
|
|
@@ -146,6 +146,7 @@ var CROSS = c.red("\u2718");
|
|
|
146
146
|
var WARN = c.yellow("\u2139");
|
|
147
147
|
var vscodeSettingsString = `
|
|
148
148
|
// Enable the ESlint flat config support
|
|
149
|
+
// (remove this if your ESLint extension above v3.0.5)
|
|
149
150
|
"eslint.useFlatConfig": true,
|
|
150
151
|
|
|
151
152
|
// Disable the default formatter, use eslint instead
|
package/dist/index.cjs
CHANGED
|
@@ -180,7 +180,7 @@ async function comments() {
|
|
|
180
180
|
const pluginComments = await interopDefault(import("eslint-plugin-eslint-comments"));
|
|
181
181
|
return [
|
|
182
182
|
{
|
|
183
|
-
name: "config
|
|
183
|
+
name: "config/eslint-comments/rules",
|
|
184
184
|
plugins: {
|
|
185
185
|
"eslint-comments": pluginComments
|
|
186
186
|
},
|
|
@@ -305,7 +305,7 @@ async function stylistic(options = {}) {
|
|
|
305
305
|
}
|
|
306
306
|
return [
|
|
307
307
|
{
|
|
308
|
-
name: "config
|
|
308
|
+
name: "config/stylistic/rules",
|
|
309
309
|
plugins: {
|
|
310
310
|
antfu: import_eslint_plugin_antfu.default,
|
|
311
311
|
style: pluginStylistic
|
|
@@ -329,9 +329,6 @@ async function stylistic(options = {}) {
|
|
|
329
329
|
|
|
330
330
|
// src/configs/formatters.ts
|
|
331
331
|
async function formatters(options = {}, stylistic2 = {}) {
|
|
332
|
-
await ensurePackages([
|
|
333
|
-
"eslint-plugin-format"
|
|
334
|
-
]);
|
|
335
332
|
if (options === true) {
|
|
336
333
|
options = {
|
|
337
334
|
css: true,
|
|
@@ -340,6 +337,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
340
337
|
markdown: true
|
|
341
338
|
};
|
|
342
339
|
}
|
|
340
|
+
await ensurePackages([
|
|
341
|
+
"eslint-plugin-format"
|
|
342
|
+
]);
|
|
343
343
|
const {
|
|
344
344
|
indent,
|
|
345
345
|
quotes,
|
|
@@ -364,7 +364,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
364
364
|
const pluginFormat = await interopDefault(import("eslint-plugin-format"));
|
|
365
365
|
const configs = [
|
|
366
366
|
{
|
|
367
|
-
name: "config
|
|
367
|
+
name: "config/formatter/setup",
|
|
368
368
|
plugins: {
|
|
369
369
|
format: pluginFormat
|
|
370
370
|
}
|
|
@@ -377,7 +377,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
377
377
|
languageOptions: {
|
|
378
378
|
parser: parserPlain
|
|
379
379
|
},
|
|
380
|
-
name: "config
|
|
380
|
+
name: "config/formatter/css",
|
|
381
381
|
rules: {
|
|
382
382
|
"format/prettier": ["error", {
|
|
383
383
|
...prettierOptions,
|
|
@@ -390,7 +390,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
390
390
|
languageOptions: {
|
|
391
391
|
parser: parserPlain
|
|
392
392
|
},
|
|
393
|
-
name: "config
|
|
393
|
+
name: "config/formatter/scss",
|
|
394
394
|
rules: {
|
|
395
395
|
"format/prettier": ["error", {
|
|
396
396
|
...prettierOptions,
|
|
@@ -403,7 +403,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
403
403
|
languageOptions: {
|
|
404
404
|
parser: parserPlain
|
|
405
405
|
},
|
|
406
|
-
name: "config
|
|
406
|
+
name: "config/formatter/less",
|
|
407
407
|
rules: {
|
|
408
408
|
"format/prettier": ["error", {
|
|
409
409
|
...prettierOptions,
|
|
@@ -419,7 +419,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
419
419
|
languageOptions: {
|
|
420
420
|
parser: parserPlain
|
|
421
421
|
},
|
|
422
|
-
name: "config
|
|
422
|
+
name: "config/formatter/html",
|
|
423
423
|
rules: {
|
|
424
424
|
"format/prettier": ["error", {
|
|
425
425
|
...prettierOptions,
|
|
@@ -435,7 +435,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
435
435
|
languageOptions: {
|
|
436
436
|
parser: parserPlain
|
|
437
437
|
},
|
|
438
|
-
name: "config
|
|
438
|
+
name: "config/formatter/markdown",
|
|
439
439
|
rules: {
|
|
440
440
|
[`format/${formater}`]: [
|
|
441
441
|
"error",
|
|
@@ -458,7 +458,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
458
458
|
languageOptions: {
|
|
459
459
|
parser: parserPlain
|
|
460
460
|
},
|
|
461
|
-
name: "config
|
|
461
|
+
name: "config/formatter/graphql",
|
|
462
462
|
rules: {
|
|
463
463
|
"format/prettier": ["error", {
|
|
464
464
|
...prettierOptions,
|
|
@@ -486,7 +486,7 @@ function imports(options = {}) {
|
|
|
486
486
|
} = options;
|
|
487
487
|
return [
|
|
488
488
|
{
|
|
489
|
-
name: "config
|
|
489
|
+
name: "config/imports/rules",
|
|
490
490
|
plugins: {
|
|
491
491
|
antfu: import_eslint_plugin_antfu.default,
|
|
492
492
|
import: pluginImport
|
|
@@ -511,7 +511,7 @@ function imports(options = {}) {
|
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
513
|
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
514
|
-
name: "config
|
|
514
|
+
name: "config/imports/disables/bin",
|
|
515
515
|
rules: {
|
|
516
516
|
"antfu/no-import-dist": "off",
|
|
517
517
|
"antfu/no-import-node-modules-by-path": "off"
|
|
@@ -557,7 +557,7 @@ async function javascript(options = {}) {
|
|
|
557
557
|
linterOptions: {
|
|
558
558
|
reportUnusedDisableDirectives: true
|
|
559
559
|
},
|
|
560
|
-
name: "config
|
|
560
|
+
name: "config/javascript/rules",
|
|
561
561
|
plugins: {
|
|
562
562
|
"antfu": import_eslint_plugin_antfu.default,
|
|
563
563
|
"unused-imports": pluginUnusedImports
|
|
@@ -754,7 +754,7 @@ async function javascript(options = {}) {
|
|
|
754
754
|
},
|
|
755
755
|
{
|
|
756
756
|
files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
|
|
757
|
-
name: "config
|
|
757
|
+
name: "config/javascript/disables/cli",
|
|
758
758
|
rules: {
|
|
759
759
|
"no-console": "off"
|
|
760
760
|
}
|
|
@@ -770,7 +770,7 @@ async function jsdoc(options = {}) {
|
|
|
770
770
|
const pluginJsdoc = await interopDefault(import("eslint-plugin-jsdoc"));
|
|
771
771
|
return [
|
|
772
772
|
{
|
|
773
|
-
name: "config
|
|
773
|
+
name: "config/jsdoc/rules",
|
|
774
774
|
plugins: {
|
|
775
775
|
jsdoc: pluginJsdoc
|
|
776
776
|
},
|
|
@@ -818,7 +818,7 @@ async function jsonc(options = {}) {
|
|
|
818
818
|
]);
|
|
819
819
|
return [
|
|
820
820
|
{
|
|
821
|
-
name: "config
|
|
821
|
+
name: "config/jsonc/setup",
|
|
822
822
|
plugins: {
|
|
823
823
|
jsonc: pluginJsonc
|
|
824
824
|
}
|
|
@@ -828,7 +828,7 @@ async function jsonc(options = {}) {
|
|
|
828
828
|
languageOptions: {
|
|
829
829
|
parser: parserJsonc
|
|
830
830
|
},
|
|
831
|
-
name: "config
|
|
831
|
+
name: "config/jsonc/rules",
|
|
832
832
|
rules: {
|
|
833
833
|
"jsonc/no-bigint-literals": "error",
|
|
834
834
|
"jsonc/no-binary-expression": "error",
|
|
@@ -893,7 +893,7 @@ async function markdown(options = {}) {
|
|
|
893
893
|
const markdown2 = await interopDefault(import("eslint-plugin-markdown"));
|
|
894
894
|
return [
|
|
895
895
|
{
|
|
896
|
-
name: "config
|
|
896
|
+
name: "config/markdown/setup",
|
|
897
897
|
plugins: {
|
|
898
898
|
markdown: markdown2
|
|
899
899
|
}
|
|
@@ -901,7 +901,7 @@ async function markdown(options = {}) {
|
|
|
901
901
|
{
|
|
902
902
|
files,
|
|
903
903
|
ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
|
|
904
|
-
name: "config
|
|
904
|
+
name: "config/markdown/processor",
|
|
905
905
|
// `eslint-plugin-markdown` only creates virtual files for code blocks,
|
|
906
906
|
// but not the markdown file itself. We use `eslint-merge-processors` to
|
|
907
907
|
// add a pass-through processor for the markdown file itself.
|
|
@@ -915,7 +915,7 @@ async function markdown(options = {}) {
|
|
|
915
915
|
languageOptions: {
|
|
916
916
|
parser: parserPlain
|
|
917
917
|
},
|
|
918
|
-
name: "config
|
|
918
|
+
name: "config/markdown/parser"
|
|
919
919
|
},
|
|
920
920
|
{
|
|
921
921
|
files: [
|
|
@@ -929,7 +929,7 @@ async function markdown(options = {}) {
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
},
|
|
932
|
-
name: "config
|
|
932
|
+
name: "config/markdown/disables",
|
|
933
933
|
rules: {
|
|
934
934
|
"import/newline-after-import": "off",
|
|
935
935
|
"no-alert": "off",
|
|
@@ -984,7 +984,7 @@ async function node() {
|
|
|
984
984
|
const pluginNode = await interopDefault(import("eslint-plugin-n"));
|
|
985
985
|
return [
|
|
986
986
|
{
|
|
987
|
-
name: "config
|
|
987
|
+
name: "config/node/rules",
|
|
988
988
|
plugins: {
|
|
989
989
|
node: pluginNode
|
|
990
990
|
},
|
|
@@ -1010,13 +1010,13 @@ async function perfectionist(options = {}) {
|
|
|
1010
1010
|
const pluginPerfectionist = await interopDefault(import("eslint-plugin-perfectionist"));
|
|
1011
1011
|
return [
|
|
1012
1012
|
{
|
|
1013
|
-
name: "config
|
|
1013
|
+
name: "config/perfectionist/setup",
|
|
1014
1014
|
plugins: {
|
|
1015
1015
|
perfectionist: pluginPerfectionist
|
|
1016
1016
|
}
|
|
1017
1017
|
},
|
|
1018
1018
|
{
|
|
1019
|
-
name: "config
|
|
1019
|
+
name: "config/perfectionist/rules",
|
|
1020
1020
|
rules: {
|
|
1021
1021
|
"perfectionist/sort-classes": ["error", {
|
|
1022
1022
|
groups: [
|
|
@@ -1074,7 +1074,7 @@ function sortPackageJson() {
|
|
|
1074
1074
|
return [
|
|
1075
1075
|
{
|
|
1076
1076
|
files: ["**/package.json"],
|
|
1077
|
-
name: "config
|
|
1077
|
+
name: "config/sort/package-json",
|
|
1078
1078
|
rules: {
|
|
1079
1079
|
"jsonc/sort-array-values": ["error", {
|
|
1080
1080
|
order: { type: "asc" },
|
|
@@ -1171,7 +1171,7 @@ function sortTsconfig() {
|
|
|
1171
1171
|
return [
|
|
1172
1172
|
{
|
|
1173
1173
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
1174
|
-
name: "config
|
|
1174
|
+
name: "config/sort/tsconfig-json",
|
|
1175
1175
|
rules: {
|
|
1176
1176
|
"jsonc/sort-keys": [
|
|
1177
1177
|
"error",
|
|
@@ -1319,14 +1319,14 @@ async function test(options = {}) {
|
|
|
1319
1319
|
};
|
|
1320
1320
|
return [
|
|
1321
1321
|
{
|
|
1322
|
-
name: "config
|
|
1322
|
+
name: "config/test/setup",
|
|
1323
1323
|
plugins: {
|
|
1324
1324
|
test: _pluginTest
|
|
1325
1325
|
}
|
|
1326
1326
|
},
|
|
1327
1327
|
{
|
|
1328
1328
|
files,
|
|
1329
|
-
name: "config
|
|
1329
|
+
name: "config/test/rules",
|
|
1330
1330
|
rules: {
|
|
1331
1331
|
"node/prefer-global/process": "off",
|
|
1332
1332
|
"test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
|
|
@@ -1400,13 +1400,13 @@ async function typescript(options = {}) {
|
|
|
1400
1400
|
...parserOptions
|
|
1401
1401
|
}
|
|
1402
1402
|
},
|
|
1403
|
-
name: `config
|
|
1403
|
+
name: `config/typescript/${typeAware ? "type-aware-parser" : "parser"}`
|
|
1404
1404
|
};
|
|
1405
1405
|
}
|
|
1406
1406
|
return [
|
|
1407
1407
|
// Install the plugins without globs, so they can be configured separately.
|
|
1408
1408
|
{
|
|
1409
|
-
name: "config
|
|
1409
|
+
name: "config/typescript/setup",
|
|
1410
1410
|
plugins: {
|
|
1411
1411
|
import: pluginImport,
|
|
1412
1412
|
ts: pluginTs
|
|
@@ -1419,7 +1419,7 @@ async function typescript(options = {}) {
|
|
|
1419
1419
|
] : [makeParser(false, files)],
|
|
1420
1420
|
{
|
|
1421
1421
|
files,
|
|
1422
|
-
name: "config
|
|
1422
|
+
name: "config/typescript/rules",
|
|
1423
1423
|
rules: {
|
|
1424
1424
|
...renameRules(
|
|
1425
1425
|
pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -1479,7 +1479,7 @@ async function typescript(options = {}) {
|
|
|
1479
1479
|
},
|
|
1480
1480
|
{
|
|
1481
1481
|
files: filesTypeAware,
|
|
1482
|
-
name: "config
|
|
1482
|
+
name: "config/typescript/rules-type-aware",
|
|
1483
1483
|
rules: {
|
|
1484
1484
|
...tsconfigPath ? typeAwareRules : {},
|
|
1485
1485
|
...overrides
|
|
@@ -1487,7 +1487,7 @@ async function typescript(options = {}) {
|
|
|
1487
1487
|
},
|
|
1488
1488
|
{
|
|
1489
1489
|
files: ["**/*.d.ts"],
|
|
1490
|
-
name: "config
|
|
1490
|
+
name: "config/typescript/disables/dts",
|
|
1491
1491
|
rules: {
|
|
1492
1492
|
"eslint-comments/no-unlimited-disable": "off",
|
|
1493
1493
|
"import/no-duplicates": "off",
|
|
@@ -1497,14 +1497,14 @@ async function typescript(options = {}) {
|
|
|
1497
1497
|
},
|
|
1498
1498
|
{
|
|
1499
1499
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
1500
|
-
name: "config
|
|
1500
|
+
name: "config/typescript/disables/test",
|
|
1501
1501
|
rules: {
|
|
1502
1502
|
"no-unused-expressions": "off"
|
|
1503
1503
|
}
|
|
1504
1504
|
},
|
|
1505
1505
|
{
|
|
1506
1506
|
files: ["**/*.js", "**/*.cjs"],
|
|
1507
|
-
name: "config
|
|
1507
|
+
name: "config/typescript/disables/cjs",
|
|
1508
1508
|
rules: {
|
|
1509
1509
|
"ts/no-require-imports": "off",
|
|
1510
1510
|
"ts/no-var-requires": "off"
|
|
@@ -1518,7 +1518,7 @@ async function unicorn() {
|
|
|
1518
1518
|
const pluginUnicorn = await interopDefault(import("eslint-plugin-unicorn"));
|
|
1519
1519
|
return [
|
|
1520
1520
|
{
|
|
1521
|
-
name: "config
|
|
1521
|
+
name: "config/unicorn/rules",
|
|
1522
1522
|
plugins: {
|
|
1523
1523
|
unicorn: pluginUnicorn
|
|
1524
1524
|
},
|
|
@@ -1599,12 +1599,16 @@ async function unocss(options = {}) {
|
|
|
1599
1599
|
await ensurePackages([
|
|
1600
1600
|
"@unocss/eslint-plugin"
|
|
1601
1601
|
]);
|
|
1602
|
-
const
|
|
1602
|
+
const [
|
|
1603
|
+
pluginUnoCSS
|
|
1604
|
+
] = await Promise.all([
|
|
1605
|
+
interopDefault(import("@unocss/eslint-plugin"))
|
|
1606
|
+
]);
|
|
1603
1607
|
return [
|
|
1604
1608
|
{
|
|
1605
|
-
name: "config
|
|
1609
|
+
name: "config/unocss",
|
|
1606
1610
|
plugins: {
|
|
1607
|
-
unocss:
|
|
1611
|
+
unocss: pluginUnoCSS
|
|
1608
1612
|
},
|
|
1609
1613
|
rules: {
|
|
1610
1614
|
"unocss/order": "warn",
|
|
@@ -1663,7 +1667,7 @@ async function vue(options = {}) {
|
|
|
1663
1667
|
watchEffect: "readonly"
|
|
1664
1668
|
}
|
|
1665
1669
|
},
|
|
1666
|
-
name: "config
|
|
1670
|
+
name: "config/vue/setup",
|
|
1667
1671
|
plugins: {
|
|
1668
1672
|
vue: pluginVue
|
|
1669
1673
|
}
|
|
@@ -1681,7 +1685,7 @@ async function vue(options = {}) {
|
|
|
1681
1685
|
sourceType: "module"
|
|
1682
1686
|
}
|
|
1683
1687
|
},
|
|
1684
|
-
name: "config
|
|
1688
|
+
name: "config/vue/rules",
|
|
1685
1689
|
processor: sfcBlocks === false ? pluginVue.processors[".vue"] : (0, import_eslint_merge_processors2.mergeProcessors)([
|
|
1686
1690
|
pluginVue.processors[".vue"],
|
|
1687
1691
|
processorVueBlocks({
|
|
@@ -1820,7 +1824,7 @@ async function yaml(options = {}) {
|
|
|
1820
1824
|
]);
|
|
1821
1825
|
return [
|
|
1822
1826
|
{
|
|
1823
|
-
name: "config
|
|
1827
|
+
name: "config/yaml/setup",
|
|
1824
1828
|
plugins: {
|
|
1825
1829
|
yaml: pluginYaml
|
|
1826
1830
|
}
|
|
@@ -1830,7 +1834,7 @@ async function yaml(options = {}) {
|
|
|
1830
1834
|
languageOptions: {
|
|
1831
1835
|
parser: parserYaml
|
|
1832
1836
|
},
|
|
1833
|
-
name: "config
|
|
1837
|
+
name: "config/yaml/rules",
|
|
1834
1838
|
rules: {
|
|
1835
1839
|
"style/spaced-comment": "off",
|
|
1836
1840
|
"yaml/block-mapping": "error",
|