Skip to content

fix(oxfmt): Restore customGroups handling lost#18243

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

fix(oxfmt): Restore customGroups handling lost#18243
graphite-app[bot] merged 1 commit intomainfrom
01-19-fix_oxfmt_restore_customgroups_handling_lost

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Jan 19, 2026

Fix for the issue where the code passing settings from oxfmt to oxc_formatter was missing.

  • Also added tests
  • Also fixed the TS type that was missing

Copilot AI review requested due to automatic review settings January 19, 2026 13:48
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-bug Category - Bug labels Jan 19, 2026
Copy link
Member Author


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 fix(oxfmt): Restore customGroups handling lost fix(oxfmt): Restore customGroups handling lost Jan 19, 2026
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 restores the customGroups handling for import sorting that was previously lost. The feature allows users to define custom groups with specific patterns to organize their imports according to custom rules.

Changes:

  • Added customGroups configuration handling in Rust code for both config parsing paths
  • Added customGroups TypeScript type definition in the API
  • Fixed documentation comment for the groups field that incorrectly mentioned "Custom groups"
  • Added comprehensive tests (both CLI and API) to verify the functionality

Reviewed changes

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

Show a summary per file
File Description
apps/oxfmt/src/core/oxfmtrc.rs Added customGroups mapping from config to CustomGroupDefinition in two code paths (lines 400-408 and implied at 948-956)
apps/oxfmt/src-js/index.ts Added customGroups type definition and corrected the documentation comment for groups field
apps/oxfmt/test/api/api.test.ts Added API test to verify customGroups sorting behavior
apps/oxfmt/test/cli/sort_imports/sort_imports.test.ts Added CLI test for customGroups functionality
apps/oxfmt/test/cli/sort_imports/fixtures/custom_groups/input.ts Test fixture with imports to be sorted
apps/oxfmt/test/cli/sort_imports/fixtures/custom_groups/.oxfmtrc.json Test configuration file with customGroups definition

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

@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Jan 19, 2026
Copy link
Member Author

leaysgur commented Jan 19, 2026

Merge activity

Fix for the issue where the code passing settings from `oxfmt` to `oxc_formatter` was missing.

- Also added tests
- Also fixed the TS type that was missing
@graphite-app graphite-app bot force-pushed the 01-19-fix_oxfmt_restore_customgroups_handling_lost branch from 4da4d90 to 90ce4b7 Compare January 19, 2026 14:07
@graphite-app graphite-app bot merged commit 90ce4b7 into main Jan 19, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 01-19-fix_oxfmt_restore_customgroups_handling_lost branch January 19, 2026 14:14
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 19, 2026
overlookmotel added a commit that referenced this pull request Jan 19, 2026
# Oxlint
### ⚡ Performance

- 1a247f1 linter/no-redeclare: Avoid repeated PHF hashmap lookups
(#18248) (overlookmotel)

### 📚 Documentation

- 8a294d5 oxfmt, oxlint: Update logo (#18242) (Dunqing)
# Oxfmt
### 🐛 Bug Fixes

- 864b4ab oxfmt: Use `format_config` for `external_options` override
(#18252) (leaysgur)
- 90ce4b7 oxfmt: Restore `customGroups` handling lost (#18243)
(leaysgur)

### 📚 Documentation

- 8a294d5 oxfmt, oxlint: Update logo (#18242) (Dunqing)

Co-authored-by: overlookmotel <557937+overlookmotel@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-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants