On Thu, Sep 26, 2013 at 12:13 PM, Andrew Sutherland
<
asuth...@asutherland.org> wrote:
> Adding/changing an enforcement mechanism by default like the pre-commit
> seems like something that should have been proposed/discussed on the list
> prior to landing, especially in terms of picking the settings in use. For
> comparison, changes to the Mozilla code style guide are discussed on
> dev-platform prior to making changes to the (non-enforced) wiki.
I really appreciate having the jshint in the tree, as I have been
using it anyway in my editor to check on file saves, and it feels like
a better toolchain option. Thanks for adding it!
However, the .jshintrc rules as currently set do seem to contradict
what I understood to be Mozilla style (maybe I have this wrong
though?). Specifically:
* curly: true: this one mandates braces around single line if/else
bodies. My impression given existing code was that one line, unbraced
bodies were acceptable, even expected, style.
* use strict is true.
For the non-Mozilla code I write, I prefer those settings,
particularly curly: true, but I noticed while doing code changes now
my editor is using the .jshintrc and now I have a bunch of lint errors
because the existing code does not match those settings.
So I would like to see turning those two options off, discussing if we
want a change, then if agreed to change, have a bulk code operation to
update the code, then set the options back on.
If this seems reasonable, I am happy to file the bug to turn off the
settings and do the pull request, while the discussion happens about
any bulk style change.
As it is now, my existing edit/save flow is compromised now that I
have to wade through the new errors. I also do not want to pollute any
pull requests for changes for these rules as it creates more noise for
the reviewer.
James