@wellmade/oxfmt-config
v0.2.0
Published
Wellmade's shared oxfmt config — Oxc's Rust-based formatter, mirroring @wellmade/prettier-config's intent.
Maintainers
Readme
@wellmade/oxfmt-config
Shared oxfmt config — Oxc's Rust-based formatter.
Mirrors @wellmade/prettier-config's choices wherever oxfmt supports the equivalent option. Wellmade dogfoods this on its own internal projects to evaluate oxfmt as a Prettier successor; a parity-test in this package fails CI if the two configs drift.
Install
npm install --save-dev oxfmt @wellmade/oxfmt-configUsage
oxfmt does not yet support extends in its JSON config (verified against oxfmt 0.52 — extends is silently ignored). The only path that actually composes today is a JS/TS runtime config file:
// oxfmt.config.ts (or oxfmt.config.js / .mjs)
import wellmade from '@wellmade/oxfmt-config';
export default wellmade;Run:
npx oxfmt .When oxfmt grows JSON extends support upstream, we'll add a .oxfmtrc.json sibling export and document both paths.
What's in it
| Option | Value | Why |
| ----------------- | --------- | ------------------------------------------------------------ |
| printWidth | 100 | Sweet spot for side-by-side diff review. |
| tabWidth | 2 | Community default. |
| semi | true | Explicit > clever ASI. |
| singleQuote | true | JS strings; JSX falls back to double per oxfmt default. |
| trailingComma | 'all' | Cleaner diffs, smaller AI patches. |
| bracketSameLine | false | JSX > on its own line. |
| endOfLine | 'lf' | Cross-platform consistency. |
These match @wellmade/prettier-config exactly. A test in this package asserts parity for every shared option — if Prettier grows an option oxfmt doesn't have (or vice versa), the test stays green; if both have the same option with different values, CI fails.
Status
0.x. oxfmt itself is 0.x, with honest documentation about which Prettier options it doesn't yet support. Output is "near-Prettier" but not byte-identical. Wellmade is using this on its own work before recommending it to customer projects.
What's intentionally not in it
- No
experimentalTernaries. Prettier 3.1+ ships this; oxfmt doesn't have an equivalent yet. - No per-file overrides yet. Prettier's
overridesfor.svg,.md,package.jsondon't have a 1:1 oxfmt equivalent; revisit when oxfmt's config surface widens. - No Tailwind variant. No plugin support in oxfmt yet.
- No JSON config file. Until oxfmt supports
extends, shipping one would imply composition that doesn't actually work.
