Skip to main content

Prettier check

Set up workflow to run Prettier check on your code for every Pull Request.

Learn more about Prettier: prettier.io

Usage

npx setup-ci --preset --prettier

Detailed behavior

Below you can find detailed information about what the script does with your project when generating Prettier check workflow.

Installed dependencies

  • prettier (dev)

Modified and created files

FileChanges
.github/workflows/prettier.ymlContains the CI workflow
package.json
  • Missing dependencies are added
  • New script: prettier:check: prettier --check "**/*.{ts,tsx,js,jsx,json,css,scss,md}"
  • New script: prettier:write: prettier --write "**/*.{ts,tsx,js,jsx,json,css,scss,md}"
.prettierrcCreated if no Prettier configuration was detected.

Workflow details

The following diagram represents the flow of the Prettier check CI workflow:

Known issues and limitations

  • The .prettierrc configuration file generated by SCI might not be well tailored to your project. You will have to adjust it manually if needed.