Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

789
Visualizações
Auto Imports in VSCode using React not working

I have an issue and don't know the reason or how to fix it. VS Code doesn't underline the incorrect path for imports in case if they are wrong. Also the auto import does not work. I tried to setup a jsconfig file to use the absolute paths, but without any result. I use this extension for auto import.

jsconfig.json

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"],
  "exclude": ["node_modules"]
}

eslintrc.json

{
  "env": {
    "node": true,
    "browser": true,
    "es2021": true
  },
  "extends": ["plugin:react/recommended", "prettier", "prettier/prettier", "plugin:prettier/recommended", "eslint:recommended"],
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 12,
    "sourceType": "module"
  },
  "plugins": ["react", "react-hooks"],
  "rules": {
    "no-return-await": "warn",
    "camelcase": "error",
    "react/jsx-key": "off",
    "react/prop-types": "off",
    "prettier/prettier": ["off", { "singleQuote": true }],
    "react/jsx-filename-extension": [
      "warn",
      {
        "extensions": [".jsx"]
      }
    ],
    "max-len": [
      "warn",
      {
        "code": 140
      }
    ],
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "off",
    "import/prefer-default-export": "off"
  },
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

Does anybody know what I should do to get the wrong imports highlighted and the auto import working? Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

well sometimes you have to configures the Vscode Settings and check their properties try this extension

VSCODE EXT

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda