Skip to content

fix(ci): pin lint-staged to the repo's prettier to stop schema-check false positives - #127

Merged
emmanuelnk merged 1 commit into
mainfrom
fix/prettier-version-skew
Aug 12, 2026
Merged

fix(ci): pin lint-staged to the repo's prettier to stop schema-check false positives#127
emmanuelnk merged 1 commit into
mainfrom
fix/prettier-version-skew

Conversation

@emmanuelnk

Copy link
Copy Markdown
Owner

Problem

Schema Change Check run 31616735542 failed — and bot PR #126 was opened — with a diff that contains no schema change at all, only three union-wrapping formatting flips in the generated types.

Root cause: the lint-staged pre-commit hook ran pnpm dlx prettier (unpinned — currently resolves 3.9.6) while generate-workflow-types and the schema-change-check workflow format with the repo's pinned prettier 3.5.3. The two versions wrap long unions differently, so every commit of the generated file flipped it to 3.9.6 style, and the next schema check regenerated 3.5.3 style → non-empty diff → false positive.

Solution

  • lint-staged now invokes prettier directly, which resolves to the pinned 3.5.3 in node_modules/.bin — hook, generation script, and CI all format identically.
  • The generated types file is normalized back to the pinned formatting (the 3 hunks from the failed run, no semantic change).

Supersedes and closes #126.

Test Plan

After the commit (which ran through the fixed hook), pnpm generate-workflow-types produces a zero-length diff — the exact check CI performs. All 302 tests pass.

🤖 Generated with Claude Code

…false positives

The pre-commit hook ran 'pnpm dlx prettier' (unpinned, currently 3.9.6)
while generate-workflow-types and the schema-change-check workflow format
with the pinned prettier 3.5.3. The two disagree on union wrapping, so
each commit of the generated types flipped formatting and the next
schema check failed with a formatting-only diff (run 31616735542).

Use the local prettier in lint-staged and normalize the generated file
to the pinned formatting.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
github-actions-workflow-ts Ready Ready Preview Aug 12, 2026 4:22pm

@github-actions github-actions Bot added the bug Something isn't working label Aug 12, 2026
@emmanuelnk
emmanuelnk merged commit feed11b into main Aug 12, 2026
11 checks passed
@emmanuelnk
emmanuelnk deleted the fix/prettier-version-skew branch August 12, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant