Reputation: 849
I have created a react native project with the following command. VS Code gives about 200 ts errors in the Problems section but I am able to compile with tsc.
npx react-native init MyApp --template react-native-template-typescript
Any idea why VS Code is doing like this? Thanks
Upvotes: 1
Views: 214
Reputation: 30545
do you have eslint installed and enabled?
try npm remove -g eslint
and also check your extensions
I am suspecting that you have an incompatible linting extension.
another reason might be vscode identifies *.ts as typescript files and *.tsx as typescript react files. when you open file check bottom right corner of the vscode to see how the file is interpreted.
Upvotes: 1