columnify
columnify copied to clipboard
Add eslint
WIP
Mainly, we should wait until eslint (and grunt-eslint) will formally support es6. http://eslint.org/blog/2014/11/es6-jsx-support/
In the meanwhile, here is a test of the current state: https://github.com/danyshaanan/columnify/tree/eslint
By setting eslint with:
https://github.com/danyshaanan/columnify/blob/873cc81ae66ad4f432511544c0fc95bcb395b8f4/.eslintrc
and running it on width.js, utils.js, and the generated columnify.js file, gives this error count:
$ grunt | grep error | grep -oe ' [a-z-]*$' | sort | uniq -c | sort
1 consistent-return
1 eqeqeq
1 guard-for-in
1 no-extra-strict
1 no-return-assign
1 space-infix-ops
1 strict
1 wrap-iife
2 block-scoped-var
2 no-loop-func
3 no-unused-vars
3 space-after-keywords
5 no-eq-null
5 no-shadow
21 curly
23 quotes
quotes, which is set to 'single', has a similar number when set to "double".
See meaning of errors here: http://eslint.org/docs/rules/
Adding 'test/*/.js' to eslint results in this error count:
1 consistent-return
1 eqeqeq
1 guard-for-in
1 no-extra-strict
1 no-return-assign
1 space-infix-ops
1 wrap-iife
2 block-scoped-var
2 no-loop-func
3 space-after-keywords
5 no-eq-null
9 no-shadow
9 no-unused-vars
22 curly
33 no-comma-dangle
64 strict
79 quotes