- Install prettier
- Make a
.prettierignore
file, and add directories you'd like prettier to not format, for example:**/node_modules
- Run
prettier --write "**/*.{ts,js,css,html,insertAnyFilesExtensionHere}"
**Don't forget the quotes.
You could also add this to your projects package.json
under
scripts to simply run npm run prettier to format your code before committing it:
` { ...