When Vue framework is being used, in the right bottom corner, Vue label before TypeScript 〈version〉 is being displayed:
What wrong is in this Vue mode, the TypeScript errors highlighting does not work even outside of .vue
files. For example, I'll declare the const without initialization. Normally, it will cause at least TS1155: 'const' declarations must be initializaed
:
But in the project with Vue, GUI will not notify about TypeScript errors:
ESLint is complying but TypeScript is no.
The IDE needs to know which tsconfig.json
do each TypeScript file obeys.
To specify it, either files
or include
must be filled.
In the files case, besides specific files we can specify also directories:
{
"compilerOptions": {
"baseUrl": "./"
},
"files": [
"Source",
"Tests"
]
}
In the include
case, although "include": [ "Source/**/*", "Tests/**/*" ]
is valid TypeScript config, the IDE will not understand it:
To fix it, append ./
to each pattern:
{
"compilerOptions": {
"baseUrl": "./"
},
"include": [
"./Source/**/*",
"./Tests/**/*"
]
}