Conversation
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.
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Description
Installs Prettier and tells the
update-contentandtranslateskills how to run it. A follow-up PR will format the whole project.Part of #866.
Details
prettier3.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..prettierignoreskips generated and frozen files:adaptors/library/,versioned_docs/,static/and similar. Prettier already skips everything in.gitignore..prettierignorealso skipsglossary.ymlandtranslation-rules.yml. People maintain these files, and reformatting them would mark every machine translation as stale.yarn prettier --write <files>. The translate skill formats only thei18n/files it writes. It never reformats the English page, so the hash it records matches the English onmain. English changes go in their own PR.formatorformat:checkscripts inpackage.json. Aformatscript would runprettier --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:checkwould only be useful in CI, and no CI job runs Prettier yet. To format everything, runyarn prettier --write ...prettierrcis unchanged. Changing it would change every translation hash.Next: #875 will run
yarn prettier --write .and nothing else, touching 151 files, mostly inadaptors/*.mdanddocs/.To review: run
yarn installand thenyarn prettier --list-different .. It should list 151 files and none from the ignored folders. This PR changespackage.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!):
You can read more details in our
Responsible AI Policy