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.

Code linting not updating realtime (Svelte for VS Code)

See original GitHub issue

Describe 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

  1. Install version v105.9.0 of the extension.
  2. Edit the source code, introduce some errors and check tooltips.

Expected behavior

Screenshots Window object reference right after a reload: screen1 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. screen2 After a reload: screen3 Errors/warning basically sit in place(?) Which looks like linting is done only on initial load and then stops. screen4

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:open
  • Created 2 years ago
  • Comments:36 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
ShapeMesscommented, Jan 23, 2022

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.

0reactions
jaymakes11commented, Dec 8, 2022

On a related note, I found that linting was not working at all until adding the following to my user JSON settings file:

"eslint.validate": [
	"svelte"
]

Perhaps this helps someone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Svelte for VS Code - Visual Studio Marketplace
Svelte for VS Code. Provides syntax highlighting and rich intellisense for Svelte components in VS Code, using the svelte language server.
Read more >
SCSS in Svelte not recognized by Visual Studio Code
From the error it seems that the preprocessing of your svelte file failed. You need a svelte.config.js at the root of your project....
Read more >
VS Code setup with Svelte - YouTube
Every developer should be working with Syntax Highlighting and automatic formatting: here's how to setup VS Code to work with Svetle, ...
Read more >
Monaco Editor
travelWorld( (cell : Cell) => { cell.live = Math.random() < this.initialLifeProbability ... The Monaco Editor is the code editor that powers VS Code....
Read more >
Top 10 Best VS Code Extensions for React Developers 2022
Am going to reveal the Top 10 Best Visual Studio Code Extensions that can ... you are working in a team, when you...
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