Skip to content

fix(config): use OxfmtConfig instead of FormatOptions for fmt types#1075

Open
camc314 wants to merge 1 commit intomainfrom
c/03-20-fix_config_use_oxfmtconfig_instead_of_formatoptions_for_fmt_types
Open

fix(config): use OxfmtConfig instead of FormatOptions for fmt types#1075
camc314 wants to merge 1 commit intomainfrom
c/03-20-fix_config_use_oxfmtconfig_instead_of_formatoptions_for_fmt_types

Conversation

@camc314
Copy link

@camc314 camc314 commented Mar 20, 2026

fixes #1073

Screenshot 2026-03-20 at 18 33 00

@netlify
Copy link

netlify bot commented Mar 20, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 51ee7e8
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69bd926ce3c5950008d01332

@camc314 camc314 marked this pull request as ready for review March 20, 2026 18:22
Copilot AI review requested due to automatic review settings March 20, 2026 18:22
Copy link
Author

camc314 commented Mar 20, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

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

Fixes the defineConfig typing for the fmt option so users can configure formatter options that exist in oxfmt’s config schema (notably overrides), addressing issue #1073.

Changes:

  • Switch UserConfig.fmt typing from the CLI’s FormatOptions alias to OxfmtConfig from oxfmt.
  • Remove the now-unused oxfmt-config.ts type re-export shim.

Reviewed changes

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

File Description
packages/cli/src/oxfmt-config.ts Removes the obsolete type re-export shim for FormatOptions/related types.
packages/cli/src/index.ts Updates the fmt option type in the public UserConfig module augmentation to OxfmtConfig.

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

lint?: OxlintConfig;

fmt?: FormatOptions;
fmt?: OxfmtConfig;
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fmt type change is meant to fix #1073 (allow overrides in defineConfig). To prevent regressions, add a type-level test that defineConfig({ fmt: { overrides: [...] } }) is accepted (e.g., using expectTypeOf in an existing test file) and that fmt is inferred as the intended config type.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is my first vp PR, MK please advise me 😅

@camc314 camc314 force-pushed the c/03-20-fix_config_use_oxfmtconfig_instead_of_formatoptions_for_fmt_types branch from 9ad57d5 to 51ee7e8 Compare March 20, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defineConfig fmt option cannot define overrides

3 participants