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

190
Visualizações
ESLint CLI not picking up all errors that VSCode plugin is highlighting

I've been using eslint in VSCode and have the plugin installed also, but want to be able to lint a whole project as I added it part way into coding and want to check for errors without opening up every single file.

It's a single-root Workspace to keep the projects I'm currently working on together, but the root has folders for each project (Projects > [Project Name] > [Sub Project]). I'm only wanting to run the linter on one of the Projects at the moment, and that project is the only one with an .eslintrc.json file.

Opening individual files, the plugins flags the errors in the problem panel - one file I'm working on has 9 errors alone, however when running the CLI with either eslint . in the project directory, or ./node_modules/eslint/bin/eslint.js . brings up a total of 6 problems across the whole project. I have eslint installed both locally and globally, and I've tried uninstalling the global version to see if there was a conflict, but again I get the same output.

I've tried using the -c argument to ensure it's picking up the .eslintrc.json file, as well as forcing the local version to run (which doesn't make a difference to the output). Each time the output is the same (6 Problems (4 errors, 2 warnings)) but I know from opening single files that there are more.

Is there something obvious I'm missing to ensure that the CLI and the Plugin display the same errors when running in this configuration?

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

0

Managed to solve this myself. When running the plugin, it lints all files that you open, however eslint by default only lints *.js files. I noticed that it seemed to be missing .jsx files from the report, and, as this was is a React project I added:

"overrides": [
    {
        "files": ["*.jsx"]
    }
]

to my .eslintrc.json file and all of the errors showed up when running eslint .

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