Skip to content

Prettier

Vojtech Mašek edited this page May 9, 2020 · 5 revisions

1.

Install Prettier npm i --save-dev prettier pretty-quick

2.

Add our custom config

3.

Add .prettierignore file and don't forget to add all generated files/folders.

4.

In package.json scripts you need to enable linting SCSS instead of CSS.

You may add a script to package.json scripts that should look like this "prettier": "pretty-quick"

5.

Add pre-commit hook for prettier to run before each commit The setup here Angular GIT hooks

6.

Enable Prettier on save in your IDE. Webstorm: use this glob {**/*,*}.{js,ts,jsx,tsx,css,scss,html,yaml,yml,json,md}

Clone this wiki locally