ESLint is a major version behind (with consequences)
Summary
The ESLint LSP server is at version 2.4.4 whilst there is 3.0.10, leading to the sveltekit template with eslint not working.
Description
Steps to reproduce:
- Install a normal version of zed
- Create a sveltekit template with eslint using npx sv create
Expected Behavior: Works Actual Behavior: Shows errors in all svelte files
Note: I have fixed it on my instance by simply deleting the contents of zed/languages/vscode-eslint-2.4.4/vscode-eslint and replacing them with what is currently in the vscode-eslint repository.
Zed Version and System Specs
Zed: v0.184.0 (Zed Dev 107d8ca483276263362c23482612d1cadea81c71) OS: Windows 10.0.22635 Memory: 63.7 GiB Architecture: x86_64 GPU: Intel(R) Iris(R) Xe Graphics || Intel Corporation || Intel driver
probably do this, but I don't have a testing setup in order to create a PR:
https://github.com/zed-industries/zed/blob/main/crates/languages/src/typescript.rs
impl EsLintLspAdapter {
- const CURRENT_VERSION: &'static str = "2.4.4";
- const CURRENT_VERSION_TAG_NAME: &'static str = "release/2.4.4";
+ const CURRENT_VERSION: &'static str = "3.0.10";
+ const CURRENT_VERSION_TAG_NAME: &'static str = "release/3.0.10";
#[cfg(not(windows))]
const GITHUB_ASSET_KIND: AssetKind = AssetKind::TarGz;
I think it is not that easy, because the eslint lsp comes from here: https://github.com/zed-industries/vscode-eslint; which will need a rebase on upstream probably and a new release published?
yeah but like I have been using the original for multiple days now and it seems to work
I tried running npx sv create. I selected prettier and eslint, and it seemed like eslint was working fine:
Is it possible that you're using an old (not flat) eslint config? I think we may have bugs when the combination of the old language server + eslint 9 + non-flat configuration files.
@ConradIrwin what version are u using and what is ur OS you are using.
So is there a Simpler fix, to this ?
probably do this, but I don't have a testing setup in order to create a PR:
https://github.com/zed-industries/zed/blob/main/crates/languages/src/typescript.rs
impl EsLintLspAdapter {
- const CURRENT_VERSION: &'static str = "2.4.4";
- const CURRENT_VERSION_TAG_NAME: &'static str = "release/2.4.4";
const CURRENT_VERSION: &'static str = "3.0.10";
const CURRENT_VERSION_TAG_NAME: &'static str = "release/3.0.10";
#[cfg(not(windows))] const GITHUB_ASSET_KIND: AssetKind = AssetKind::TarGz;
I also encountered some errors that after researched were fixed with 3.0.10 and 3.0.13 (which is unfortunately in pre-release for over half a year).
Any movement here? I've tried overwriting the zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint folder but it keeps reverting to 2.4.4 on startup (Windows).
I'm getting error about routes not resolving that do exist. It also seems to ignore the rules defined in my eslint.config.js file.
@jonchardy same issue, doesn't recognize rules defined in the flat js config file
+1, my ESLint does not work because of this
any updates on this topic?