@vida0905/eslint-config 2.1.0 → 2.1.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.
Files changed (2) hide show
  1. package/dist/cli/index.js +8 -10
  2. package/package.json +10 -11
package/dist/cli/index.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import process from "node:process";
2
- import yargs from "yargs";
3
- import { hideBin } from "yargs/helpers";
2
+ import { cac } from "cac";
4
3
  import fs from "node:fs";
5
4
  import fsp from "node:fs/promises";
6
5
  import path from "node:path";
7
6
  import { green } from "ansis";
8
7
 
9
8
  //#region package.json
10
- var version = "2.1.0";
9
+ var version = "2.1.1";
11
10
 
12
11
  //#endregion
13
12
  //#region src/cli/constants.ts
@@ -91,18 +90,17 @@ async function run(options = {}) {
91
90
 
92
91
  //#endregion
93
92
  //#region src/cli/index.ts
94
- const instance = yargs(hideBin(process.argv)).scriptName("@vida0905/eslint-config").usage("").command("*", "Run the initialization", (args) => args.option("vscode", {
95
- description: "Update .vscode/settings.json",
96
- type: "boolean",
97
- default: true
98
- }), async (args) => {
93
+ const cli = cac("@vida0905/eslint-config");
94
+ cli.command("update", "update configuration files").option("--vscode", "Update .vscode/settings.json").action(async (args) => {
99
95
  try {
100
96
  await run(args);
101
97
  } catch (error) {
102
98
  console.error(`✘ ${String(error)}`);
103
99
  process.exit(1);
104
100
  }
105
- }).showHelpOnFail(false).alias("h", "help").version("version", version).alias("v", "version");
106
- instance.help().argv;
101
+ });
102
+ cli.help();
103
+ cli.version(version);
104
+ cli.parse();
107
105
 
108
106
  //#endregion
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@vida0905/eslint-config",
3
3
  "type": "module",
4
- "version": "2.1.0",
5
- "packageManager": "pnpm@10.3.0",
4
+ "version": "2.1.1",
5
+ "packageManager": "pnpm@10.4.1",
6
6
  "description": "Vida Xie's ESLint Config",
7
7
  "author": "Vida Xie <vida_2020@163.com> (https://github.com/9romise/)",
8
8
  "license": "MIT",
@@ -41,25 +41,24 @@
41
41
  "eslint": ">=9.10.0"
42
42
  },
43
43
  "dependencies": {
44
- "@antfu/eslint-config": "^4.2.0",
45
- "ansis": "^3.14.0",
44
+ "@antfu/eslint-config": "^4.3.0",
45
+ "ansis": "^3.15.0",
46
+ "cac": "^6.7.14",
46
47
  "eslint-flat-config-utils": "^2.0.1",
47
- "eslint-import-resolver-oxc": "^0.10.1",
48
+ "eslint-import-resolver-oxc": "^0.11.0",
48
49
  "eslint-plugin-de-morgan": "^1.0.1",
49
50
  "eslint-plugin-pinia": "^0.4.1",
50
- "local-pkg": "^1.0.0",
51
- "yargs": "^17.7.2"
51
+ "local-pkg": "^1.0.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@eslint/config-inspector": "^1.0.0",
55
55
  "@types/node": "^22.13.4",
56
- "@types/yargs": "^17.0.33",
57
56
  "eslint": "^9.20.1",
58
- "eslint-typegen": "^1.0.0",
57
+ "eslint-typegen": "^2.0.0",
59
58
  "lint-staged": "^15.4.3",
60
- "oxc-transform": "^0.50.0",
59
+ "oxc-transform": "^0.51.0",
61
60
  "simple-git-hooks": "^2.11.1",
62
- "tsdown": "^0.5.9",
61
+ "tsdown": "^0.5.10",
63
62
  "tsx": "^4.19.2",
64
63
  "typescript": "^5.7.3"
65
64
  },