Skip to content

Commit

Permalink
fix: use --build for type-checking to be exaustive and less-fragile
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sodatea committed May 12, 2023
1 parent cf1f981 commit b13089f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
2 changes: 2 additions & 0 deletions template/base/_gitignore
Expand Up @@ -26,3 +26,5 @@ coverage
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
2 changes: 1 addition & 1 deletion template/config/typescript/package.json
Expand Up @@ -2,7 +2,7 @@
"scripts": {
"build": "run-p type-check build-only",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit"
"type-check": "vue-tsc --build"
},
"devDependencies": {
"@types/node": "^18.16.3",
Expand Down
1 change: 1 addition & 0 deletions template/tsconfig/base/tsconfig.app.json
Expand Up @@ -4,6 +4,7 @@
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
Expand Down
1 change: 1 addition & 0 deletions template/tsconfig/base/tsconfig.node.json
Expand Up @@ -3,6 +3,7 @@
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"compilerOptions": {
"composite": true,
"noEmit": true,
"module": "ESNext",
"types": ["node"]
}
Expand Down
5 changes: 0 additions & 5 deletions template/tsconfig/cypress-ct/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions template/tsconfig/vitest/package.json
@@ -1,7 +1,4 @@
{
"scripts": {
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
},
"devDependencies": {
"@types/jsdom": "^21.1.1"
}
Expand Down

0 comments on commit b13089f

Please sign in to comment.