A oxfmt config wrapper with rules to write consistently formatted code.
Install the package in your project:
pnpm add -D @wanner.work/oxfmt-rules oxfmtThen use the config wrapper.
import { defineConfigWithRules } from '@wanner.work/oxfmt-rules'
export default defineConfigWithRules({
// your overrides
})The wrapper deep-merges your config on top of the defaults, so you only need to specify the values you want to change.
| Option | Value |
|---|---|
printWidth |
80 |
semi |
false |
trailingComma |
'none' |
singleQuote |
true |
sortPackageJson |
true |
sortImports |
newlinesBetween: false with custom group ordering |
Imports are sorted in the following order, with a blank line between unknown and style groups:
builtinexternalinternal,subpathparent,sibling,indexunknownstyle