chore: add Prettier + lint-staged to monorepo (SPEC-006) - #22
Open
kriss145 wants to merge 1 commit into
Open
Conversation
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
official-modulesmonorepolint-stagedto auto-format staged files on commitformat:checkCI step to fail PRs with inconsistent formattingMotivation
Currently each contributor formats TypeScript differently — spacing, quote style, semicolons, trailing commas. Three packages already show inconsistent style. As module count grows, divergence compounds and code reviews waste time on whitespace instead of logic.
Proposed config
{ "printWidth": 120, "singleQuote": true, "semi": false, "trailingComma": "all" }Choices are aligned with the existing codebase majority style.
What this PR does NOT include
The implementation (actual Prettier install, bulk format commit, CI wiring) is intentionally left out. This PR opens the discussion — if maintainers agree with the approach, a follow-up PR will implement SPEC-006 Phase 1.
Migration note
Once the bulk format commit lands, all open branches will need a rebase. The spec proposes isolating the format commit and adding its SHA to
.git-blame-ignore-revsto keepgit blamereadable.Test plan