feat: add pre-commit hook for oxfmt

Set up husky and lint-staged to run oxfmt on staged files
before each commit.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-04-12 17:46:08 +00:00
parent c95c730533
commit 9184e76845
3 changed files with 65 additions and 6 deletions

View File

@@ -11,17 +11,23 @@
"lint": "oxlint .",
"lint:fix": "oxlint --fix .",
"format": "oxfmt --write .",
"format:check": "oxfmt --check ."
"format:check": "oxfmt --check .",
"prepare": "husky"
},
"devDependencies": {
"@json-render/core": "^0.12.1",
"@nym.sh/jrx": "^0.2.0",
"@types/bun": "latest",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"oxfmt": "^0.24.0",
"oxlint": "^1.39.0"
},
"peerDependencies": {
"typescript": "^6"
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json,css,md}": "oxfmt --write"
}
}