@draft0/oxfmt
v0.1.0
Published
Opinionated Oxfmt to help you ship faster.
Downloads
246
Maintainers
Readme
@draft0/oxfmt
Skip setup, start shipping.
⚠️ This package is in beta preview and its API is subject to change.
@draft0/oxfmt is part of Draft0, an opinionated, zero-configuration toolkit for modern TypeScript projects.
This package provides an Oxfmt helper with shared formatting defaults (JSDoc, import sorting, package.json sorting, and related options) so you can rely on consistent style without assembling every knob yourself.
Install
npm install -D @draft0/oxfmt oxfmtUsage
// oxfmt.config.ts
import { defineConfig } from "@draft0/oxfmt";
export default defineConfig();Merge priority
defineConfig(...) merges your config after the bundled Draft0 defaults (defaults). The merge is shallow at the top level: any object you supply for nested fields (such as jsdoc or sortImports) replaces the entire corresponding object from defaults, so overrides are explicit rather than deeply merged field by field.
import { defineConfig } from "@draft0/oxfmt";
export default defineConfig({
sortPackageJson: false,
});Compose with upstream defineConfig
If you prefer to start from defineConfig in oxfmt, spread Draft0’s baseline and add your overrides:
import { defineConfig } from "oxfmt";
import { defaults } from "@draft0/oxfmt";
export default defineConfig({
...defaults,
sortPackageJson: false,
});Documentation
Full documentation: draft0.dev.
