@coderwyd/eslint-config 4.7.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +30 -34
- package/dist/index.d.ts +226 -143
- package/dist/index.js +40 -1
- package/package.json +23 -25
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import { styleText } from "node:util";
|
|
3
|
-
import
|
|
4
|
-
import { hideBin } from "yargs/helpers";
|
|
3
|
+
import { cac } from "cac";
|
|
5
4
|
import fs from "node:fs";
|
|
6
5
|
import fsp from "node:fs/promises";
|
|
7
6
|
import path from "node:path";
|
|
@@ -10,33 +9,30 @@ import prompts from "prompts";
|
|
|
10
9
|
import { execSync } from "node:child_process";
|
|
11
10
|
|
|
12
11
|
//#region package.json
|
|
13
|
-
var version = "4.
|
|
12
|
+
var version = "4.8.0";
|
|
14
13
|
var devDependencies = {
|
|
15
|
-
"@
|
|
16
|
-
"@eslint
|
|
17
|
-
"@eslint
|
|
18
|
-
"@types/
|
|
19
|
-
"@types/
|
|
20
|
-
"@
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"eslint": "
|
|
25
|
-
"eslint-plugin-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"tsdown": "^0.15.7",
|
|
38
|
-
"typescript": "^5.9.3",
|
|
39
|
-
"unplugin-unused": "^0.5.4"
|
|
14
|
+
"@eslint-react/eslint-plugin": "catalog:peer",
|
|
15
|
+
"@eslint/config-inspector": "catalog:dev",
|
|
16
|
+
"@types/eslint-config-prettier": "catalog:dev",
|
|
17
|
+
"@types/node": "catalog:dev",
|
|
18
|
+
"@types/prompts": "catalog:dev",
|
|
19
|
+
"@unocss/eslint-plugin": "catalog:peer",
|
|
20
|
+
"bumpp": "catalog:dev",
|
|
21
|
+
"eslint": "catalog:peer",
|
|
22
|
+
"eslint-plugin-react-hooks": "catalog:peer",
|
|
23
|
+
"eslint-plugin-react-refresh": "catalog:peer",
|
|
24
|
+
"eslint-plugin-svelte": "catalog:peer",
|
|
25
|
+
"eslint-plugin-tailwindcss": "catalog:peer",
|
|
26
|
+
"eslint-typegen": "catalog:dev",
|
|
27
|
+
"jiti": "catalog:dev",
|
|
28
|
+
"nano-staged": "catalog:dev",
|
|
29
|
+
"prettier": "catalog:dev",
|
|
30
|
+
"publint": "catalog:dev",
|
|
31
|
+
"simple-git-hooks": "catalog:dev",
|
|
32
|
+
"svelte-eslint-parser": "catalog:peer",
|
|
33
|
+
"tsdown": "catalog:dev",
|
|
34
|
+
"typescript": "catalog:dev",
|
|
35
|
+
"unplugin-unused": "catalog:dev"
|
|
40
36
|
};
|
|
41
37
|
|
|
42
38
|
//#endregion
|
|
@@ -166,11 +162,8 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
|
|
|
166
162
|
function header() {
|
|
167
163
|
console.log(`\n${styleText("green", `@coderwyd/eslint-config `)}${styleText("dim", `v${version}`)}`);
|
|
168
164
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
description: "Skip prompts and use default values",
|
|
172
|
-
type: "boolean"
|
|
173
|
-
}).help(), async (args) => {
|
|
165
|
+
const cli = cac("@coderwyd/eslint-config");
|
|
166
|
+
cli.command("", "Run the initialization or migration").option("--yes, -y", "Skip prompts and use default values", { default: false }).action(async (args) => {
|
|
174
167
|
header();
|
|
175
168
|
console.log();
|
|
176
169
|
try {
|
|
@@ -180,7 +173,10 @@ yargs(hideBin(process.argv)).scriptName("@coderwyd/eslint-config").usage("").com
|
|
|
180
173
|
console.error(styleText("red", `${CROSS} ${String(error)}`));
|
|
181
174
|
process.exit(1);
|
|
182
175
|
}
|
|
183
|
-
})
|
|
176
|
+
});
|
|
177
|
+
cli.help();
|
|
178
|
+
cli.version(version);
|
|
179
|
+
cli.parse();
|
|
184
180
|
|
|
185
181
|
//#endregion
|
|
186
182
|
export { };
|