Closed janpieper closed 10 years ago
-1 on trailing whitespace (why would we want that?)
indent: does this use tabs or spaces?
does jshint allow automatic code formatting?
will we run jshint as part of the test suite on travis?
On 24.10.2013, at 08:46, Felix Geisendörfer notifications@github.com wrote:
-1 on trailing whitespace (why would we want that?)
They are disallowed (setting the trailing option to true enforces that), all correct. Nobody wants trailing whitespaces.
indent: does this use tabs or spaces?
It's using the tab width, so spaces. By default it doesn't allow mixing spaces and tabs.
does jshint allow automatic code formatting?
Nope, that would be part of a different tool. I know your love for go-fmt ;-)
will we run jshint as part of the test suite on travis?
I'd suggest doing that once the .jshintrc is ready
Alright, LGTM then!
I'm interested in how you hook that into travis, would love to get that on all my js projects, automatic lint checking of all pull requests ftw.
Merged. Thank you @janpieper :)
Travis + JSHint in a separate PR, I'll take care of that right now.
Good news, npm test
already recognizes the .jshintrc and runs jshint automagically for us. Therefore no extra step needed for Travis, it already works!
On a side note: I think we should add some more options to jshint, totally overlooked that in this PR. Will open up a PR with more options to discuss things.
Problems
#80 Drop unused variables #81 Drop duplicate test lib/Client.js#L22 vs. lib/Client.js#L59-L62 (found while making the code jshint compliant)
JSHint Configuration
node
Configured value: true
laxbreak
Configured value: true
This allows us to use the ternary operator with multiple lines:
See lib/navdata/parseNavdata.js#L60-L62.
indent
Configured value: 2
curly
Configured value: true
trailing
Configured value: true