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

225
Visualizações
VSCode Node.js intellisense and linting issues

I have a couple of annoying issues with VSCode for some time. I'm on version 1.68.1 and working in Node.js on MacOS. For the purposes of this test, I created a setup as follows:

projectDir
 - package.json
 - logger.js
 - index.js

The package.json is inconsequential here but the other two files are as follows.

logger.js

const logger = (msg) => {
    console.log(msg);
}

module.exports = { logger };

index.js

const { logger } = require("./logger");

someFunc();
logger("Hello!");

Here are the two things I'm struggling with:

  1. Unimported functions are not flagged. For example, there's a call to someFunc() in index.js but VSCode has no problems with it. It's the same with undeclared variables. If I add a = zz; in the file, there are no warnings.
  2. If I close the logger.js file, I can't autocomplete the import. What I mean is, if the logger.js file is open, then I can just type "logger" and select the import from the suggestions list, but it doesn't happen if the file is closed. I'm not sure if this is how it's supposed to be, but it's very annoying once there are more than 10-15 files in the project as I need to manually open them before VSCode becomes "aware" of their exports.

Sorry if this is all silly, but these two things have been impacting my workflow. Please feel free to ask for more info!

about 4 years ago · Juan Pablo Isaza
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