Skip to content

chore: add Prettier + lint-staged to monorepo (SPEC-006) - #22

Open
kriss145 wants to merge 1 commit into
open-mercato:developfrom
kriss145:chore/prettier-monorepo
Open

chore: add Prettier + lint-staged to monorepo (SPEC-006)#22
kriss145 wants to merge 1 commit into
open-mercato:developfrom
kriss145:chore/prettier-monorepo

Conversation

@kriss145

Copy link
Copy Markdown
Contributor

Summary

  • Proposes adding Prettier as the canonical formatter for the official-modules monorepo
  • Adds lint-staged to auto-format staged files on commit
  • Adds format:check CI step to fail PRs with inconsistent formatting
  • Full design rationale in SPEC-006

Motivation

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-revs to keep git blame readable.

Test plan

  • Review SPEC-006 config decisions (printWidth, quotes, semi, trailingComma)
  • Agree or propose changes to the Prettier config
  • Confirm approach for git hooks runner (husky vs simple-git-hooks)
  • Green-light implementation

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