Skip to content

chore: add lefthook pre-commit hook for oxfmt and oxlint - #107

Merged
alexanbj merged 1 commit into
mainfrom
chore/lefthook
Nov 27, 2026
Merged

alexanbj merged 1 commit into
mainfrom
chore/lefthook

Conversation

@alexanbj

Copy link
Copy Markdown
Contributor

Summary

  • Add lefthook with a pre-commit hook that runs oxfmt and oxlint --fix on staged files (fixes are re-staged), modelled on code-obos/obos-nettsider#5220.
  • Install the hook automatically via a prepare script. It is lefthook install || true so installs without a .git directory (e.g. Docker builds) don't fail.
  • Document the hook.

Test plan

  • install installs the git hook
  • Committing a badly formatted staged file gets it formatted and re-staged
  • CI passes

🤖 Generated with Claude Code

Add lefthook with a pre-commit hook that runs oxfmt and oxlint --fix on staged files (fixes are re-staged), installed automatically via the prepare script.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@alexanbj
alexanbj requested a review from a team as a code owner November 27, 2026 08:28
@alexanbj
alexanbj merged commit 3391d3e into main Nov 27, 2026
1 check passed
@alexanbj
alexanbj deleted the chore/lefthook branch November 27, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants