Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint is preventing my files from being saved #1902

Open
eianc opened this issue Jul 12, 2024 · 7 comments
Open

ESLint is preventing my files from being saved #1902

eianc opened this issue Jul 12, 2024 · 7 comments
Labels
info-needed Issue requires more information from poster

Comments

@eianc
Copy link

eianc commented Jul 12, 2024

Initially I thought that GitHub Copilot is causing the issue, however I discovered that it's the ESLint extension from VS Code.

When I have the ESLint extension enabled in VS Code, the files are not saving. Whenever I try to save a file, the file doesn't save and after a few seconds a notification similar with this shows up and nothing happens, it just hangs.
Screenshot 2024-07-12 at 14 35 56.
I used to be able to save the file by cancelling the notification, however now that doesn't seem to work anymore and I can't save any files. Restarting VS Code doesn't help.

In VS Code user configuration I have the following:

 "editor.codeActionsOnSave": {}

I tried different settings but none of them seem to make any difference.

I'm on:

macOS: Sosoma version 14.5

VS Code
Version: 1.91.1 (Universal)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:07:54.982Z (2 days ago)
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin x64 23.5.0

ESLint version 3.0.10 (I tried with the pre-release version 3.0.11 however that did not help)

@Mletter1
Copy link

So this is kinda weird but cycle through the disable -> restart extensions -> enable for the eslint extension. for whatever reason this fixes it for me like 1 out of every 5 cylces. I'm wondering if another extension like eslint-prettier or something is clashing with this one.
image

@eianc
Copy link
Author

eianc commented Jul 18, 2024

I only have the ESLInt extension enabled, I disabled all the other extensions and I still get the issue

@dbaeumer
Copy link
Member

I tried to reproduce this with an empty editor.codeActionsOnSave configuration but wasn't able to do so. @eianc could you please provide me with a GitHub repository I can clone that contains a minimal setup that demonstrates the problem.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jul 30, 2024
@eianc
Copy link
Author

eianc commented Aug 1, 2024

It's happening on a monorepo setup with Lerna, I don't get the issue on other codebases that I'm working on. I did not have time to investigate if it's a codebase setup that is causing the issue or something else. A colleague of mine just got the same issue on the same codebase with a new Mac, using Ubuntu or Windows doesn't cause the issue.
I'll try to make time at the weekend to investigate the setup.

@dogyeong
Copy link

dogyeong commented Aug 5, 2024

@eianc
check the eslint runtime. I downgraded node version 20 → 18 16 and it works.

@A5rocks
Copy link

A5rocks commented Aug 13, 2024

I'm not sure if I'm running into this exactly, but I made a somewhat minimal reproducer: https://github.com/A5rocks/repro-eslint-vscode

I reproduced in node v18.15.0 and v20.13.1 (on Debian Linux), and this reproducer worked for someone else (so hopefully it's not just a user settings thing).

@dbaeumer
Copy link
Member

@A5rocks you are affected by yarnpkg/berry#6335 (e.g. a problem with yarn and synckit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants