@vida0905/eslint-config 2.10.0 → 2.10.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.
@@ -6,7 +6,7 @@ import path from "node:path";
6
6
  import { styleText } from "node:util";
7
7
 
8
8
  //#region package.json
9
- var version = "2.10.0";
9
+ var version = "2.10.1";
10
10
 
11
11
  //#endregion
12
12
  //#region src/cli/constants.ts
@@ -64,6 +64,7 @@ const vscodeSettingsString = `
64
64
 
65
65
  //#endregion
66
66
  //#region src/cli/update/update-vscode-settings.ts
67
+ const CLOSING_BRACE_REGEX = /\s*\}$/;
67
68
  async function updateVSCodeSettings() {
68
69
  const cwd = process.cwd();
69
70
  const dotVscodePath = path.join(cwd, ".vscode");
@@ -74,7 +75,7 @@ async function updateVSCodeSettings() {
74
75
  console.log(styleText("green", "Created .vscode/settings.json"));
75
76
  } else {
76
77
  let settingsContent = await fsp.readFile(settingsPath, "utf8");
77
- settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
78
+ settingsContent = settingsContent.trim().replace(CLOSING_BRACE_REGEX, "");
78
79
  settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
79
80
  settingsContent += `${vscodeSettingsString}}\n`;
80
81
  await fsp.writeFile(settingsPath, settingsContent, "utf-8");
package/dist/index.d.mts CHANGED
@@ -64,6 +64,10 @@ interface RuleOptions {
64
64
  * Prefer .includes() over indexOf() comparisons for arrays and strings
65
65
  */
66
66
  'e18e/prefer-includes'?: Linter.RuleEntry<[]>;
67
+ /**
68
+ * Prefer inline equality checks over temporary object creation for simple comparisons
69
+ */
70
+ 'e18e/prefer-inline-equality'?: Linter.RuleEntry<[]>;
67
71
  /**
68
72
  * Prefer nullish coalescing operator (?? and ??=) over verbose null checks
69
73
  */
@@ -80,6 +84,10 @@ interface RuleOptions {
80
84
  * Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
81
85
  */
82
86
  'e18e/prefer-spread-syntax'?: Linter.RuleEntry<[]>;
87
+ /**
88
+ * Prefer defining regular expressions at module scope to avoid re-compilation on every function call
89
+ */
90
+ 'e18e/prefer-static-regex'?: Linter.RuleEntry<[]>;
83
91
  /**
84
92
  * Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
85
93
  */
package/dist/index.mjs CHANGED
@@ -200,5 +200,4 @@ function applyOptions(options) {
200
200
  }
201
201
  return options;
202
202
  }
203
- var src_default = defineConfig;
204
- export { applyOptions, src_default as default, defineConfig };
203
+ export { applyOptions, defineConfig as default, defineConfig };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vida0905/eslint-config",
3
3
  "type": "module",
4
- "version": "2.10.0",
4
+ "version": "2.10.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,21 +40,23 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@antfu/eslint-config": "^7.2.0",
44
- "@e18e/eslint-plugin": "^0.1.4",
43
+ "@antfu/eslint-config": "^7.4.3",
44
+ "@e18e/eslint-plugin": "^0.2.0",
45
45
  "cac": "^6.7.14",
46
- "eslint-flat-config-utils": "^3.0.0",
46
+ "eslint-flat-config-utils": "^3.0.1",
47
47
  "eslint-plugin-de-morgan": "^2.0.0",
48
48
  "local-pkg": "^1.1.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/node": "^25.2.0",
51
+ "@arethetypeswrong/core": "^0.18.2",
52
+ "@types/node": "^25.3.0",
52
53
  "es-toolkit": "^1.44.0",
53
- "eslint": "^9.39.2",
54
- "eslint-typegen": "^2.3.0",
54
+ "eslint": "^10.0.1",
55
+ "eslint-typegen": "^2.3.1",
55
56
  "husky": "^9.1.7",
56
57
  "nano-staged": "^0.9.0",
57
- "tsdown": "^0.20.1",
58
+ "publint": "^0.3.17",
59
+ "tsdown": "^0.20.3",
58
60
  "tsx": "^4.21.0",
59
61
  "typescript": "^5.9.3",
60
62
  "vitest": "^4.0.18"