@liwo/eslint-config 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +314 -192
- package/dist/index.js +3 -7
- package/package.json +20 -20
package/dist/index.js
CHANGED
|
@@ -197,8 +197,7 @@ const parserPlain = {
|
|
|
197
197
|
* Combine array and non-array configs into a single array.
|
|
198
198
|
*/
|
|
199
199
|
async function combine(...configs$1) {
|
|
200
|
-
|
|
201
|
-
return resolved.flat();
|
|
200
|
+
return (await Promise.all(configs$1)).flat();
|
|
202
201
|
}
|
|
203
202
|
/**
|
|
204
203
|
* Rename plugin prefixes in a rule object.
|
|
@@ -263,9 +262,7 @@ async function ensurePackages(packages) {
|
|
|
263
262
|
if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
|
|
264
263
|
const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
|
|
265
264
|
if (nonExistingPackages.length === 0) return;
|
|
266
|
-
|
|
267
|
-
const result = await p.confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` });
|
|
268
|
-
if (result) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
|
|
265
|
+
if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
|
|
269
266
|
}
|
|
270
267
|
function isInEditorEnv() {
|
|
271
268
|
if (process.env.CI) return false;
|
|
@@ -378,10 +375,9 @@ async function formatters(options = {}, stylistic$1 = {}) {
|
|
|
378
375
|
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
379
376
|
useTabs: indent === "tab"
|
|
380
377
|
}, options.dprintOptions || {});
|
|
381
|
-
const pluginFormat = await interopDefault(import("eslint-plugin-format"));
|
|
382
378
|
const configs$1 = [{
|
|
383
379
|
name: "liwo/formatter/setup",
|
|
384
|
-
plugins: { format:
|
|
380
|
+
plugins: { format: await interopDefault(import("eslint-plugin-format")) }
|
|
385
381
|
}];
|
|
386
382
|
if (options.css) configs$1.push({
|
|
387
383
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liwo/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"description": "ESLint config by Liwo",
|
|
6
6
|
"author": "Aoang <aoang@x2oe.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"@antfu/install-pkg": "1.1.0",
|
|
49
49
|
"@clack/prompts": "0.11.0",
|
|
50
50
|
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
51
|
-
"@eslint-react/eslint-plugin": "1.
|
|
52
|
-
"@eslint/markdown": "7.
|
|
53
|
-
"@stylistic/eslint-plugin": "5.
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
55
|
-
"@typescript-eslint/parser": "8.
|
|
56
|
-
"@vitest/eslint-plugin": "1.3.
|
|
57
|
-
"eslint": "9.
|
|
51
|
+
"@eslint-react/eslint-plugin": "1.53.1",
|
|
52
|
+
"@eslint/markdown": "7.2.0",
|
|
53
|
+
"@stylistic/eslint-plugin": "5.3.1",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.42.0",
|
|
55
|
+
"@typescript-eslint/parser": "8.42.0",
|
|
56
|
+
"@vitest/eslint-plugin": "1.3.9",
|
|
57
|
+
"eslint": "9.35.0",
|
|
58
58
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
59
59
|
"eslint-flat-config-utils": "2.1.1",
|
|
60
60
|
"eslint-merge-processors": "2.0.0",
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
"eslint-plugin-command": "3.3.1",
|
|
63
63
|
"eslint-plugin-format": "1.0.1",
|
|
64
64
|
"eslint-plugin-import-lite": "0.3.0",
|
|
65
|
-
"eslint-plugin-jsdoc": "
|
|
65
|
+
"eslint-plugin-jsdoc": "56.1.2",
|
|
66
66
|
"eslint-plugin-jsonc": "2.20.1",
|
|
67
|
-
"eslint-plugin-n": "17.
|
|
67
|
+
"eslint-plugin-n": "17.23.0",
|
|
68
68
|
"eslint-plugin-no-only-tests": "3.3.0",
|
|
69
69
|
"eslint-plugin-perfectionist": "4.15.0",
|
|
70
|
-
"eslint-plugin-pnpm": "1.1.
|
|
70
|
+
"eslint-plugin-pnpm": "1.1.1",
|
|
71
71
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
72
72
|
"eslint-plugin-react-refresh": "0.4.20",
|
|
73
|
-
"eslint-plugin-regexp": "2.
|
|
73
|
+
"eslint-plugin-regexp": "2.10.0",
|
|
74
74
|
"eslint-plugin-toml": "0.12.0",
|
|
75
|
-
"eslint-plugin-unicorn": "
|
|
76
|
-
"eslint-plugin-unused-imports": "4.
|
|
77
|
-
"eslint-plugin-vue": "10.
|
|
75
|
+
"eslint-plugin-unicorn": "61.0.2",
|
|
76
|
+
"eslint-plugin-unused-imports": "4.2.0",
|
|
77
|
+
"eslint-plugin-vue": "10.4.0",
|
|
78
78
|
"eslint-plugin-yml": "1.18.0",
|
|
79
79
|
"eslint-processor-vue-blocks": "2.0.0",
|
|
80
|
-
"globals": "16.
|
|
80
|
+
"globals": "16.4.0",
|
|
81
81
|
"jsonc-eslint-parser": "2.4.0",
|
|
82
|
-
"local-pkg": "1.1.
|
|
82
|
+
"local-pkg": "1.1.2",
|
|
83
83
|
"parse-gitignore": "2.0.0",
|
|
84
84
|
"toml-eslint-parser": "0.10.0",
|
|
85
85
|
"vue-eslint-parser": "10.2.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@eslint/config-inspector": "^1.1.0",
|
|
90
90
|
"@prettier/plugin-xml": "^3.4.2",
|
|
91
|
-
"@types/node": "24.
|
|
91
|
+
"@types/node": "24.5.0",
|
|
92
92
|
"@unocss/eslint-plugin": "^66.3.3",
|
|
93
93
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
94
94
|
"eslint-typegen": "^2.2.1",
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"react": "^19.1.0",
|
|
100
100
|
"simple-git-hooks": "^2.13.0",
|
|
101
101
|
"tinyglobby": "^0.2.14",
|
|
102
|
-
"tsdown": "^0.
|
|
102
|
+
"tsdown": "^0.14.2",
|
|
103
103
|
"tsx": "^4.20.3",
|
|
104
104
|
"typescript": "^5.8.3",
|
|
105
105
|
"vitest": "^3.2.4",
|
|
106
106
|
"vue": "^3.5.17",
|
|
107
|
-
"@liwo/eslint-config": "0.0.
|
|
107
|
+
"@liwo/eslint-config": "0.0.6"
|
|
108
108
|
},
|
|
109
109
|
"simple-git-hooks": {
|
|
110
110
|
"pre-commit": "npx lint-staged"
|