Skip to content

feat: add pre-commit hook for oxfmt - #120

Open
kennethnym wants to merge 1 commit into
masterfrom
feat/pre-commit-hook
Open

feat: add pre-commit hook for oxfmt#120
kennethnym wants to merge 1 commit into
masterfrom
feat/pre-commit-hook

Conversation

@kennethnym

Copy link
Copy Markdown
Owner

Description

Add a pre-commit hook that runs oxfmt on staged files via husky + lint-staged, so formatting is enforced automatically on every commit.

How to test

  1. bun install
  2. Stage a .ts file with bad formatting
  3. git commit — lint-staged should auto-format the file before committing

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

Co-authored-by: Ona <no-reply@ona.com>
@kennethnym
kennethnym marked this pull request as ready for review April 12, 2026 17:47
@ona-patrol

Copy link
Copy Markdown
Collaborator

Reviewed the changes. Implementation looks solid — standard husky + lint-staged setup, bunx usage is consistent with the bun-based project, and the lint-staged glob covers the file types oxfmt supports. No significant concerns.

@ona-patrol

Copy link
Copy Markdown
Collaborator

Reviewed the changes. Implementation looks solid — husky + lint-staged is the standard approach for pre-commit formatting, the glob pattern covers the project's main file types, and the existing oxfmt configuration (including ignore patterns in .oxfmtrc.json) is respected. No significant concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants