Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 10, 2025

closes #13795
Now the language server uses LintRunner which lints in memory files with tsgolint 🥳

Cleanup the ServerLinter to use only IsolatedLinter and no TsgoLinter.

@github-actions github-actions bot added A-linter Area - Linter A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Oct 10, 2025
Copy link
Member Author

Sysix commented Oct 10, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 10, 2025

CodSpeed Performance Report

Merging #14472 will not alter performance

Comparing 10-10-refactor_language_server_use_lintrunner_ (27c0255) with 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ (ecd3fb5)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Sysix Sysix force-pushed the 10-10-refactor_linter_store_lintservice_in_lintrunner_ branch from 8819d40 to ddc8a9d Compare October 10, 2025 14:01
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from e8c2373 to 109ad5b Compare October 10, 2025 14:01
@camc314 camc314 self-assigned this Oct 12, 2025
@graphite-app graphite-app bot changed the base branch from 10-10-refactor_linter_store_lintservice_in_lintrunner_ to graphite-base/14472 October 13, 2025 12:13
@graphite-app graphite-app bot force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 109ad5b to d644a9f Compare October 13, 2025 12:19
@graphite-app graphite-app bot force-pushed the graphite-base/14472 branch from ddc8a9d to 20e884e Compare October 13, 2025 12:19
@graphite-app graphite-app bot changed the base branch from graphite-base/14472 to main October 13, 2025 12:19
@graphite-app graphite-app bot force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from d644a9f to 545abf2 Compare October 13, 2025 12:20
@Sysix Sysix changed the base branch from main to graphite-base/14472 October 21, 2025 20:46
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 545abf2 to 7dd438a Compare October 21, 2025 20:47
@Sysix Sysix changed the base branch from graphite-base/14472 to 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ October 21, 2025 20:47
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 7dd438a to a6b9b45 Compare October 21, 2025 21:08
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from a6b9b45 to 0c542df Compare October 29, 2025 18:05
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from b1c0f28 to 9b2fdf0 Compare October 29, 2025 18:05
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch 4 times, most recently from e848705 to 35cd2a4 Compare October 29, 2025 22:30
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 35cd2a4 to 716cfc9 Compare October 30, 2025 20:29
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from 9b2fdf0 to 0e01d98 Compare October 30, 2025 20:29
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 716cfc9 to 990fcc9 Compare October 30, 2025 21:31
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from 0e01d98 to ecd3fb5 Compare October 30, 2025 21:41
@Sysix Sysix force-pushed the 10-10-refactor_language_server_use_lintrunner_ branch from 990fcc9 to 27c0255 Compare October 30, 2025 21:41
@Sysix Sysix requested a review from Copilot October 30, 2025 21:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the language server's linting architecture by consolidating type-aware (TsGoLint) and regular (Oxlint) linting into a unified LintRunner abstraction. Previously, the language server managed two separate linters (IsolatedLintHandler for Oxlint and TsgoLinter for type-aware checking), which required complex coordination logic.

Key changes:

  • Replaced dual linter architecture with unified LintRunner that coordinates both regular and type-aware linting internally
  • Removed the separate TsgoLinter module from the language server codebase
  • Simplified the ServerLinter by delegating type-aware linting logic to LintRunner

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/oxc_linter/src/lint_runner.rs Added run_source method to enable language server to run both linting modes on in-memory source text
crates/oxc_language_server/src/linter/tsgo_linter.rs Removed entire file as functionality moved to LintRunner
crates/oxc_language_server/src/linter/isolated_lint_handler.rs Refactored to use LintRunner instead of LintService directly, now handles both linting modes
crates/oxc_language_server/src/linter/server_linter.rs Simplified by removing dual-linter coordination logic and delegating to IsolatedLintHandler
crates/oxc_language_server/src/linter/mod.rs Removed tsgo_linter module export
editors/vscode/tests/e2e_server.spec.ts Updated test timing and helper function calls for consistency
crates/oxc_language_server/src/snapshots/* Updated test snapshots to reflect behavioral changes in lint execution modes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants