@coderwyd/eslint-config 4.7.2 → 4.9.1

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![release status](https://github.com/coderwyd/eslint-config/actions/workflows/release.yml/badge.svg)](https://github.com/coderwyd/eslint-config/actions/workflows/release.yml)
4
4
  [![npm](https://img.shields.io/npm/v/@coderwyd/eslint-config.svg)](https://npmjs.org/package/@coderwyd/eslint-config)
5
- [![downloads](https://img.shields.io/npm/dm/@coderwyd/eslint-config.svg)](https://npmjs.org/package/@coderwyd/eslint-config)
5
+ [![downloads](https://img.shields.io/npm/dy/@coderwyd/eslint-config.svg)](https://npmjs.org/package/@coderwyd/eslint-config)
6
6
 
7
7
  ## Feature
8
8
 
@@ -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,31 @@ 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.9.1";
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
+ "@typescript/native-preview": "catalog:dev",
20
+ "@unocss/eslint-plugin": "catalog:peer",
21
+ "bumpp": "catalog:dev",
22
+ "eslint": "catalog:peer",
23
+ "eslint-plugin-react-hooks": "catalog:peer",
24
+ "eslint-plugin-react-refresh": "catalog:peer",
25
+ "eslint-plugin-svelte": "catalog:peer",
26
+ "eslint-plugin-tailwindcss": "catalog:peer",
27
+ "eslint-typegen": "catalog:dev",
28
+ "jiti": "catalog:dev",
29
+ "nano-staged": "catalog:dev",
30
+ "prettier": "catalog:dev",
31
+ "publint": "catalog:dev",
32
+ "simple-git-hooks": "catalog:dev",
33
+ "svelte-eslint-parser": "catalog:peer",
34
+ "tsdown": "catalog:dev",
35
+ "typescript": "catalog:dev",
36
+ "unplugin-unused": "catalog:dev"
40
37
  };
41
38
 
42
39
  //#endregion
@@ -166,11 +163,8 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
166
163
  function header() {
167
164
  console.log(`\n${styleText("green", `@coderwyd/eslint-config `)}${styleText("dim", `v${version}`)}`);
168
165
  }
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) => {
166
+ const cli = cac("@coderwyd/eslint-config");
167
+ cli.command("", "Run the initialization or migration").option("--yes, -y", "Skip prompts and use default values", { default: false }).action(async (args) => {
174
168
  header();
175
169
  console.log();
176
170
  try {
@@ -180,7 +174,10 @@ yargs(hideBin(process.argv)).scriptName("@coderwyd/eslint-config").usage("").com
180
174
  console.error(styleText("red", `${CROSS} ${String(error)}`));
181
175
  process.exit(1);
182
176
  }
183
- }).showHelpOnFail(false).alias("h", "help").version("version", version).alias("v", "version").help().argv;
177
+ });
178
+ cli.help();
179
+ cli.version(version);
180
+ cli.parse();
184
181
 
185
182
  //#endregion
186
183
  export { };