chore: prettier-ignore tsconfig.json so next build reformatting doesn't fail check-format (#4885)#4886
Merged
Merged
Conversation
…'t fail check-format (#4885) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents next build / next dev from causing Prettier format-check failures by excluding the Next-managed tsconfig.json from repository-wide prettier --check runs, aligning with the workflow where Next may rewrite that file into a shape Prettier rejects.
Changes:
- Add
tsconfig.jsonto.prettierignoreunder the existing Next.js ignore section. - Document why it’s ignored (Next rewrites it during build; reference #4885).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NoopDog
approved these changes
Jul 1, 2026
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.
Summary
Closes #4885.
next build/next devrewritestsconfig.jsoninto a multiline shape (expanded arrays + a.next/dev/types/**/*.tsinclude entry) that failsprettier --check. Because the pre-commit hook runscheck-format(prettier --check .) across the whole repo, committing after a build fails the hook ontsconfig.json— forcing a--no-verifybypass — and the file shows as perpetually "modified" ingit status.tsconfig.jsonis a Next-managed file, so this adds it to.prettierignore, letting Next own its format without prettier fighting it. The committedtsconfig.jsonitself is already prettier-clean and is left unchanged.Change
.prettierignore: addtsconfig.jsonunder the existing# next.jssection.Verification
tsconfig.jsonin its build-modified (multiline) state,npm run check-formatnow exits 0 (previously failed)tsconfig.jsonunchanged and still prettier-clean--no-verify🤖 Generated with Claude Code