Setup Prettier
11 March 2022 (Updated 10 July 2022)
Install package:
npm i -D prettier
Create .prettierrc
:
touch .prettierrc
{
"semi": false,
"singleQuote": true
}
(Optional) Add NPM scripts:
{
"format:check": "prettier --check src/",
"format:fix": "prettier --write src/"
}
Run format script:
npm run format:fix
Tagged:
JavaScript tooling
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment