Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
pnpm exec commitlint --edit "$1"
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
pnpm exec nano-staged
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -76,6 +76,13 @@ pnpm skills:install # restore Skilld links for Codex

Oxfmt owns formatting and Oxlint owns linting. Avoid unrelated formatting churn.

`pnpm install` installs Git hooks through the `prepare` script (`.husky/install.mjs`), which skips hook installation in CI and production environments:

- `pre-commit` runs `pnpm exec nano-staged`, which formats staged files with Oxfmt and re-stages them.
- `commit-msg` runs `pnpm exec commitlint --edit`, which enforces Conventional Commit messages.

If `pre-commit` fails, fix the reported error and commit again; formatting fixes are applied automatically. If `commit-msg` rejects your message, reword it to follow the Conventional Commit format below (after a failed commit, rerun `git commit` with a valid message; to fix the previous commit, use `git commit --amend`).

Use Conventional Commit-style messages and PR titles:

```text
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
export default {
extends: ['@commitlint/config-conventional'],
};
10 changes: 9 additions & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@
"format:check": "oxfmt --check .",
"lint": "TMPDIR=/tmp turbo run lint",
"lint:ci": "pnpm format:check && pnpm lint",
"prepare": "node .husky/install.mjs",
"skills:install": "skilld install --agent codex",
"skills:list": "skilld list",
"test": "TMPDIR=/tmp turbo run test --concurrency=1",
Expand All@@ -23,8 +24,12 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",
"@commitlint/cli": "^21.2.1",
"@commitlint/config-conventional": "^21.2.0",
"@redstardev/unplugin-version-injector": "0.0.2",
"@types/node": "^24.3.0",
"husky": "^9.1.7",
"nano-staged": "^1.0.2",
"oxfmt": "^0.62.0",
"oxlint": "^1.44.0",
"oxlint-tsgolint": "^7.0.2001",
Expand All@@ -36,8 +41,11 @@
"typescript": "^5.9.2",
"vitest": "^3.2.4"
},
"nano-staged": {
"*.{js,mjs,cjs,ts,tsx,json,jsonc,yaml,yml,md}": "oxfmt --write"
},
"engines": {
"node": ">=20.11"
"node": ">=22.18"
},
"packageManager": "pnpm@10.15.0"
}
Loading
Loading