fix(hooks): run the checkout's own oxfmt, oxlint and tsc instead of bunx (#5751)

This commit is contained in:
Miguel Ángel
2026-10-22 18:53:34 +00:00
committed by GitHub
parent 1b1a576d52
commit b3f5869035
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -55,9 +55,9 @@ any test file that no runner reaches.
Uses **oxlint** and **oxfmt** (not eslint, not prettier, not biome).
```bash
bunx oxlint <files> # Lint
bunx oxfmt <files> # Format
bunx oxfmt --check <files> # Check formatting (CI / pre-commit)
node_modules/.bin/oxlint <files> # Lint
node_modules/.bin/oxfmt <files> # Format
node_modules/.bin/oxfmt --check <files> # Check formatting (CI / pre-commit)
```
Always lint and format changed files before committing. Lefthook pre-commit hooks enforce this automatically.
+3 -3
View File
@@ -53,9 +53,9 @@ bun run test # Run all tests
Uses **oxlint** and **oxfmt** (not eslint, not prettier, not biome).
```bash
bunx oxlint <files> # Lint
bunx oxfmt <files> # Format
bunx oxfmt --check <files> # Check formatting (CI / pre-commit)
node_modules/.bin/oxlint <files> # Lint
node_modules/.bin/oxfmt <files> # Format
node_modules/.bin/oxfmt --check <files> # Check formatting (CI / pre-commit)
```
Always lint and format changed files before committing. Lefthook pre-commit hooks enforce this automatically.
+4 -4
View File
@@ -3,13 +3,13 @@ pre-commit:
commands:
lint:
glob: "*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}"
run: bunx oxlint --no-error-on-unmatched-pattern {staged_files}
run: node_modules/.bin/oxlint --no-error-on-unmatched-pattern {staged_files}
format:
glob: "*.{js,jsx,ts,tsx,mjs,cjs,mts,cts,json,md,yaml,yml}"
# Auto-format and re-stage so the committed snapshot is always formatted.
# Replaces --check which only reports — that left unformatted files in
# commits when the hook ran after the amend snapshot was taken.
run: bunx oxfmt --no-error-on-unmatched-pattern {staged_files} && git add -f {staged_files}
run: node_modules/.bin/oxfmt --no-error-on-unmatched-pattern {staged_files} && git add -f {staged_files}
skills-manifest:
glob: "skills/**"
# Regenerate the freshness fingerprint when a skill changes, then re-stage
@@ -19,7 +19,7 @@ pre-commit:
run: bun packages/cli/scripts/gen-skills-manifest.ts && git add skills-manifest.json
typecheck:
glob: "*.{ts,tsx}"
run: cd packages/core && bunx tsc --noEmit && cd ../studio && bunx tsc --noEmit && cd ../.. && bunx tsc --noEmit -p scripts/tsconfig.json
run: cd packages/core && node_modules/.bin/tsc --noEmit && cd ../studio && node_modules/.bin/tsc --noEmit && cd ../.. && node_modules/.bin/tsc --noEmit -p scripts/tsconfig.json
# Mirrors the CI gate (same `--base origin/main` so the local hook can't
# pass on a branch CI would fail). Audits the working tree, which means
# unstaged WIP in `packages/**` is part of the diff — stash before
@@ -65,4 +65,4 @@ pre-commit:
commit-msg:
commands:
commitlint:
run: bunx commitlint --edit "{1}"
run: node_modules/.bin/commitlint --edit "{1}"