My Prettier style guide
-
Install the config by running:
npm install @redguy12/prettier-config prettier --save-dev --save-exact
-
Add the following to your
package.json
:"prettier": "@redguy12/prettier-config", "scripts": { "format": "prettier --write \"**\" --ignore-unknown --cache" }
-
Create a
.prettierignore
file with the following content:node_modules .eslintcache dist/**
-
To format your code, simply run
npm run format
Congrats! You've successfully integrated ESLint into your project with @redguy12/prettier-config
!
See also @redguy12/eslint-config
if you want even more consistent stylization and more.