-
-
Notifications
You must be signed in to change notification settings - Fork 718
fix(language_server): split run logic for oxlint and tsgolint
#13332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(language_server): split run logic for oxlint and tsgolint
#13332
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #13332 will not alter performanceComparing Summary
Footnotes |
35fcbd7 to
502f748
Compare
502f748 to
8add59c
Compare
Merge activity
|
8add59c to
902b39b
Compare
…e` is disabled and run is onType (#13604) Fixes an edge case introduced in #13332 where diagnostics disappear when saving a file with `oxc.lint.run: "onType"` and `oxc.typeAware: false`. ## Problem The logic from #13332 assumes `tsgolint` always exists when `Run::OnType`: ```rust (ServerLinterRun::OnSave, Run::OnType) => (false, true) // always run tsgolint ``` But when `type_aware: false`, there is no `tsgo_linter`, causing the server to return empty diagnostics instead of None, which clears all error highlights in VSCode.  ## Solution Check if `tsgo_linter` actually exists: ```rust (ServerLinterRun::OnSave, Run::OnType) => { let should_run_tsgo = self.tsgo_linter.as_ref().is_some(); (false, should_run_tsgo) } ``` Now returns None when no linters should run, preserving existing diagnostics. **Test:** Added `test_lint_on_run_on_type_on_save_without_type_aware` with fixture

Now the user configuration
onType(default) is respected even whentypeAwareis enabled.tsoglintwill then lintonSave, even whenonTypeis set.