Skip to content

Commit f82011b

Browse files
committed
fix(oxlint/lsp): disable JS plugins support in LSP except in tests (#18727)
#17809 and #17840 add support for JS plugins to LSP. However: * We don't have much test coverage yet. * The support for workspaces imposes a perf cost on Oxlint CLI (frequent hash map lookups on JS side). * I believe there's a bug in JS-side code - #17809 (comment). I think it'd be easier to merge this stack and then iterate on it in further PRs to fix the above. To prevent any breakage for users in the meantime, this PR disables JS plugin support in LSP unless the `testing` Cargo feature is enabled - i.e. it's only enabled in tests for now.
1 parent 7a5c268 commit f82011b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/oxlint/src/run.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ async fn lint_impl(
181181

182182
// If --lsp flag is set, run the language server
183183
if command.lsp {
184+
// Disable JS plugins support except in tests.
185+
// TODO: Remove this line once we have solidified the implementation and thoroughly tested it.
186+
let external_linter = if cfg!(feature = "testing") { external_linter } else { None };
187+
184188
crate::lsp::run_lsp(external_linter).await;
185189
return CliRunResult::LintSucceeded;
186190
}

0 commit comments

Comments
 (0)