Skip to content

Add Prettier - #869

Open
lmac-1 wants to merge 7 commits into
mainfrom
prettier
Open

lmac-1 wants to merge 7 commits into
mainfrom
prettier

Conversation

@lmac-1

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

Copy link
Copy Markdown
Collaborator

Short Description

Installs Prettier and tells the update-content and translate skills how to run it. A follow-up PR will format the whole project.

Part of #866.

Details

  • Adds prettier 3.9.9 as a dev dependency, pinned exactly. A new version can format files differently, which would change the English hashes the translate skill records.
  • .prettierignore skips generated and frozen files: adaptors/library/, versioned_docs/, static/ and similar. Prettier already skips everything in .gitignore.
  • .prettierignore also skips glossary.yml and translation-rules.yml. People maintain these files, and reformatting them would mark every machine translation as stale.
  • The skills now say yarn prettier --write <files>. The translate skill formats only the i18n/ files it writes. It never reformats the English page, so the hash it records matches the English on main. English changes go in their own PR.
  • There are no format or format:check scripts in package.json. A format script would run prettier --write ., and yarn adds any file names after the ., so it would still format the whole repo. The skills need to format only the files they changed. format:check would only be useful in CI, and no CI job runs Prettier yet. To format everything, run yarn prettier --write ..
  • .prettierrc is unchanged. Changing it would change every translation hash.

Next: #875 will run yarn prettier --write . and nothing else, touching 151 files, mostly in adaptors/*.md and docs/.

To review: run yarn install and then yarn prettier --list-different .. It should list 151 files and none from the ignored folders. This PR changes package.json, so a person needs to review it.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Installs prettier as a dev dependency, adds yarn format and
yarn format:check, and ignores generated and frozen files. Skills
now name the exact command to run.
Base automatically changed from claude/docs-agent-skills-0e700j to main September 25, 2026 09:47
@lmac-1
lmac-1 marked this pull request as draft September 25, 2026 13:00
Stop ignoring i18n/ so translations are formatted, as in #848. Ignore
all of adaptors/library/ and generate-library/master.temp.json. Drop
entries already covered by .gitignore. Format the translate skill.
# Conflicts:
#	yarn.lock
Hash the English page as it is on main so translate never edits docs/.
Keep glossary.yml and translation-rules.yml out of Prettier so a reformat
commit can't mark every machine translation stale.
@lmac-1 lmac-1 changed the title Add Prettier with format scripts Add Prettier Sep 25, 2026
@lmac-1 lmac-1 mentioned this pull request Sep 25, 2026
3 tasks
@lmac-1
lmac-1 marked this pull request as ready for review September 25, 2026 14:51
@lmac-1
lmac-1 requested a review from josephjclark September 25, 2026 15:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant