Skip to content

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Jan 15, 2026

Preparation for #17585.

  • Extract format related parts from Oxfmtrc to reuse as overrides.
    • Since using serde(flatten), no user facing changes
  • Refine OxfmtOptions
    • Before: Oxfmtrc - oxc_formatter::FormatOptions
    • After: Oxfmtrc - ignorePatterns(not overridable)

Copilot AI review requested due to automatic review settings January 15, 2026 05:51
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 15, 2026
Copy link
Member Author

leaysgur commented Jan 15, 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.

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 pull request refactors the format configuration structure by splitting overridable format options into a separate FormatConfig struct. This improves the organization and separation of concerns between per-file formatting options and global configuration like ignore patterns.

Changes:

  • Introduced new FormatConfig struct containing all formatting options that can be overridden per-file
  • Restructured Oxfmtrc to use flattened FormatConfig and keep only ignore_patterns at the top level
  • Modified OxfmtOptions to contain FormatOptions directly instead of having them separated
  • Updated into_options() to return (OxfmtOptions, Vec<String>) instead of (FormatOptions, OxfmtOptions)
  • Converted populate_prettier_config from instance method to standalone function

Reviewed changes

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

File Description
apps/oxfmt/src/core/oxfmtrc.rs Introduces FormatConfig struct, refactors Oxfmtrc and OxfmtOptions, updates into_options() signature and converts populate_prettier_config to standalone function, updates all tests
apps/oxfmt/src/core/config.rs Updates to use new OxfmtOptions structure, imports populate_prettier_config as function, updates field access to use format_config, contains a critical bug with incorrect variable name

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

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 15, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 15, 2026

Merge activity

Preparation for #17585.

- Extract format related parts from `Oxfmtrc` to reuse as `overrides`.
  - Since using `serde(flatten)`, no user facing changes
- Refine `OxfmtOptions`
  - Before: `Oxfmtrc` - `oxc_formatter::FormatOptions`
  - After: `Oxfmtrc` - `ignorePatterns`(not overridable)
@graphite-app graphite-app bot force-pushed the 01-15-refactor_oxfmt_split_overridable_format_options branch from fe82698 to de72378 Compare January 15, 2026 07:02
@graphite-app graphite-app bot merged commit de72378 into main Jan 15, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 01-15-refactor_oxfmt_split_overridable_format_options branch January 15, 2026 07:08
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 15, 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-formatter Area - Formatter 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