@vida0905/eslint-config 2.6.1 → 2.7.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/dist/cli/index.js CHANGED
@@ -3,10 +3,10 @@ import { cac } from "cac";
3
3
  import fs from "node:fs";
4
4
  import fsp from "node:fs/promises";
5
5
  import path from "node:path";
6
- import { green } from "ansis";
6
+ import { styleText } from "node:util";
7
7
 
8
8
  //#region package.json
9
- var version = "2.6.1";
9
+ var version = "2.7.1";
10
10
 
11
11
  //#endregion
12
12
  //#region src/cli/constants.ts
@@ -71,14 +71,14 @@ async function updateVSCodeSettings() {
71
71
  if (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });
72
72
  if (!fs.existsSync(settingsPath)) {
73
73
  await fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\n`, "utf-8");
74
- console.log(green`Created .vscode/settings.json`);
74
+ console.log(styleText("green", "Created .vscode/settings.json"));
75
75
  } else {
76
76
  let settingsContent = await fsp.readFile(settingsPath, "utf8");
77
77
  settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
78
78
  settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
79
79
  settingsContent += `${vscodeSettingsString}}\n`;
80
80
  await fsp.writeFile(settingsPath, settingsContent, "utf-8");
81
- console.log(green`Updated .vscode/settings.json`);
81
+ console.log(styleText("green", "Updated .vscode/settings.json"));
82
82
  }
83
83
  }
84
84
 
package/dist/index.js CHANGED
@@ -127,7 +127,7 @@ function applyOptions(options) {
127
127
  const optionVal = options[key];
128
128
  const defaultVal = antfuConfig[key];
129
129
  if (optionVal === true) options[key] = defaultVal;
130
- else if (optionVal !== false) options[key] = optionVal ? deepMerge(optionVal, defaultVal) : defaultVal;
130
+ else if (optionVal !== false) options[key] = optionVal ? deepMerge(defaultVal, optionVal) : defaultVal;
131
131
  });
132
132
  return options;
133
133
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vida0905/eslint-config",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.7.1",
5
5
  "description": "Vida Xie's ESLint Config",
6
6
  "author": "Vida Xie <vida_2020@163.com> (https://github.com/9romise/)",
7
7
  "license": "MIT",
@@ -40,22 +40,21 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@antfu/eslint-config": "^5.3.0",
44
- "ansis": "^4.1.0",
43
+ "@antfu/eslint-config": "^5.4.1",
45
44
  "cac": "^6.7.14",
46
- "eslint-flat-config-utils": "^2.1.1",
47
- "eslint-plugin-de-morgan": "^1.3.1",
45
+ "eslint-flat-config-utils": "^2.1.4",
46
+ "eslint-plugin-de-morgan": "^2.0.0",
48
47
  "local-pkg": "^1.1.2"
49
48
  },
50
49
  "devDependencies": {
51
- "@types/node": "^24.3.3",
52
- "eslint": "^9.35.0",
50
+ "@types/node": "^24.6.1",
51
+ "eslint": "^9.36.0",
53
52
  "eslint-typegen": "^2.3.0",
54
53
  "husky": "^9.1.7",
55
54
  "nano-staged": "^0.8.0",
56
- "tsdown": "^0.15.1",
57
- "tsx": "^4.20.5",
58
- "typescript": "^5.9.2",
55
+ "tsdown": "^0.15.6",
56
+ "tsx": "^4.20.6",
57
+ "typescript": "^5.9.3",
59
58
  "vitest": "^3.2.4"
60
59
  },
61
60
  "nano-staged": {