From 347f68887f645ea004becfb43d178727eb9802fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 22 Feb 2024 21:22:31 +0100 Subject: [PATCH] Support ESLint flat configs (#8109) Not available before the new eslint language server version is released, but prepares the ground for it. ## Further reading - https://eslint.org/docs/latest/use/configure/configuration-files-new - https://github.com/microsoft/vscode-eslint?tab=readme-ov-file#settings-options Release Notes: - Added ESLint flat config support ([#7271](https://github.com/zed-industries/zed/issues/7271)) --- crates/zed/src/languages/typescript.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/zed/src/languages/typescript.rs b/crates/zed/src/languages/typescript.rs index a6aa9667e6628d40c01eeaa0138c98393bf0f317..60a9d3cc8f30a0e26873f43c7889977c3b489ba8 100644 --- a/crates/zed/src/languages/typescript.rs +++ b/crates/zed/src/languages/typescript.rs @@ -237,6 +237,10 @@ impl LspAdapter for EsLintLspAdapter { "name": workspace_root.file_name() .unwrap_or_else(|| workspace_root.as_os_str()), }, + "problems": {}, + "experimental": { + "useFlatConfig": workspace_root.join("eslint.config.js").is_file(), + }, } }) }