fix(ci): pin lint-staged to the repo's prettier to stop schema-check false positives - #127
Merged
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) whilegenerate-workflow-typesand 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
prettierdirectly, which resolves to the pinned 3.5.3 innode_modules/.bin— hook, generation script, and CI all format identically.Supersedes and closes #126.
Test Plan
After the commit (which ran through the fixed hook),
pnpm generate-workflow-typesproduces a zero-length diff — the exact check CI performs. All 302 tests pass.🤖 Generated with Claude Code