2026-03-02 14:59:16 +01:00
|
|
|
output:
|
|
|
|
|
- meta
|
|
|
|
|
- summary
|
|
|
|
|
- success
|
|
|
|
|
- failure
|
|
|
|
|
- execution
|
|
|
|
|
- execution_out
|
|
|
|
|
- execution_info
|
|
|
|
|
- skips
|
|
|
|
|
|
2026-02-24 15:17:21 +01:00
|
|
|
pre-commit:
|
2026-03-02 16:41:23 +01:00
|
|
|
parallel: true
|
2026-02-24 15:17:21 +01:00
|
|
|
commands:
|
2026-03-06 09:14:21 -08:00
|
|
|
check-binaries:
|
|
|
|
|
tags: binaries
|
2026-04-17 12:55:00 +02:00
|
|
|
run: bash scripts/hooks/check-binaries.sh
|
2026-03-02 16:24:48 +01:00
|
|
|
sync-lockfile:
|
|
|
|
|
tags: lockfile
|
2026-03-03 14:51:42 +01:00
|
|
|
glob: "**/package.json"
|
2026-03-02 16:24:48 +01:00
|
|
|
run: pnpm i --lockfile-only
|
|
|
|
|
stage_fixed: true
|
2026-02-24 15:17:21 +01:00
|
|
|
lint-fix:
|
2026-03-02 15:56:37 +01:00
|
|
|
tags: lint
|
2026-04-22 10:09:51 -07:00
|
|
|
# Scope oxlint and oxfmt to just the files staged for commit — running
|
|
|
|
|
# `--fix .` / `--write .` across the whole monorepo on every commit is
|
|
|
|
|
# both slow and blurs the hook's purpose (touch files that aren't part
|
|
|
|
|
# of this change). Guard against empty `{staged_files}` expansion: when
|
|
|
|
|
# a commit touches only non-matching files (markdown, YAML), lefthook
|
|
|
|
|
# still invokes this hook with an empty expansion, and oxlint/oxfmt
|
|
|
|
|
# would default to operating on the current directory, defeating the
|
|
|
|
|
# scoping entirely. stage_fixed re-stages whatever the hooks modify.
|
|
|
|
|
glob: "*.{js,jsx,ts,tsx,mjs,cjs}"
|
|
|
|
|
run: |
|
|
|
|
|
if [ -n "{staged_files}" ]; then
|
|
|
|
|
pnpm exec oxlint --fix {staged_files} && pnpm exec oxfmt --write {staged_files}
|
|
|
|
|
fi
|
2026-02-24 15:17:21 +01:00
|
|
|
stage_fixed: true
|
2026-03-02 16:09:55 +01:00
|
|
|
test-and-check-packages:
|
|
|
|
|
tags: test-packages
|
2026-02-24 15:17:21 +01:00
|
|
|
env:
|
|
|
|
|
NX_TUI: "false"
|
2026-03-02 16:09:55 +01:00
|
|
|
run: pnpm run test && pnpm run check:packages
|
2026-02-24 15:17:21 +01:00
|
|
|
|
|
|
|
|
commit-msg:
|
|
|
|
|
commands:
|
|
|
|
|
commitlint:
|
2026-03-02 15:56:37 +01:00
|
|
|
tags: commitlint
|
2026-02-24 15:17:21 +01:00
|
|
|
run: pnpm commitlint --edit {1}
|