tuxsudo / react-starter

A project starter for universalmorphic React/Redux apps
MIT License
14 stars 10 forks source link

Integrate Prettier? #66

Open eatrocks opened 7 years ago

eatrocks commented 7 years ago

I haven't tried it yet. I like the idea of parsing the JavaScript into AST so you end up with consistent formatting that addresses max line length. I saw a pre commit hook that processes changed files but I disagree with this approach because it makes changes hard to see. I'd rather the whole repo be prettier at once and not contain other changes

tuxsudo commented 7 years ago

I think whether you change all you codebase at once, or over time via a pre-commit hook, we'll still want the pre-commit hook. I've integrated it in an project I'm working on and it's REALLY nice to not have to worry varying formatting styles between devs.

Jarvis1010 commented 7 years ago

another option is to use the VS code extension for prettier that will auto format on save.

Jarvis1010 commented 7 years ago

Probably should consider disabling the "collapse elements" feature in the vs code extension but keep it in the potential pre-commit hook