@zjutjh/eslint-config 0.3.0 → 0.3.2

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
@@ -15,6 +15,9 @@ zjutjh 的 ESLint 配置,适用于 JS, TS, Vue3 项目。
15
15
  $ pnpm add -D eslint
16
16
 
17
17
  $ pnpm add -D @zjutjh/eslint-config
18
+
19
+ # 如果你想使用 ts 编写配置文件,还需要安装 typescript, jiti 来帮助 eslint 解析配置
20
+ $ pnpm add -D typescript jiti
18
21
  ```
19
22
 
20
23
  ```ts
package/dist/index.js CHANGED
@@ -130,6 +130,10 @@ function getOverrides(options, key) {
130
130
 
131
131
  // src/configs/typescript.ts
132
132
  async function typescript(options) {
133
+ await ensurePackages([
134
+ "@typescript-eslint/eslint-plugin",
135
+ "@typescript-eslint/parser"
136
+ ]);
133
137
  const [
134
138
  pluginTs,
135
139
  parserTs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zjutjh/eslint-config",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "license": "ISC",
6
6
  "author": "zjutjh",
7
7
  "description": "Eslint config used by zjutjh",
@@ -14,6 +14,12 @@
14
14
  }
15
15
  },
16
16
  "types": "./dist/index.d.ts",
17
+ "engines": {
18
+ "node": ">=18.18.0"
19
+ },
20
+ "publishConfig": {
21
+ "registry": "https://registry.npmjs.org/"
22
+ },
17
23
  "peerDependencies": {
18
24
  "@typescript-eslint/eslint-plugin": "^8.21.0",
19
25
  "@typescript-eslint/parser": "^8.21.0",
@@ -58,6 +64,7 @@
58
64
  "scripts": {
59
65
  "build": "tsup --format esm --clean --dts",
60
66
  "lint": "eslint .",
67
+ "typecheck": "tsc --noEmit",
61
68
  "dev": "config-inspector",
62
69
  "release": "pnpm build && bumpp && pnpm publish --access public"
63
70
  }