prettier supports many languages other than JavaScript (YAML, Markdown, JSON, HTML, etc.). Integrations with tools such as pre-commit or vscode make it convenient to use prettier in repositories that don't depend on node.js or define a package.json.
However, this action fails if package.json does not exist in the repository.
Problem Statement
prettier supports many languages other than JavaScript (YAML, Markdown, JSON, HTML, etc.). Integrations with tools such as
pre-commit
orvscode
make it convenient to useprettier
in repositories that don't depend onnode.js
or define apackage.json
.However, this action fails if
package.json
does not exist in the repository.Example
See https://github.com/bryant-finney/demo-reviewdog-action-prettier/pull/1:
🌈 Prettier
workflow fails to add comments to the PR: