Skip to content

Fix markdown prettier formatting and guard dependency-update PRs - #1709

Merged
oschwald merged 2 commits into
mainfrom
fix-prettier-markdown-formatting
Jul 21, 2026
Merged

Fix markdown prettier formatting and guard dependency-update PRs#1709
oschwald merged 2 commits into
mainfrom
fix-prettier-markdown-formatting

Conversation

@claude

@claude claude Bot commented Jul 21, 2026

Copy link
Copy Markdown

Requested by Greg Oschwald · Slack thread

Summary

The Precious / Code Formatting check is currently red on main, and this PR makes it green while closing the CI gap that let the failure land.

Before/After: Before this PR, precious lint --all (the check that runs on push-to-main) fails on two markdown files. After this PR, the formatting check passes, and dependency-update PRs will surface whole-repo reformats before merge instead of only after.

Root cause

PR #1706 bumped prettier from 3.8.4 to 3.9.5 (a Dependabot devDependency group bump). Prettier 3.9.5 changed its markdown output (blank lines are now inserted around HTML comments inside lists), which reformats two existing files.

That PR's own CI passed because the code-formatting job linted only the files changed in the PR on pull_request events (--git-diff-from origin/$BASE_REF), while push-to-main linted everything (--all). Since #1706 changed only package.json and pnpm-lock.yaml, no markdown was linted on the PR, and the failure surfaced only on the post-merge push-to-main run.

Changes

  • Commit 1 — reformat the two files. Reran prettier 3.9.5 over the markdown so it matches the new formatter output:
    • content/minfraud/release-notes/2015.md
    • content/minfraud/whats-new-in-minfraud-score-and-minfraud-insights.md
  • Commit 2 — always lint all files in CI. .github/workflows/precious.yml now runs precious lint --all on both pull_request and push events, dropping the changed-files-only path for PRs. This removes the split that hid the failure: a PR that reformats files outside its own diff (for example, a dependency bump that changes a formatter version) is now caught pre-merge. The repo is small, so linting everything on every PR is cheap. The now-unused BASE_REF env, "Fetch base ref" step, and "Select files" step were removed.

claude added 2 commits July 21, 2026 20:38
The Precious job only linted files changed in a PR (--git-diff-from),
so reformats caused by the PR itself -- such as a dependency bump that
changes a formatter's version -- went unnoticed until the post-merge
push-to-main run linted everything. The repo is small, so always lint
every file on both pull_request and push events.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying dev-site with  Cloudflare Pages  Cloudflare Pages

Latest commit: 19c5e7c
Status: ✅  Deploy successful!
Preview URL: https://f77d3b20.dev-site-4ua.pages.dev
Branch Preview URL: https://fix-prettier-markdown-format.dev-site-4ua.pages.dev

View logs

@claude
claude Bot marked this pull request as ready for review July 21, 2026 20:49
@oschwald
oschwald merged commit 80618de into main Jul 21, 2026
10 checks passed
@oschwald
oschwald deleted the fix-prettier-markdown-formatting branch July 21, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants