-
Notifications
You must be signed in to change notification settings - Fork 569
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
Eslint #385
Eslint #385
Conversation
- change var to const in gulpfile - indentation fix
- Add dependencies - Add root eslintrc - Add gulp lint task
this.verify(req, true, function(err, success) { | ||
if (!success) { | ||
this.verify(req, true, function (err, success) { | ||
if (err) { |
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.
ESLint requires us to make use of err
when handling the error callback. Should I make an exception to the rule here, or is the way I handle it currently is fine? It passes the test now.
To note: - check err instead of !success in lib/server.js:321 - Change while loop with assignment to for loop
var path = (options.path || '/engine.io').replace(/\/$/, ''); | ||
|
||
var destroyUpgrade = (options.destroyUpgrade !== undefined) ? options.destroyUpgrade : true; | ||
var destroyUpgradeTimeout = options.destroyUpgradeTimeout || 1000; |
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.
This is the diff comment that requires attention
This variable destroyUpgradeTimeout
is not actually used, but it seems as if it should be used, looking at line 450.
@digawp how about using something like https://github.com/Flet/semistandard? Won't it be easier to maintain? |
Thanks a lot for the hard work, btw! |
Merged as 7cbdd5e. Thanks a lot! |
Brief:
gulp lint
)Important changes/refactoring due to ESLint will be annotated on the diff.
There is a lint error I purposely left out because I would like to check with the core team regarding that. I will comment on the diff itself