Skip to content

Run Prettier on the whole project - #870

Closed
lmac-1 wants to merge 5 commits into
prettierfrom
prettier-format-docs
Closed

lmac-1 wants to merge 5 commits into
prettierfrom
prettier-format-docs

Conversation

@lmac-1

@lmac-1 lmac-1 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part 2 of #866. Runs yarn format over the whole project. Based on #869: merge that first, then retarget this to main.

Review by commit

  1. Add blank line after two :::tip openers. Without the blank line, Prettier pulls the text onto the :::tip line and Docusaurus shows it as the admonition title (docs/design/api-discovery.md, docs/migration/migration-steps.md).

  2. Add missing comma in Salesforce job example. adaptors/library/jobs/workWithIdAfterInsertOrUpsert.js wasn't valid JS, so Prettier couldn't parse it.

  3. Run Prettier on the whole project. Formatting only, 153 files, straight from yarn format. Skim it.

  4. Ignore the Prettier reformat in git blame. Adds .git-blame-ignore-revs with commit 3's SHA. GitHub's blame view reads it automatically. Locally, run git config blame.ignoreRevsFile .git-blame-ignore-revs.

  5. Put two admonition closers back on their own line. The reformat pulled the closing ::: in security-for-devs.md onto the paragraph above, so it showed as text. collaboration.md was already broken the same way on main.

Commit 3's SHA only stays valid if this is merged with a merge commit or rebase, not squash. After a squash, update .git-blame-ignore-revs with the new SHA.

Checks

  • yarn format:check passes.
  • No new :::tip Some text lines in the diff.
  • JSX in adaptors/intro.mdx was formatted as MDX and still renders.
  • yarn generate-library && yarn generate-adaptors && yarn build passes. The broken-anchor warnings were there before; the only heading changes are trailing spaces.
  • Rendered-text comparison: built the site before and after the reformat and compared the visible text of all ~850 pages. 14 differed:
    • 11 are JS code blocks and job-library examples that Prettier reformatted (single quotes, trailing commas, state => instead of (state) =>, line wrapping). Two old examples use the comma style upsert(...), each(...); Prettier wraps them in parens, and they mean the same thing.
    • /adaptors: the version lists differ because GitHub rate-limited generate-adaptors differently in each build. Not from Prettier.
    • security-for-devs: a stray ::: showed as text. Fixed in commit 5.

🤖 Generated with Claude Code

Without it Prettier pulls the text onto the opening line and
Docusaurus shows it as the admonition title.
Formatting only, produced by yarn format. No content changes.
security-for-devs.md lost the blank line before its closing ::: in the
reformat, so the ::: showed as text. collaboration.md was already
broken the same way on main.
@lmac-1
lmac-1 marked this pull request as draft September 25, 2026 12:59
@lmac-1 lmac-1 mentioned this pull request Sep 25, 2026
3 tasks
@lmac-1

lmac-1 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

Replaced by #875, which is rebuilt on the current #869: it uses yarn prettier --write . instead of the removed yarn format script, and skips adaptors/library/, which is now in .prettierignore.

@lmac-1 lmac-1 closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant