Skip to content

chore(repo): catch formatting in pre-commit before CI - #592

Merged
izadoesdev merged 1 commit into
stagingfrom
izadoesdev/precommit-format
Aug 4, 2026
Merged

chore(repo): catch formatting in pre-commit before CI#592
izadoesdev merged 1 commit into
stagingfrom
izadoesdev/precommit-format

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Aug 4, 2026

Copy link
Copy Markdown
Member

The pre-commit hook ran check-types and policy-lint but never ultracite check, so formatting issues (like the #590 one-liner that failed the release lint on #587) only surfaced in CI. Adds a staged-file ultracite check step to lefthook's pre-commit, mirroring CI's Lint job.

Verified: staged a misformatted file and ran bunx lefthook run pre-commit — the new format command fails with Run: bun run format; clean files pass.


Summary by cubic

Add ultracite formatting checks to lefthook pre-commit so formatting issues are caught locally instead of failing in CI. The hook runs bunx ultracite check {staged_files} across JS/TS/JSON/CSS and fails with “Run: bun run format” to guide fixes.

Written for commit 33836f3. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview Aug 4, 2026 12:43pm
databuddy-status Ready Ready Preview Aug 4, 2026 12:43pm
documentation Ready Ready Preview Aug 4, 2026 12:43pm

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5c35f380-2ae3-4df4-a7f3-31fd5ecd39c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dosubot

dosubot Bot commented Aug 4, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-09-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about Databuddy Add Dosu to your team

@unkey-deploy

unkey-deploy Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Aug 4, 2026 12:42pm

@izadoesdev
izadoesdev merged commit cf830f7 into staging Aug 4, 2026
10 of 13 checks passed
@izadoesdev
izadoesdev deleted the izadoesdev/precommit-format branch August 4, 2026 12:42
@izadoesdev
izadoesdev restored the izadoesdev/precommit-format branch August 4, 2026 12:42
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds an Ultracite check for staged source and configuration files to the pre-commit hook, allowing formatting and lint failures to surface before CI.

  • Runs bunx ultracite check against matching staged files.
  • Provides remediation guidance through the hook’s failure message.

Confidence Score: 5/5

The PR appears safe to merge, with the new hook using the repository’s existing pinned Ultracite tooling.

The added command applies the same Ultracite check used by CI to relevant staged files, and no concrete build, hook-execution, or coverage failure remains.

Important Files Changed

Filename Overview
lefthook.yml Adds a staged-file Ultracite pre-commit check consistent with the repository’s existing lint and formatting scripts; no actionable defect was established.

Reviews (1): Last reviewed commit: "chore(repo): run ultracite check in pre-..." | Re-trigger Greptile

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.

1 participant