Skip to content

feat(oxfmt): Support oxfmtrc overrides config#18068

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-16-feat_oxfmt_support_oxfmtrc_overrides
Jan 19, 2026
Merged

feat(oxfmt): Support oxfmtrc overrides config#18068
graphite-app[bot] merged 1 commit intomainfrom
01-16-feat_oxfmt_support_oxfmtrc_overrides

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Jan 16, 2026

Fixes #17585

Copy link
Member Author

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

@leaysgur leaysgur changed the title feat(oxfmt): Support oxfmtrc overrides feat(oxfmt): Support oxfmtrc overrides config Jan 16, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 16, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing 01-16-feat_oxfmt_support_oxfmtrc_overrides (ce3f6eb) with main (727939f)

Summary

✅ 42 untouched benchmarks
⏩ 3 skipped benchmarks1

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@leaysgur leaysgur force-pushed the 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides branch from 56eb9f2 to d9287b9 Compare January 16, 2026 08:57
@leaysgur leaysgur force-pushed the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch 2 times, most recently from 34825d3 to 6d0ee5c Compare January 16, 2026 13:51
@leaysgur leaysgur force-pushed the 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides branch from d9287b9 to f426209 Compare January 16, 2026 13:51
@leaysgur leaysgur force-pushed the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch from 6d0ee5c to fba5c1d Compare January 19, 2026 01:28
@leaysgur leaysgur force-pushed the 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides branch from f426209 to 8166c80 Compare January 19, 2026 01:28
@graphite-app graphite-app bot changed the base branch from 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides to graphite-base/18068 January 19, 2026 01:45
@leaysgur leaysgur force-pushed the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch from fba5c1d to c1f1359 Compare January 19, 2026 01:46
@leaysgur leaysgur changed the base branch from graphite-base/18068 to 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides January 19, 2026 01:46
Base automatically changed from 01-16-refactor_oxfmt_update_editorconfig_overrides_logic_to_prepare_for_oxfmtrc_overrides to main January 19, 2026 01:51
@leaysgur leaysgur force-pushed the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch 3 times, most recently from 44bf696 to ce3f6eb Compare January 19, 2026 05:12
@leaysgur leaysgur marked this pull request as ready for review January 19, 2026 05:19
Copilot AI review requested due to automatic review settings January 19, 2026 05:19
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

Adds support for .oxfmtrc overrides so users can apply file-specific formatting options.

Changes:

  • Extend the oxfmtrc schema/docs to include overrides and OxfmtOverrideConfig.
  • Add Rust config structures + parsing for overrides, and strip overrides before passing config to Prettier.
  • Implement per-file override resolution in ConfigResolver using glob matching.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tasks/website_formatter/src/snapshots/schema_markdown.snap Documents the new overrides section and nested options in markdown schema output.
tasks/website_formatter/src/snapshots/schema_json.snap Updates the JSON schema snapshot with overrides, FormatConfig, and OxfmtOverrideConfig definitions.
npm/oxfmt/configuration_schema.json Ships the updated JSON schema including overrides for npm consumers.
apps/oxfmt/src/core/oxfmtrc.rs Introduces overrides in Oxfmtrc, adds OxfmtOverrideConfig, and ensures Prettier config stripping removes overrides.
apps/oxfmt/src/core/config.rs Adds override resolution logic (match files/excludeFiles globs, merge options per file).
apps/oxfmt/Cargo.toml Adds fast-glob dependency for glob matching.
Cargo.lock Locks the new fast-glob dependency.

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

@Dunqing
Copy link
Member

Dunqing commented Jan 19, 2026

Good milestone for us!

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

graphite-app bot commented Jan 19, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch from ce3f6eb to a95b9bb Compare January 19, 2026 07:39
graphite-app bot pushed a commit that referenced this pull request Jan 19, 2026
@graphite-app graphite-app bot merged commit a95b9bb into main Jan 19, 2026
22 checks passed
@graphite-app graphite-app bot deleted the 01-16-feat_oxfmt_support_oxfmtrc_overrides branch January 19, 2026 07:46
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 19, 2026
Boshen added a commit to oxc-project/website that referenced this pull request Feb 4, 2026
Document the new `overrides` field for file-specific formatting options.

Ref: oxc-project/oxc#18068

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
leaysgur added a commit to oxc-project/website that referenced this pull request Feb 4, 2026
* docs(formatter): add overrides configuration section

Document the new `overrides` field for file-specific formatting options.

Ref: oxc-project/oxc#18068

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Clarify glob pattern resolution in config.md

Added clarification on glob pattern resolution in config.

Signed-off-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com>

---------

Signed-off-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com>
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-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oxfmt: overrides support, a.k.a language specific configuration

3 participants