Problem Statement
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.
Example
See bryant-finney/demo-reviewdog-action-prettier#1:
Problem Statement
prettier supports many languages other than JavaScript (YAML, Markdown, JSON, HTML, etc.). Integrations with tools such as
pre-commitorvscodemake it convenient to useprettierin repositories that don't depend onnode.jsor define apackage.json.However, this action fails if
package.jsondoes not exist in the repository.Example
See bryant-finney/demo-reviewdog-action-prettier#1:
🌈 Prettierworkflow fails to add comments to the PR: