Code linting not updating realtime (Svelte for VS Code)
See original GitHub issueDescribe the bug Svelte for VS Code extension v105.9.0 seems to have introduced a bug with JS/TS scripts which results in linting completely breaking. Errors and warnings are not being updated realtime nor on file save. After a few code changes hover tooltips are showing content for different lines in the document. Snippets and completion are not working properly and are suggesting content for source code that was originally loaded in specific line in the file. Reloading the editor helps only until the code is edited, after which another reload is requred.
To Reproduce
- Install version v105.9.0 of the extension.
- Edit the source code, introduce some errors and check tooltips.
Expected behavior
Screenshots Window object reference right after a reload: After changing the window reference to an invalid piece of code, there are no errors, warnings and hints still suggest this is a window object. After a reload: Errors/warning basically sit in place(?) Which looks like linting is done only on initial load and then stops.
System:
- OS: Windows 10 21H2 (build 19044.14.15)
- IDE: VSCode 1.63
- Plugin/Package: “Svelte for VSCode”,
- Node: v16.10.0
Additional context Linting is only being done once per file and then requires an editor reload - This would suggest why errors “stay in place” after editing the source code.
Issue Analytics
- State:
- Created 2 years ago
- Comments:36 (13 by maintainers)
Top GitHub Comments
Just to finish things off with what I found out since the last time I spoke here. I could not figure out what that issue was caused by for sure, but it seems like it’s something specifically with VSCode and/or configuration and not the extension itself, I tried out the insiders version and the issue wasn’t showing up. Though I have settings synced between the two, so I don’t think it has to do with anything that’s easily configurable by the user and more with the underlying configuration. Reinstalling the extension from within VSCode’s builtin extensions tab brought the bug back to life on the release version.
On a related note, I found that linting was not working at all until adding the following to my user JSON settings file:
Perhaps this helps someone.