saguijs / sagui

:monkey: Front-end tooling in a single dependency
http://sagui.js.org/
MIT License
669 stars 32 forks source link

Prettier support 💄 #341

Closed pirelenito closed 7 years ago

pirelenito commented 7 years ago

Changes the linter configuration to support Prettier and adds another npm script to format the code.

Closes #336

pirelenito commented 7 years ago

I've just adapted the ESLint configuration to support Prettier. Next step is attempting to run the formater.

I've also found solutions that does the formatting automatically, but I'm not sure that is a good idea: https://github.com/danielterwiel/prettier-eslint-webpack-plugin/blob/master/package.json

It feels to me that it might make sense to have a prettier-eslint-loader that works in the same way as the eslint-loader but checks for any formatting issue... letting the user know how to fix it.

pirelenito commented 7 years ago

I'll merge the linting rules, and we can work in the formatting as a separated PR.