Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode shows typescript related problems in jsconfig.json file

I set up a normal create-react-app project and add jsconfig.json to the root directory. But it shows the error which is typescript related. problems in Vscode terminal Here is the jsconfig.json file

jsconfig.json configurations

Folder structure

enter image description here

Can anyone help me with this?

Thanks, Prakhil

like image 905
Prakhil TP Avatar asked Apr 18 '20 09:04

Prakhil TP


People also ask

What is Jsconfig json file?

The jsconfig. json file specifies the root files and the options for the features provided by the JavaScript language service.

Where is settings json Vscode?

Shift + CMD + P. Type "settings" Click on "Preferences: Open Settings (JSON)"

How does Tsconfig work?

The tsconfig.json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig.json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.


1 Answers

Open the settings.json file, add the below line and then save.

 "json.schemas": [
      { 
        "$schema": "https://json.schemastore.org/jsconfig" 
      }
    ]

enter image description here

like image 51
Anees Hameed Avatar answered Oct 31 '22 04:10

Anees Hameed