Top Tags

Install Prettier locally

A guide on how to install Prettier locally in your project.

Install Prettier Locally

bash
1pnpm add --save-dev --save-exact prettier
2node --eval "fs.writeFileSync('.prettierrc','{}\n')"
3node --eval "fs.writeFileSync('.prettierignore','# Ignore artifacts:\nbuild\ncoverage\n')"

Make all files formatted

bash
1pnpm exec prettier . --write

Check all files are formatted

bash
1pnpm exec prettier . --check