Skip to content

Make Prettier formatting automatic - #1060

Merged
kompfner merged 2 commits into
mainfrom
pk/prettier-tooling
Aug 5, 2026
Merged

Make Prettier formatting automatic#1060
kompfner merged 2 commits into
mainfrom
pk/prettier-tooling

Conversation

@kompfner

@kompfner kompfner commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This repo has intended to use Prettier for a long time — .prettierrc landed 20 months ago, and both CONTRIBUTING.md and CLAUDE.md tell you to run it. Nothing enforced it, so 112 files had drifted out of style.

Commit 1 adds prettier, husky, and lint-staged as pinned dev dependencies, with a pre-commit hook that formats staged files. .nvmrc pins Node 24 and CI reads it.

Commit 2 formats the whole site — presentation only, except xtts.mdx, where Prettier's output needed a blank line before a closing <Warning> tag to stay valid MDX.

prettier --check is clean, every page compiles as MDX, mint broken-links passes, and all 911 link targets are unchanged. Test-merged against all 12 open PRs: #1054 overlaps 89 reformatted files and merges cleanly, and nothing else is newly affected.

Companion: pipecat-ai/pipecat#5226 makes the docs bot format the PRs it generates. Merge this one first.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔍 Mintlify preview for this branch: https://daily-pk-prettier-tooling.mintlify.site

Prettier ships as a dev dependency pinned in package-lock.json, so
contributors, the pre-commit hook, and the docs bot all format identically.
lint-staged runs it over staged files only, which keeps the hook fast and
leaves unstaged work untouched.

.nvmrc pins the Node version, and CI reads it rather than hardcoding one.

The setup instructions install Node from .nvmrc, pull the Mintlify CLI in with
the rest of the dependencies, and invoke it through npx. The project structure
listing and navigation example name directories and pages that exist.
Brings every page to the .prettierrc style so formatting no longer surfaces as
noise in content PRs. The changes are presentation only: prose reflow, table
padding, JSX spacing, and emphasis-marker normalization.

The XTTS deprecation warning gains a blank line before its closing tag. A
markdown list flush against a closing JSX tag makes that tag parse as part of
the final list item, which MDX rejects.

@markbackman markbackman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🧹 ✨

@kompfner
kompfner merged commit 4e03ce0 into main Aug 5, 2026
3 checks passed
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.

2 participants