Skip to content

fix: run prettier on full assembled output in cli transform#1969

Open
reggi wants to merge 1 commit into
mainfrom
reggi/fix-transform-prettier
Open

fix: run prettier on full assembled output in cli transform#1969
reggi wants to merge 1 commit into
mainfrom
reggi/fix-transform-prettier

Conversation

@reggi
Copy link
Copy Markdown
Contributor

@reggi reggi commented May 22, 2026

Problem

The cli transform runs prettier on the markdown body, then reassembles the file with frontmatter. The final composed output is never run through prettier as a complete document. This means auto-generated files can fail prettier --check in CI — as seen with npm-stage.mdx.

Fix

Run prettier on the final assembled output (frontmatter + body) instead of just the body. This ensures every generated .mdx file passes prettier --check.

Previously prettier was run on the body alone, then the file was
reassembled with frontmatter. The final output was never formatted
as a complete document, so files could fail prettier --check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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