Skip to content

Commit b13089f

Browse files
committed
fix: use --build for type-checking to be exaustive and less-fragile
Fixes #267 Thanks @segevfiner for noticing this new feature! Currently there's still a small annoyance that `vue-tsc` would output an extra error message when there're type errors in `.vue` files vuejs/language-tools#2622 But it works well if there's no error. I've already submitted a PR to address it vuejs/language-tools#3176
1 parent cf1f981 commit b13089f

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

Diff for: template/base/_gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ coverage
2626
*.njsproj
2727
*.sln
2828
*.sw?
29+
30+
*.tsbuildinfo

Diff for: template/config/typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"scripts": {
33
"build": "run-p type-check build-only",
44
"build-only": "vite build",
5-
"type-check": "vue-tsc --noEmit"
5+
"type-check": "vue-tsc --build"
66
},
77
"devDependencies": {
88
"@types/node": "^18.16.3",

Diff for: template/tsconfig/base/tsconfig.app.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"exclude": ["src/**/__tests__/*"],
55
"compilerOptions": {
66
"composite": true,
7+
"noEmit": true,
78
"baseUrl": ".",
89
"paths": {
910
"@/*": ["./src/*"]

Diff for: template/tsconfig/base/tsconfig.node.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
44
"compilerOptions": {
55
"composite": true,
6+
"noEmit": true,
67
"module": "ESNext",
78
"types": ["node"]
89
}

Diff for: template/tsconfig/cypress-ct/package.json

-5
This file was deleted.

Diff for: template/tsconfig/vitest/package.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"scripts": {
3-
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
4-
},
52
"devDependencies": {
63
"@types/jsdom": "^21.1.1"
74
}

0 commit comments

Comments
 (0)