Skip to content

Commit d3bf448

Browse files
committed
Type-checking for the generated eslint.config.mts
1 parent b4ad9dd commit d3bf448

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

packages/create-vue-lib/src/template/base/config/package.json.ejs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
<%_ } _%>
1717
"test:unit": "pnpm run --filter ./packages/<%- config.mainPackageDirName %> -r test:unit",
1818
"coverage": "pnpm run --filter ./packages/<%- config.mainPackageDirName %> -r coverage",
19-
"type-check": "pnpm run -r type-check",
2019
<%_ if (config.includeEsLint) { _%>
20+
"type-check": "run-p type-check:*",
21+
"type-check:packages": "pnpm run -r type-check",
22+
"type-check:self": "tsc",
2123
"lint": "eslint",
2224
"lint:fix": "eslint --fix",
2325
"lint:staged": "lint-staged",
26+
<%_ } else { _%>
27+
"type-check": "pnpm run -r type-check",
2428
<%_ } _%>
2529
"build": "pnpm run -r build",
2630
"preinstall": "node scripts/preinstall.js",
@@ -44,15 +48,20 @@
4448
<%_ if (config.includeEsLintStylistic) { _%>
4549
"@stylistic/eslint-plugin": "^4.0.0",
4650
<%_ } _%>
51+
"@tsconfig/node22": "^22.0.0",
52+
"@types/node": "^22.13.0",
4753
"@typescript-eslint/parser": "^8.23.0",
4854
"@vitest/eslint-plugin": "1.1.25",
4955
"@vue/eslint-config-typescript": "^14.3.0",
5056
"eslint": "^9.18.0",
5157
"eslint-plugin-vue": "^9.32.0",
5258
"jiti": "^2.4.2",
5359
"lint-staged": "^15.4.3",
54-
<%_ } _%>
5560
"npm-run-all2": "^7.0.2",
56-
"simple-git-hooks": "^2.11.1"
61+
<%_ } _%>
62+
"simple-git-hooks": "^2.11.1",
63+
<%_ if (config.includeEsLint) { _%>
64+
"typescript": "^5.7.3"
65+
<%_ } _%>
5766
}
5867
}

packages/create-vue-lib/src/template/base/config/tsconfig.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@tsconfig/node22/tsconfig.json",
3+
"include": ["eslint.config.*"],
4+
"compilerOptions": {
5+
"noEmit": true,
6+
"module": "ESNext",
7+
"moduleResolution": "Bundler",
8+
"types": ["node"]
9+
}
10+
}

0 commit comments

Comments
 (0)