Fix broken ESLint by pinning to 2.2.20-Insiders release (#9215)

This fixes #9213 by pinning ESLint to `2.2.20-Insiders` which is the
last known version to work well with Zed.

Once this fix is out, we can take a closer look at upgrading to 2.4.x or
even 3.x once that's out of prerelease.

Release Notes:

- Fixed ESLint integration being broken after Mar 7 2024 due to ESLint
3.0.1 alpha release being pushed.
([#9213](https://github.com/zed-industries/zed/issues/9213)).
This commit is contained in:
Thorsten Ball 2024-03-12 11:20:25 +01:00 committed by GitHub
parent 3be1402a3d
commit 98cf494057
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 73 additions and 7 deletions

View file

@ -20,7 +20,7 @@ use std::{
use util::{
async_maybe,
fs::remove_matching,
github::{latest_github_release, GitHubLspBinaryVersion},
github::{github_release_with_tag, GitHubLspBinaryVersion},
ResultExt,
};
@ -285,13 +285,11 @@ impl LspAdapter for EsLintLspAdapter {
&self,
delegate: &dyn LspAdapterDelegate,
) -> Result<Box<dyn 'static + Send + Any>> {
// At the time of writing the latest vscode-eslint release was released in 2020 and requires
// special custom LSP protocol extensions be handled to fully initialize. Download the latest
// prerelease instead to sidestep this issue
let release = latest_github_release(
// We're using this hardcoded release tag, because ESLint's API changed with
// >= 2.3 and we haven't upgraded yet.
let release = github_release_with_tag(
"microsoft/vscode-eslint",
false,
true,
"release/2.2.20-Insider",
delegate.http_client(),
)
.await?;