From 8fd98f9a7bb25c5a044e7df0be09f33f8333a8e9 Mon Sep 17 00:00:00 2001 From: reggi Date: Fri, 22 May 2026 16:17:55 -0400 Subject: [PATCH] fix: run prettier on full assembled output in cli transform 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> --- cli/lib/transform.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/lib/transform.js b/cli/lib/transform.js index 69edb830ca3..346aa3c2325 100644 --- a/cli/lib/transform.js +++ b/cli/lib/transform.js @@ -128,10 +128,11 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => { // then do any transformer specific replacements body = format(body) - // prettier again now that we've altered the contents - body = prettierFormat(body) + // then do any transformer specific replacements + body = format(body) - return `---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}` + // prettier on the final assembled output so the committed file passes prettier --check + return prettierFormat(`---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}`) } // copied from minipass-collect. collects all chunks into a single