Skip to content

refactor(linter): remove CliRunResult from TsGoLintState#13119

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_
Aug 15, 2025
Merged

refactor(linter): remove CliRunResult from TsGoLintState#13119
graphite-app[bot] merged 1 commit intomainfrom
08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Aug 15, 2025

Goal is there are no references for oxlint functions.
Now move TsGoLintState to oxc_linter so the server can use it too 🥳

@github-actions github-actions bot added A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Aug 15, 2025
Copy link
Member Author

Sysix commented Aug 15, 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.

@Sysix Sysix marked this pull request as ready for review August 15, 2025 11:52
@Sysix Sysix requested a review from camc314 as a code owner August 15, 2025 11:52
@Sysix Sysix force-pushed the 08-15-refactor_linter_move_tsgolintinput_creation_into_own_function branch from b7c6756 to 7fcd4d6 Compare August 15, 2025 12:01
@Sysix Sysix force-pushed the 08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_ branch from 17e2219 to 59d4dc6 Compare August 15, 2025 12:01
@graphite-app graphite-app bot changed the base branch from 08-15-refactor_linter_move_tsgolintinput_creation_into_own_function to graphite-base/13119 August 15, 2025 12:11
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 15, 2025
Copy link
Contributor

camc314 commented Aug 15, 2025

Merge activity

  • Aug 15, 12:11 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 15, 12:11 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Aug 15, 12:20 PM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Test Linux', 'Test NAPI', 'Clippy', 'Doc').
  • Aug 15, 12:23 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 15, 12:26 PM UTC: Sysix added this pull request to the Graphite merge queue.
  • Aug 15, 12:27 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot changed the base branch from graphite-base/13119 to main August 15, 2025 12:17
graphite-app bot pushed a commit that referenced this pull request Aug 15, 2025
Goal is there are no references for `oxlint` functions.
Now move `TsGoLintState` to `oxc_linter` so the server can use it too 🥳
@graphite-app graphite-app bot force-pushed the 08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_ branch from 59d4dc6 to 28628a5 Compare August 15, 2025 12:18
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 15, 2025
Goal is there are no references for `oxlint` functions.
Now move `TsGoLintState` to `oxc_linter` so the server can use it too 🥳
Copilot AI review requested due to automatic review settings August 15, 2025 12:21
@Sysix Sysix force-pushed the 08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_ branch from 28628a5 to cc2a85b Compare August 15, 2025 12:21
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 TsGoLintState by removing its dependency on CliRunResult and simplifying its error handling. The goal is to eliminate references to oxlint functions so that TsGoLintState can be moved to oxc_linter for broader use.

  • Simplified TsGoLintState::lint method to return Result<(), String> instead of Option<CliRunResult>
  • Moved error handling and stdout printing responsibility from TsGoLintState to the caller in LintRunner
  • Removed imports for CliRunResult and print_and_flush_stdout from the tsgolint module

Reviewed Changes

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

File Description
apps/oxlint/src/tsgolint.rs Simplified lint method signature and error handling, removed CLI-specific dependencies
apps/oxlint/src/lint.rs Updated caller to handle error printing and return appropriate CliRunResult

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Aug 15, 2025
@graphite-app graphite-app bot merged commit cc2a85b into main Aug 15, 2025
17 checks passed
@graphite-app graphite-app bot deleted the 08-15-refactor_linter_remove_clirunresult_from_tsgolintstate_ branch August 15, 2025 12:27
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI 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