-
-
Notifications
You must be signed in to change notification settings - Fork 708
refactor(language_server): Backend checks the correct LintOptions::Run
#15166
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
base: graphite-base/15166
Are you sure you want to change the base?
refactor(language_server): Backend checks the correct LintOptions::Run
#15166
Conversation
|
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.
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. |
Backend chekcs the correct LintOptions::RunBackend checks the correct LintOptions::Run
f05f4ab to
f211d1e
Compare
716cfc9 to
27c0255
Compare
There was a problem hiding this 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
ServerLinterRunenum and its matching logic fromServerLinter - Added
should_lint_on_run_typemethod toWorkspaceWorkerfor 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_filemethod signature by removing therun_typeparameter
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.

Because
tsgolintworks now on type, theBackendcan now be responsible to skip the linting part.This simplifies a lot :)