I have a Vue3 app and using VSCode. Using the npm run type-check
command will show me the vue-tsc errors. I’m trying to find a way to show these errors in VSCode, like eslint does.
Does anybody know if this possible?
I have the lastest versions of typescript, vue and vue-tsc npm packages, as well as VSCode and the Vue – Official extension.
2
Answers
The issue was that the rootDir and baseUrl values were not configured correctly in the tsconfig.app.json file.
After changing these settings to the correct values, I get the errors and warnings in VSCode from Volar.
Go to this part of the documentation, and give a try to the following snippet
With the official Vue VScode extension (using Volar behind the scenes) + brand new project generated with the Vue CLI, it should work well (works even without asking for TS during the project creation on my side).
Feel free to share a Github repo if it doesn’t.