johnsoncodehk / vue-tsc

vue-tsc --noEmit && vite build
https://www.npmjs.com/package/vue-tsc
MIT License
241 stars 6 forks source link

Only validate files with lang="ts" #42

Closed NikhilVerma closed 3 years ago

NikhilVerma commented 3 years ago

Currently vue-tsc seems to validate all vue files regardless if they use Typescript or not. If a project is adopting Typescript it makes it difficult to use vue-tsc.

johnsoncodehk commented 3 years ago

You could config "allowJs": false in tsconfig to ignore <script lang="js">.

NikhilVerma commented 3 years ago

@johnsoncodehk What you are referring to is the checkJs flag. allowJs flag simply allows TS to scan JS files, not validate them. I believe this issue is still relevant.