Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Aug 27, 2025

Now the user configuration onType (default) is respected even when typeAware is enabled.
tsoglint will then lint onSave, even when onType is set.

Copy link
Member Author

Sysix commented Aug 27, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-bug Category - Bug labels Aug 27, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed Instrumentation Performance Report

Merging #13332 will not alter performance

Comparing 08-27-fix_language_server_split_run_logic_for_oxlint_and_tsgolint_ (902b39b) with main (7fdd478)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (902b39b) during the generation of this report, so 7fdd478 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Sysix Sysix force-pushed the 08-27-fix_language_server_split_run_logic_for_oxlint_and_tsgolint_ branch 2 times, most recently from 35fcbd7 to 502f748 Compare August 27, 2025 18:52
@Sysix Sysix marked this pull request as ready for review August 27, 2025 19:00
@Sysix Sysix requested a review from camc314 as a code owner August 27, 2025 19:00
@Sysix Sysix force-pushed the 08-27-fix_language_server_split_run_logic_for_oxlint_and_tsgolint_ branch from 502f748 to 8add59c Compare August 27, 2025 19:05
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
Copy link
Contributor

camc314 commented Aug 27, 2025

Merge activity

…3332)

Now the user configuration `onType` (default) is respected even when `typeAware` is enabled.
`tsoglint` will then lint `onSave`, even when `onType` is set.
@graphite-app graphite-app bot force-pushed the 08-27-fix_language_server_split_run_logic_for_oxlint_and_tsgolint_ branch from 8add59c to 902b39b Compare August 27, 2025 21:48
@graphite-app graphite-app bot merged commit 902b39b into main Aug 27, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 08-27-fix_language_server_split_run_logic_for_oxlint_and_tsgolint_ branch August 27, 2025 21:52
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
camc314 pushed a commit that referenced this pull request Sep 11, 2025
…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.



![clear-diagnostics](https://github.com/user-attachments/assets/3f7a530e-5319-4fa5-8668-7a34a3742e82)

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants