Skip to content

fix: share CI quality gates with husky hooks - #133

Merged
schultzp2020 merged 3 commits into
mainfrom
fix/husky-lint-staged-ci-parity
Jul 22, 2026
Merged

fix: share CI quality gates with husky hooks#133
schultzp2020 merged 3 commits into
mainfrom
fix/husky-lint-staged-ci-parity

Conversation

@schultzp2020

@schultzp2020 schultzp2020 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract scripts/check-changed.sh as the single source of truth for changed-file quality gates (format, lint, package name length, package tests, README freshness)
  • CI (.github/workflows/ci.yml) and husky pre-push both run that script — local and remote cannot drift
  • Husky pre-commit runs yarn lint-staged with CI-aligned globs (tsx/jsx, yarn lint, README regen on codemod.yaml changes)
  • Hooks fail loudly if node_modules / lint-staged is missing (no more silent skip in worktrees)

Why

MUI→BUI consistency commits landed with CI-only failures because:

  1. core.hooksPath was unset without yarn install, so husky never ran
  2. lint-staged was narrower than CI (no tsx, lint:fix only, no README check)

This is the permanent wiring, not a one-off workaround.

Test plan

  • yarn check:changed origin/main passes on this branch
  • pre-commit runs lint-staged and blocks when lint-staged is missing
  • CI green on this PR
  • From a worktree without yarn install, confirm commit fails with a clear error after hooks are configured on the clone

schultzp2020 and others added 2 commits July 22, 2026 15:33
Use yarn lint-staged, cover tsx/jsx, run yarn lint (not only lint:fix),
and regenerate README when codemod.yaml files are staged so pre-commit
catches the failures that were only showing up in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract scripts/check-changed.sh as the single source of truth for
format/lint/package-name/test/README checks. CI and husky pre-push both
call it; pre-commit fails loudly without yarn install so hooks cannot
be skipped silently.

Co-authored-by: Cursor <cursoragent@cursor.com>
@schultzp2020 schultzp2020 changed the title fix: make husky/lint-staged match CI gates fix: share CI quality gates with husky hooks Jul 22, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@schultzp2020
schultzp2020 merged commit a877b8a into main Jul 22, 2026
2 checks passed
@schultzp2020
schultzp2020 deleted the fix/husky-lint-staged-ci-parity branch July 22, 2026 19:40
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