Skip to content

refactor(oxlint): move --rules logic into an own file#18516

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-25-refactor_oxlint_move_--rules_logic_into_a_own_file
Jan 25, 2026
Merged

refactor(oxlint): move --rules logic into an own file#18516
graphite-app[bot] merged 1 commit intomainfrom
01-25-refactor_oxlint_move_--rules_logic_into_a_own_file

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 25, 2026

No description provided.

Copy link
Member Author

Sysix commented Jan 25, 2026


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(oxlint)(; move --rules logic into a own file refactor(oxlint): move --rules logic into a own file Jan 25, 2026
@Sysix Sysix changed the title refactor(oxlint): move --rules logic into a own file refactor(oxlint): move --rules logic into an own file Jan 25, 2026
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Jan 25, 2026
@Sysix Sysix requested a review from Copilot January 25, 2026 12:30
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 --rules flag logic by extracting it from apps/oxlint/src/lint.rs into a dedicated module apps/oxlint/src/mode/rules.rs. This improves code organization by grouping similar CLI mode handlers together (alongside existing run_init and run_print_config functions).

Changes:

  • Extracted --rules handling logic into a new run_rules function in mode/rules.rs
  • Updated module exports in mode/mod.rs to include the new run_rules function
  • Simplified lint.rs by removing the inline logic and calling the new run_rules function

Reviewed changes

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

File Description
apps/oxlint/src/mode/rules.rs New file containing the extracted run_rules function that handles --rules flag logic
apps/oxlint/src/mode/mod.rs Added module declaration and public export for the new rules module
apps/oxlint/src/lint.rs Removed inline --rules handling logic and replaced with a call to run_rules; removed unused imports (table::RuleTable and OutputFormat)

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

@Sysix Sysix force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from e4d044e to a09ba38 Compare January 25, 2026 12:46
@Sysix Sysix marked this pull request as ready for review January 25, 2026 12:47
@Sysix Sysix requested a review from camc314 as a code owner January 25, 2026 12:47
@camc314 camc314 self-assigned this Jan 25, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
Copy link
Contributor

camc314 commented Jan 25, 2026

Merge activity

  • Jan 25, 4:25 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 4:25 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Jan 25, 4:32 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18506.
  • Jan 25, 4:32 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18506.
  • Jan 25, 4:37 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Jan 25, 5:04 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18515.
  • Jan 25, 5:04 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18515.
  • Jan 25, 5:06 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 5:06 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Jan 25, 5:08 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 5:10 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Jan 25, 5:36 PM UTC: camc314 removed this pull request from the Graphite merge queue.
  • Jan 25, 6:07 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 6:07 PM UTC: Sysix added this pull request to the Graphite merge queue.
  • Jan 25, 6:15 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot added 0-merge Merge with Graphite Merge Queue and removed 0-merge Merge with Graphite Merge Queue labels Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_before_configstore_creation branch from 76b3c6b to a063874 Compare January 25, 2026 16:38
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from a09ba38 to fda5497 Compare January 25, 2026 16:39
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 force-pushed the 01-25-refactor_oxlint_move_--rules_before_configstore_creation branch from a063874 to 76b3c6b Compare January 25, 2026 17:04
@camc314 camc314 force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from fda5497 to ade5c23 Compare January 25, 2026 17:04
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot changed the base branch from 01-25-refactor_oxlint_move_--rules_before_configstore_creation to graphite-base/18516 January 25, 2026 17:04
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from ade5c23 to 950cc78 Compare January 25, 2026 17:12
@github-actions github-actions bot added A-parser Area - Parser A-minifier Area - Minifier A-transformer Area - Transformer / Transpiler A-linter-plugins Area - Linter JS plugins labels Jan 25, 2026
@graphite-app graphite-app bot changed the base branch from graphite-base/18516 to 01-25-refactor_oxlint_move_--rules_before_configstore_creation January 25, 2026 17:12
Base automatically changed from 01-25-refactor_oxlint_move_--rules_before_configstore_creation to main January 25, 2026 17:17
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@Sysix Sysix added 0-merge Merge with Graphite Merge Queue and removed A-parser Area - Parser A-minifier Area - Minifier A-transformer Area - Transformer / Transpiler 0-merge Merge with Graphite Merge Queue A-linter-plugins Area - Linter JS plugins labels Jan 25, 2026
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from 9a574ee to abfd075 Compare January 25, 2026 18:09
@graphite-app graphite-app bot merged commit abfd075 into main Jan 25, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch January 25, 2026 18:15
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants

Comments