Skip to content

Add a Prettier plugins input to the Prettier workflows - #232

Merged
elasticdog merged 1 commit into
mainfrom
push-ztxsoyyxupku
Jul 27, 2026
Merged

Add a Prettier plugins input to the Prettier workflows#232
elasticdog merged 1 commit into
mainfrom
push-ztxsoyyxupku

Conversation

@elasticdog

Copy link
Copy Markdown
Member

Prettier loads the plugins named by a project's configuration at startup, before it looks at any file, and resolves them from the checkout root. A repository whose .prettierrc declares a plugin such as prettier-plugin-astro fails every Prettier job with "Cannot find package", regardless of which file types that job formats, because these workflows run Prettier through npx without the plugin present.

Add a prettier_plugins input to check-html.yml, check-markdown.yml, and the CHANGELOG formatting step in the three bump-version workflows. When set, the listed npm packages are installed alongside Prettier following the same pattern as check-css.yml, and the project's own configuration remains the source of truth for which plugins are active. The bump-version steps remove the installed node_modules afterward so it stays out of the release pull request.

Callers that leave the input empty run the same npx command as before.

Prettier loads the plugins named by a project's configuration at
startup, before it looks at any file, and resolves them from the
checkout root. A repository whose .prettierrc declares a plugin such as
prettier-plugin-astro fails every Prettier job with "Cannot find
package", regardless of which file types that job formats, because these
workflows run Prettier through npx without the plugin present.

Add a prettier_plugins input to check-html.yml, check-markdown.yml, and
the CHANGELOG formatting step in the three bump-version workflows. When
set, the listed npm packages are installed alongside Prettier following
the same pattern as check-css.yml, and the project's own configuration
remains the source of truth for which plugins are active. The
bump-version steps remove the installed node_modules afterward so it
stays out of the release pull request.

Callers that leave the input empty run the same npx command as before.
@github-actions github-actions Bot added documentation Improvements or additions to documentation github_actions labels Jul 27, 2026
@elasticdog
elasticdog added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit d38dc8f Jul 27, 2026
7 checks passed
@elasticdog
elasticdog deleted the push-ztxsoyyxupku branch July 27, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant