When working in VSCode, I came across this warning:
https://i.sstatic.net/jvUsk.png
The line of code that triggered the TypeScript warning is:
import packageJson from "../package.json";
Interestingly, the project builds and lints without any issues:
$ tsc --project .
✨ Done in 1.16s.
$ tslint --config ../../tslint.json --project .
✨ Done in 1.59s.
I'm curious if this warning is specific to the VSCode parser or if there might be an error in my tsconfig.json
file.
// tsconfig.json
{
"exclude": [
"node_modules"
],
"extends": "../../tsconfig.json",
"files": [
"package.json"
],
"include": [
"src/**/*"
],
"compilerOptions": {
/* Basic Options */
"outDir": "dist",
/* Module Resolution Options */
"baseUrl": ".",
}
}