> I think it is important as part of the commit process that we
need to be making sure that we are only committing changes that we made.
Exactly!! It makes it impossible to review a PR when the committer or the IDE makes
whitespace or other insignificant changes to unrelated lines because the diff is
impossible to read.
Totally agree that having lots of changes in a PR that are just whitespace are not good,
but if we all use the same style settings this will not happen because there will be
nothing to change as it's already checked-in in the 'right' style.
It would be nice if we can find a tool that will suffice and have a 'aerogear' JS
format that we all use. We could even opt that the build will fail if the checked in
source doesn't conform the style that we agreed!
So far the tools mentioned are:
https://github.com/mdevils/node-jscs -- doesn't seem to format code but does extra
jshint checks
https://github.com/millermedeiros/esformatter -- nice but not done yet, but already
supports a ton of settings… << has my vote
https://npmjs.org/package/grunt-prettify -- limited control over whitespace
eclipse formatter -- very java based, lot's of control where whitespace is placed, but
very java based :)
Can we vote on what tool we want, and set it up with our preferences?
Cheers,
Erik Jan