Skip to content

ci: add prettier and a pull-request format workflow - #33

Merged
ben-everly merged 3 commits into
mainfrom
SIDE-200/prettier-formatting
Aug 22, 2026
Merged

ci: add prettier and a pull-request format workflow#33
ben-everly merged 3 commits into
mainfrom
SIDE-200/prettier-formatting

Conversation

@ben-everly

Copy link
Copy Markdown
Owner

Summary

Adds Prettier to the marketplace repo and wires it into CI, then formats the
existing tree.

  • Config.prettierrc sets printWidth: 80 and proseWrap: "always", so
    markdown prose is hard-wrapped rather than left as long single lines.
    .prettierignore excludes node_modules/, package-lock.json, and all
    CHANGELOG.md files (release-it owns those).
  • Scriptsnpm run format / npm run format:check in a new root
    package.json, which also picks up the release-it dependencies that were
    previously implicit.
  • Workflow.github/workflows/format.yml runs on pull_request. Same-repo
    PRs get formatted and the result committed back to the branch; fork PRs get a
    read-only format:check instead, since their token can't push.
  • Formatting pass145969a applies Prettier across the repo (37 files).

Reviewer hints:

  • The bulk of the diff is mechanical reflow. The parts worth actual attention are
    .github/workflows/format.yml, package.json, .prettierrc, and
    .prettierignore.
  • e4c4b15 repairs two spots where the reflow changed meaning rather than just
    shape: an indented <<'EOF' heredoc terminator in the commit skill (an
    indented delimiter doesn't terminate a non-<<- heredoc, so a verbatim copy of
    that example would have failed), and a paragraph split in the bug-report
    skill's output template.
  • Verified the rest of the reflow is semantically inert: every changed file's YAML
    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 made
with 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 Format is ever made a required status check, an auto-formatted PR will
hang on "Waiting for status to be reported" — and any future workflow on
pull_request won't run on that SHA either. Fixing it means pushing with a PAT
or 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.json scopes commits to its own directory and the angular preset
bumps patch for any commit in that path.

Architecture impact

proseWrap: "always" at 80 columns is now the binding convention for all
markdown in the repo, including every SKILL.md. Future skills should be
authored 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. e4c4b15 is the
first instance of that class; it won't be the last.

Related issues

SIDE-200

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.
@ben-everly
ben-everly merged commit c142296 into main Aug 22, 2026
1 check passed
@ben-everly
ben-everly deleted the SIDE-200/prettier-formatting branch August 22, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant