Build: Add config files for jscs and jshint, run jshint with npm-test #37
Conversation
@@ -17,7 +17,7 @@ | |||
], | |||
"scripts": { | |||
"start": "./bin/server.js", | |||
"test": "nodeunit" | |||
"test": "jshint bin/ lib/ test/ *.js && nodeunit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt we add jscs here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned this in the commit message (copied into the PR description):
There's currently lots of whitespace issues, those need to be addressed separately, then jscs can be regularly checked as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I could add "requireSpacesInsideParentheses": null
to the config to turn of that one rule and fix the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the exceptions/
directory also be linted? I know it's just some arrays but there are still simple mistakes we can make there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that, there's just two issues that I can fix quickly enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its just white space just run jscs with fix and do it as part of this its a small enough repo.
Updated, now running both jshint and jscs as part of npm-test. |
Fixes spacing and some other lint issues. Closes jquery#37
Updated again, now jshint and jscs validate all js files in the repo (both tools ignore node_modules, it seems), whitespace issues are fixed as well. |
Looks good to me. 👍 |
Fixes 3 'lint' issues: Remove unused var, replace semicolon with comma, define Promise (even though Promise is 'now' native in nodejs).
There's currently lots of whitespace issues, those need to be addressed separately, then jscs can be regularly checked as well.