oxfmt (Oxc formatter) shareable config for Anolilab.
A shareable oxfmt configuration that mirrors
@anolilab/prettier-config wherever
oxfmt supports the same option, so code formatted by oxfmt matches code formatted by Prettier
under the Anolilab style.
Install
npm install --save-dev @anolilab/oxfmt-config oxfmt
pnpm add -D @anolilab/oxfmt-config oxfmt
oxfmtis a peer dependency, install it alongside this package.
Setup
Run the installer to scaffold an oxfmt.config.ts for you:
npx oxfmt-config:install
Or wire it up manually. oxfmt auto-discovers .oxfmtrc.json, .oxfmtrc.jsonc, oxfmt.config.ts
and oxfmt.config.mts (note: oxfmt.config.js is not auto-discovered).
oxfmt.config.ts (imports this package)
import config from "@anolilab/oxfmt-config";
export default config;
Overriding
Spread the config and change what you need:
import config from "@anolilab/oxfmt-config";
export default {
...config,
printWidth: 120,
};
What it sets
The config sets the subset of oxfmt options that overlap with the Anolilab Prettier style —
printWidth: 160, tabWidth: 4, double quotes, semicolons, trailingComma: "all",
arrowParens: "always" — and leaves oxfmt's own defaults for everything else.