zed icon indicating copy to clipboard operation
zed copied to clipboard

ESLint is a major version behind (with consequences)

Open Xyndra opened this issue 8 months ago • 7 comments

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:

  1. Install a normal version of zed
  2. 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

Xyndra avatar May 01 '25 18:05 Xyndra

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;

Xyndra avatar May 01 '25 18:05 Xyndra

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?

niklaswimmer avatar May 06 '25 07:05 niklaswimmer

yeah but like I have been using the original for multiple days now and it seems to work

Xyndra avatar May 06 '25 12:05 Xyndra

I tried running npx sv create. I selected prettier and eslint, and it seemed like eslint was working fine:

Image

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 avatar May 16 '25 08:05 ConradIrwin

@ConradIrwin what version are u using and what is ur OS you are using.

JustKira avatar May 17 '25 15:05 JustKira

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;

JustKira avatar May 27 '25 04:05 JustKira

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).

itpropro avatar May 30 '25 20:05 itpropro

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 avatar Oct 16 '25 19:10 jonchardy

@jonchardy same issue, doesn't recognize rules defined in the flat js config file

ConteClaudioSalvatore avatar Oct 20 '25 06:10 ConteClaudioSalvatore

+1, my ESLint does not work because of this

lumirelle avatar Oct 31 '25 10:10 lumirelle

any updates on this topic?

ConteClaudioSalvatore avatar Nov 06 '25 08:11 ConteClaudioSalvatore