fix(config): use OxfmtConfig instead of FormatOptions for fmt types#1075
fix(config): use OxfmtConfig instead of FormatOptions for fmt types#1075
OxfmtConfig instead of FormatOptions for fmt types#1075Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
How to use the Graphite Merge QueueAdd 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. |
There was a problem hiding this comment.
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.fmttyping from the CLI’sFormatOptionsalias toOxfmtConfigfromoxfmt. - Remove the now-unused
oxfmt-config.tstype 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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
this is my first vp PR, MK please advise me 😅
9ad57d5 to
51ee7e8
Compare

fixes #1073