Skip to content

Commit bbbbf83

Browse files
committed
chore: add oxfmt tooling
Adds the oxfmt formatter (devDep + .oxfmtrc.json), `format` / `format:check` scripts, and wires `oxfmt --write` into lint-staged so new commits stay formatted. The CI format-check job and the actual reformat are added in follow-up commits.
1 parent bc21bd5 commit bbbbf83

3 files changed

Lines changed: 237 additions & 0 deletions

File tree

.oxfmtrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"tabWidth": 4,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 120,
6+
"ignorePatterns": [
7+
"**/*.md",
8+
"**/*.json",
9+
"**/*.jsonc",
10+
"**/*.yaml",
11+
"**/*.yml",
12+
"**/node_modules",
13+
"**/dist",
14+
"coverage"
15+
]
16+
}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
"release": "pnpm build && lerna version patch && lerna publish from-package --contents dist",
3434
"lint": "oxlint --type-aware",
3535
"lint:fix": "oxlint --type-aware --fix",
36+
"format": "oxfmt",
37+
"format:check": "oxfmt --check",
3638
"preinstall": "npx only-allow pnpm"
3739
},
3840
"commitlint": {
@@ -42,6 +44,7 @@
4244
},
4345
"lint-staged": {
4446
"*.ts": [
47+
"oxfmt --write --no-error-on-unmatched-pattern",
4548
"oxlint --type-aware --fix --no-error-on-unmatched-pattern"
4649
]
4750
},
@@ -60,6 +63,7 @@
6063
"lerna": "^9.0.6",
6164
"lint-staged": "^16.0.0",
6265
"nock": "^14.0.0",
66+
"oxfmt": "0.46.0",
6367
"oxlint": "1.62.0",
6468
"oxlint-tsgolint": "0.22.0",
6569
"rimraf": "^6.0.1",

pnpm-lock.yaml

Lines changed: 217 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)