Skip to content

feat: add CI checks to pre-commit hook#1227

Merged
abueide merged 4 commits intomasterfrom
feat/precommit-ci-checks
Apr 14, 2026
Merged

feat: add CI checks to pre-commit hook#1227
abueide merged 4 commits intomasterfrom
feat/precommit-ci-checks

Conversation

@abueide
Copy link
Copy Markdown
Contributor

@abueide abueide commented Apr 14, 2026

Summary

Add devbox run check command and update pre-commit hook to run all CI checks locally before commit.

Changes

  • Add devbox run check command to devbox.json that runs:
    • devbox run lint (eslint)
    • devbox run format-check (treefmt)
    • devbox run build
    • devbox run typecheck
    • devbox run test
  • Update .husky/pre-commit to run devbox run check

Why

  • Catch CI failures locally before pushing
  • Ensure local environment matches CI exactly (via devbox)
  • Single command stays in sync - updates to individual commands automatically propagate to check

Result

All CI checks run automatically on every commit. If they fail, the commit is blocked.


🤖 Generated with Claude Code

abueide and others added 4 commits April 14, 2026 10:43
Add `devbox run check` command that runs all CI checks:
- lint (eslint)
- format-check (treefmt)
- build
- typecheck
- test

Update pre-commit hook to run `devbox run check` before each commit,
ensuring local environment matches CI exactly.

The check command calls other devbox commands (not yarn directly) so
updates to individual commands stay in sync.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add NPM_TOKEN environment variable to all release steps (dry-run, beta,
production). Required by @semantic-release/npm plugin to publish packages.

This fixes release workflow failures where the job would fail immediately
without running any steps due to missing npm authentication.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Repository uses npm provenance with GitHub OIDC (id-token: write),
not NPM_TOKEN. Revert the incorrect token addition.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update pre-commit hook to:
1. Run format (auto-fixes formatting issues)
2. Stage formatted files (git add -u)
3. Run CI checks

This prevents commits from being blocked by formatting issues - files are
automatically formatted and staged before checks run.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@abueide abueide merged commit a42fa51 into master Apr 14, 2026
7 checks passed
@abueide abueide deleted the feat/precommit-ci-checks branch April 14, 2026 19:46
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