From 9ff3cff6f8074282e7858f9264b7bb783adf0b78 Mon Sep 17 00:00:00 2001 From: Yanguk <99335782+Yanguk@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:15:06 +0900 Subject: [PATCH] Respect `eslint.nodePath` setting (#9073) I'm using Yarn Plug'n'Play. In this case, by default, eslint cannot find the path, so configuration like `"eslint.nodePath": ".yarn/sdks"` is required. So, I want to add this! Release Notes: - Added eslint config nodePath --- crates/languages/src/typescript.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/languages/src/typescript.rs b/crates/languages/src/typescript.rs index 33083c2fd1..4979f7febb 100644 --- a/crates/languages/src/typescript.rs +++ b/crates/languages/src/typescript.rs @@ -254,12 +254,14 @@ impl LspAdapter for EsLintLspAdapter { } } + let node_path = eslint_user_settings.get("nodePath").unwrap_or(&Value::Null); + json!({ "": { "validate": "on", "rulesCustomizations": [], "run": "onType", - "nodePath": null, + "nodePath": node_path, "workingDirectory": {"mode": "auto"}, "workspaceFolder": { "uri": workspace_root,