You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code works fine but I am getting a diagnostics error on Neovim using svelte-language-server@0.16.6 and svelte@5.0.0-next.1:
$myStore is an illegal variable name. To reference a global variable called $myStore, use globalThis.$myStore(illegal-global) [svelte/valid-compile]
This only happens when using svelte 5 and in neovim and not vscode.
I am getting this error displayed whenever I am using a store inside a .svelte layout or page.
@jasonlyu123 I use Mason to install my LSPs, so I already tried re-installing svelte-language-server without success.
I am not sure what you mean by "its node_modules", you mean the svelte project node_modules? If yes, I tried that also yes.
I am getting the same error with yarn eslint . so I guess the issue is coming from eslint-plugin-svelte and not the LSP.
This is related to sveltejs/eslint-plugin-svelte#652.
The language server is a node package with dependencies. What I meant is the node_modules for these dependencies. But when using Svelte 5, the Svelte language server loads the Svelte compiler user installed in their project. So if there is a dependency problem, it is more likely from the node_modules in your project.
I am closing this since it does seem like it's from eslint. I can reproduce the error with lint but not with editor or svelte-check. Feel free to add more info if it turns out to be the svelte language server.
Describe the bug
My code works fine but I am getting a diagnostics error on Neovim using
svelte-language-server@0.16.6
andsvelte@5.0.0-next.1
:This only happens when using svelte 5 and in neovim and not vscode.
I am getting this error displayed whenever I am using a store inside a
.svelte
layout or page.Example:
Reproduction
Reproduction minimal repo: https://github.com/pierregoutheraud/test-svelte5
Versions used:
Expected behaviour
No diagnostics error.
System Info
Which package is the issue about?
svelte-language-server
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: