ci: add prettier and a pull-request format workflow - #33
Merged
Conversation
Prettier at printWidth 80 with proseWrap always, so markdown prose is wrapped consistently instead of by hand. The workflow commits with inline git rather than a third-party action, keeping it on official actions/* while it holds contents: write. Fork PRs are skipped because their token is read-only. Documents style: in the commit-type list, since that is the type the workflow's own formatting commits use.
One-time reflow bringing every tracked file under the new config. No content changes. Three lines stay over 80 columns because each is a single inline-code span prettier cannot break.
The bug-report template's Expected and Actual lines were one paragraph, so proseWrap joined them into a single line — every report the skill rendered would have run the two labels together. The commit skill's heredoc example was already latently malformed: the fence sat five spaces deep under a list item while the heredoc body started at column 0, which closes the item and leaves the fence unclosed. Reflowing it exposed that. The fence now sits at the bullet's content column, so the list stays intact and Report is step 6 again rather than restarting at 1. The heredoc itself was wrong independent of the markdown: EOF shared a line with the closing paren, which git never accepts as a terminator.
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.
Summary
Adds Prettier to the marketplace repo and wires it into CI, then formats the
existing tree.
.prettierrcsetsprintWidth: 80andproseWrap: "always", somarkdown prose is hard-wrapped rather than left as long single lines.
.prettierignoreexcludesnode_modules/,package-lock.json, and allCHANGELOG.mdfiles (release-it owns those).npm run format/npm run format:checkin a new rootpackage.json, which also picks up the release-it dependencies that werepreviously implicit.
.github/workflows/format.ymlruns onpull_request. Same-repoPRs get formatted and the result committed back to the branch; fork PRs get a
read-only
format:checkinstead, since their token can't push.145969aapplies Prettier across the repo (37 files).Reviewer hints:
.github/workflows/format.yml,package.json,.prettierrc, and.prettierignore.e4c4b15repairs two spots where the reflow changed meaning rather than justshape: an indented
<<'EOF'heredoc terminator in thecommitskill (anindented delimiter doesn't terminate a non-
<<-heredoc, so a verbatim copy ofthat example would have failed), and a paragraph split in the
bug-reportskill's output template.
frontmatter parses to identical values before and after, no prose words changed,
no ordered lists renumbered, no list nesting re-parented, and fenced-block
contents are unchanged after de-indentation.
Known limitation, accepted for now: the auto-format commit is pushed with
secrets.GITHUB_TOKEN, and GitHub does not create workflow runs for pushes madewith that token. So when the job pushes a formatting commit, the resulting head
SHA gets no check runs. The content itself is fine (it's Prettier's own output),
but if
Formatis ever made a required status check, an auto-formatted PR willhang on "Waiting for status to be reported" — and any future workflow on
pull_requestwon't run on that SHA either. Fixing it means pushing with a PATor app token. Latent today; worth revisiting before adding required checks.
Breaking changes
None. No skill, command, or agent behavior changes. Plugin content is reflowed
only — the two semantic drifts the reflow introduced are repaired in
e4c4b15.Note that merging this bumps a patch version of every plugin whose files were
reformatted (
brainpower,conventional-branches,development-workflow,git-flow,intelephense,product-discovery,ticket-branches), since each.release-it.jsonscopes commits to its own directory and the angular presetbumps patch for any commit in that path.
Architecture impact
proseWrap: "always"at 80 columns is now the binding convention for allmarkdown in the repo, including every
SKILL.md. Future skills should beauthored wrapped, and any generated or pasted markdown will be rewrapped on the
next PR.
Skill markdown is read by the model as raw text, so reflow is not purely
cosmetic here the way it is in most repos — anything whose exact byte layout
matters (heredocs, code meant to be emitted verbatim, templates where line
breaks carry meaning) needs a
<!-- prettier-ignore -->guard.e4c4b15is thefirst instance of that class; it won't be the last.
Related issues
SIDE-200