@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 CHANGED
@@ -1,7 +1,6 @@
1
1
  import process from "node:process";
2
2
  import { styleText } from "node:util";
3
- import yargs from "yargs";
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.7.2";
12
+ var version = "4.8.0";
14
13
  var devDependencies = {
15
- "@antfu/ni": "^26.1.0",
16
- "@eslint-react/eslint-plugin": "^2.2.2",
17
- "@eslint/config-inspector": "^1.3.0",
18
- "@types/eslint-config-prettier": "^6.11.3",
19
- "@types/node": "^24.7.2",
20
- "@types/prompts": "^2.4.9",
21
- "@types/yargs": "^17.0.33",
22
- "@unocss/eslint-plugin": "^66.5.3",
23
- "bumpp": "^10.3.1",
24
- "eslint": "^9.37.0",
25
- "eslint-plugin-react-hooks": "7.0.0",
26
- "eslint-plugin-react-refresh": "^0.4.23",
27
- "eslint-plugin-svelte": "^3.12.4",
28
- "eslint-plugin-tailwindcss": "^3.18.2",
29
- "eslint-typegen": "^2.3.0",
30
- "jiti": "^2.6.1",
31
- "nano-staged": "^0.8.0",
32
- "prettier": "^3.6.2",
33
- "publint": "^0.3.14",
34
- "simple-git-hooks": "^2.13.1",
35
- "svelte": "^5.40.0",
36
- "svelte-eslint-parser": "^1.3.3",
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
- yargs(hideBin(process.argv)).scriptName("@coderwyd/eslint-config").usage("").command("*", "Run the initialization or migration", (args) => args.option("yes", {
170
- alias: "y",
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
- }).showHelpOnFail(false).alias("h", "help").version("version", version).alias("v", "version").help().argv;
176
+ });
177
+ cli.help();
178
+ cli.version(version);
179
+ cli.parse();
184
180
 
185
181
  //#endregion
186
182
  export { };