Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 30, 2025

Because tsgolint works now on type, the Backend can now be responsible to skip the linting part.
This simplifies a lot :)

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

Sysix commented Oct 30, 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.

@Sysix Sysix changed the title refactor(language_server): Backend chekcs the correct LintOptions::Run refactor(language_server): Backend checks the correct LintOptions::Run Oct 30, 2025
@Sysix Sysix changed the base branch from 10-10-refactor_language_server_use_lintrunner_ to graphite-base/15166 October 30, 2025 21:31
@Sysix Sysix force-pushed the 10-30-refactor_language_server_backend_chekcs_the_correct_lintoptions_run_ branch from f05f4ab to f211d1e Compare October 30, 2025 21:41
@Sysix Sysix force-pushed the graphite-base/15166 branch from 716cfc9 to 27c0255 Compare October 30, 2025 21:41
@Sysix Sysix requested a review from Copilot October 31, 2025 00:22
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 linter run behavior in the language server by removing the ServerLinterRun enum and moving the run type checking from the linter layer to the backend layer. The main purpose is to simplify the linter API and improve separation of concerns.

Key changes:

  • Removed ServerLinterRun enum and its matching logic from ServerLinter
  • Added should_lint_on_run_type method to WorkspaceWorker for run type validation
  • Updated backend handlers (did_save, did_change) to check run type before linting
  • Removed test fixtures and tests related to run type filtering
  • Simplified lint_file method signature by removing the run_type parameter

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/oxc_language_server/src/worker.rs Added should_lint_on_run_type method and removed run_type parameter from lint_file
crates/oxc_language_server/src/backend.rs Added run type checks in did_save and did_change handlers before calling lint_file
crates/oxc_language_server/src/linter/server_linter.rs Removed ServerLinterRun enum, removed run type matching logic from run_single, and removed related tests
crates/oxc_language_server/src/tester.rs Simplified test methods by removing run type parameters
crates/oxc_language_server/src/snapshots/*.snap Deleted snapshot files for removed run type tests
crates/oxc_language_server/fixtures/linter/lint_on_run/**/*.ts Deleted test fixture files for run type functionality

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

@Sysix Sysix marked this pull request as ready for review October 31, 2025 10:17
@Sysix Sysix requested a review from camc314 as a code owner October 31, 2025 10:17
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-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.

2 participants