Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849import { defineConfig, type OxfmtConfig } from "oxfmt";
// Shared formatting options for the root, docs, and workspace configs.export const fmtBase: OxfmtConfig = { printWidth: 100, tabWidth: 2, useTabs: false, endOfLine: "lf", semi: true, singleQuote: false, trailingComma: "all", insertFinalNewline: true, sortPackageJson: true,};
// Paths that the CI `changes` filter and the Workers Builds watch paths skip, so a push touching// only them runs no check. `check` must not read them, or a mistake in one fails the next// unrelated build. oxfmt formats a file with its nearest config, whose patterns match only below// its own directory, so every config lists them. Bare names match at any depth.export const skippedPaths: string[] = ["AGENTS.md", "CLAUDE.md"];
// Workspace packages also sort package.json scripts.export const workspaceFmt: OxfmtConfig = { ...fmtBase, ignorePatterns: skippedPaths, sortPackageJson: { sortScripts: true },};
// Repo root only formats top-level files; each workspace formats itself with// its own oxfmt.config.ts.export default defineConfig({ ...fmtBase, ignorePatterns: [ "admin/**", "api/**", "cli/**", "docs/**", "iac/**", "packages/**", "router/**", "tracker/**", "node_modules/**", ...skippedPaths, ".agents/**", ".zed/**", ".vscode/**", ],});