-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #1608: integrate eslint into testing process #1616
Conversation
Oh joy! 😩 Would something like node-jscs be useful or an alternative? |
}, | ||
"scripts": { | ||
"test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true", | ||
"test": "node_modules/.bin/eslint underscore.js && phantomjs test/vendor/runner.js test/index.html?noglobals=true", |
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.
No need for node_modules/.bin/
here since npm test
adds that directory to the path.
@jdalton: I don't see how having comments for exceptions is bad. There will be 7 in total, and they make sense. We have one use of the @braddunbar and @davidchambers: I addressed your comments. Thanks for the review. |
Ya, it's just not my thing. I don't like magic comments (for builds, linting, etc.). I don't get value from that. I'm also not a fan of causing builds to error if coding style is not aligned because I don't want to burden those contributing with minor nits and would rather accept a PR and push a followup cleanup commit than get bogged down in the nits (reduce barriers to contributions where possible). My biggest concern, accidental globals, is already covered with the existing global checks that QUnit provides. |
Comments for exceptions leaves a bad taste in my mouth as well. If it's not a rule we intend to follow, it seems that we should just turn it off or leave the warnings. Otherwise, I think the changes here are fine. |
Agreed fully with @jdalton here. Underscore has an active corps of maintainers who have been more than capable of policing the project's style. Little things like accidental globals might sneak through every once in a while, but I'm more interested in finding out why Travis didn't catch it and warn against a merge. |
LGTM |
It actually did fail the travis-ci job and failure was visible in the PR. See #1602. |
Nah email was way too obnoxious for me (and I can only imagine what it |
And yet somehow I manage and things like accidental globals don't go unnoticed in my projects.
They did there job. It was merged even with the fail. Adding more unnecessary process via this PR doesn't solve that. |
}, | ||
"scripts": { | ||
"test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true", | ||
"test": "eslint underscore.js && phantomjs test/vendor/runner.js test/index.html?noglobals=true", |
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 these be reversed? With @jdalton's comment on not burdening contributors, I'd be much more interested in a travis build passing tests and failing the linter instead of it failing the linter and never making it to the tests.
How about normalizing the |
By the way, as more incentive to merge this, I just used eslint as configured here to discover #1641. Working on rebasing this off |
Unused var detection is handy. |
This PR is ready for review again. |
fixes #1608: integrate eslint into testing process
This generates the following warnings, but all errors (and tons of other warnings) have been eliminated.
The next version of eslint (current master) will allow comments for line-based exceptions so we can mark all of these as expected.
Fixes #1608.