question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Eslint is not linting on save (with new setting in json)

See original GitHub issue

We have been using eslint heavily, but with the new update(2.0.4) our files are no longer being linted.

My output dialog box keeps saying Cannot find module 'babel-eslint' and Cannot find module 'eslint-config-airbnb' if I attempt to use the default formatter.

Is there a new way to tell eslint to use my current directory? I have all of my node modules installed and set up, I have uninstalled and reinstalled, removed yarn.lock, etc.

I have also updated my vscode settings.json to use the

"editor.codeActionsOnSave": {
        "source.fixAll": true,
        "source.fixAll.eslint": true,
},

Any help would be siiiiiiiiick.

Edit: we are using an .eslintrc.js file.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
AbdelrahmanHafezcommented, Dec 18, 2019

As a quick fix, you can use an older version (1.9.1) by clicking the gear icon beside ESLint on VSCode extensions.

Meanwhile, I made a video demonstrating the auto fix on save issue https://github.com/microsoft/vscode-eslint/issues/841#issuecomment-566814419 Is this the same problem you’re having or a different one?

Screenshot_260

2reactions
JarrodMFleschcommented, Dec 20, 2019

Issue fixed with 2.0.11

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Enable Linting on Save with Visual Studio Code and ...
Learn how to lint your code on every file save using ESLint rules and VS Code settings.
Read more >
ESLint in VSCode not fixing on save - Stack Overflow
When I save I would like my ESLint to run automatically and fix all the warnings for me automatically. This is my settings.json...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to Format Code on Save in VS Code with ESlint
To do this, you'll need to create an ESLint config file at the root of your project.
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Take a look into your eslintrc configuration file and make a list of all plugins and presets. Than make sure, they as well...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found