build: migrate formatting pipeline to oxfmt

This commit is contained in:
xingyu4j
2026-03-13 21:56:08 +08:00
parent de0181e0d9
commit 6dabb848a5
22 changed files with 318 additions and 180 deletions

View File

@@ -0,0 +1,22 @@
import { defineConfig as defineOxfmtConfig } from 'oxfmt';
type OxfmtConfig = Parameters<typeof defineOxfmtConfig>[0];
const oxfmtConfig = defineOxfmtConfig({
printWidth: 80,
proseWrap: 'never',
semi: true,
singleQuote: true,
sortPackageJson: false,
trailingComma: 'all',
});
function defineConfig(config: OxfmtConfig = {}) {
return defineOxfmtConfig({
...oxfmtConfig,
...config,
});
}
export { defineConfig, oxfmtConfig };
export type { OxfmtConfig };