Files
t3code/.plans/08-precommit-format-and-lint.md
Jason LasterandJulius Marminge 223c3dc800 chore(ci): add and apply fmt:check script (#779)
* Add  formatting conventions

* Add a fmt lint check

* rely on defaults

---------

Co-authored-by: Julius Marminge <[email protected]>
2026-03-10 00:17:18 -07:00

975 B

Plan: Add Pre-Commit Formatting/Lint Hooks

Summary

Introduce pre-commit automation so formatting and basic lint checks happen before commits.

Motivation

  • Current lint failures include formatting-only issues.
  • Shift-left feedback reduces noisy CI failures and cleanup churn.

Scope

  • Root tooling config and package scripts.
  • No runtime code changes.

Proposed Changes

  1. Add hook tooling (e.g. Husky + lint-staged or Lefthook).
  2. Configure staged-file tasks:
    • biome format --write
    • biome check
  3. Add setup docs in README.
  4. Keep checks fast to avoid developer friction.

Risks

  • Slow hooks can frustrate contributors and be bypassed.
  • Need to ensure compatibility with Bun workspace setup.

Validation

  • Create sample staged changes and verify hook behavior.
  • Confirm formatting fixes are applied automatically.

Done Criteria

  • Pre-commit hook installed and documented.
  • Formatting-only lint failures drop significantly.