Skip to content

Use prettier to format code

Lukas Geiger requested to merge prettier into master

Because manual code formatting is so 2016 😜

Prettier is a really popular (opinionated 💯) code formatter, that uses the AST to completely strip all formatting and pretty print it.

It has autoformat plugins on save for almost every editor and integrates well with ESLint in case we need some custom rules that go beyond just code style.

Usually prettier is set up as a pre-commit hook to force people to commit pretty code. Since this may be controversial, I just added a npm script and setup the ESLint config accordingly for now.

This PR is build on top of #1. I will rebase once #1 is merged.

Merge request reports