Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

633
Views
configure vscode react native auto-imports without ts errors

I'm working on a React Native project using Javascript.

I want vscode to display the quick fix imports suggestion like this one:

enter image description here

The problem is that it also displays typescript errors, like this one:

enter image description here

Here is my jsconfig.json file:

{
"compilerOptions": {
  "target": "ES6",
  "module": "commonjs",
  "allowSyntheticDefaultImports": true,
  "checkJs": true,
  "jsx": "react-native"
},
"exclude": ["node_modules"],
"include": ["src/**/*"]
}

I've realised that if I comment out "checkJs": true, the errors are gone but then the import suggestions doesn't appear anymore.

Here my settings.json:

{
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "JetBrains Mono",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.formatOnSave": true,
"git.autofetch": true,
"git.confirmSync": false,
"[javascript]": {
    
    "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"terminal.external.osxExec": "iTerm.app",
"typescript.validate.enable": false,
"javascript.suggestionActions.enabled": true,
}

I've already read many posts and played around disabling typescript and javascript validation "typescript.validate.enable": false, but nothing seems to work.

Any ideas? I'm coming from webstorm so I'm not really used to vscode.

Any help would be really appreciated. Thanks!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I don't understand why you need a config for auto imports, but you could install the Auto import snippet from VSC snippets, here is the link try it.

also, the error from your typescript is not related to the auto import, it is a typescript error, your touchableOpacity still missing some props.

about 4 years ago · Juan Pablo Isaza Report

0

The best way is to create jsconfig.json and type in:

{
  "compilerOptions": {
    "module": "CommonJS",
    "jsx": "preserve",
    "checkJs": true
  },
  "exclude": ["node_modules", "**/node_modules/*"]
}

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!