I'm using typescript on react native. When there is an error in one of my files, vscode doesn't show it in "Problems" tab unless I've that file opened.
Before Opening the file:

After Opening the file:

tsconfig.json:
{
"extends": "@tsconfig/react-native/tsconfig.json"
}
@tsconfig/react-native/tsconfig.json:
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "React Native",
"_version": "2.0.3",
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"types": ["react-native", "jest"],
"lib": [
"es2019"
],
"allowJs": true,
"jsx": "react-native",
"noEmit": true,
"isolatedModules": true,
"strict": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
}
What do I do such that all errors are shown in problem tab and the files in sidebar have red underlines?
settings.json file."typescript.tsserver.experimental.enableProjectDiagnostics": true,
This is still an experimental feature. You can track this feature request on GitHub for updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With