Eslint is not linting on save (with new setting in json)
See original GitHub issueWe 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:
- Created 4 years ago
- Reactions:3
- Comments:19 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?
Issue fixed with
2.0.11