-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Removed the brace-style ESLint exclusion #1434
Conversation
modules/rhythmoneBidAdapter.js
Outdated
{ callback(200, 'success', response.responseText); } | ||
else | ||
{ callback(-1, 'http error ' + response.status, response.responseText); } | ||
if (response.status === 200) { callback(200, 'success', response.responseText); } else { callback(-1, 'http error ' + response.status, response.responseText); } |
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 harder to read than before. It doesn't look like standardjs
implements a max-len
but I think we should consider it. I guess it doesn't do that because it can't --fix
that automatically?
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'm not sure why standardjs doesn't define one... but I agree, this is harder to read this way. For now I'll split it up manually.
We should consider max-len
in the future. In my experience that rule ends up being ~80% good, 20% bad. It prevents code like this, which is great, but it can be a negative if you want to write long error messages or string constants.
I'd still be in favor of it though. You can always disable the linting rules for your line, if you have a really good case for it.
* Fixed the curly brace styles. * Merged from master and fixed the conflicts. * Merged from master, and re-fixed the style issues. * Improved the style. * Fixed style issue from master.
* Fixed the curly brace styles. * Merged from master and fixed the conflicts. * Merged from master, and re-fixed the style issues. * Improved the style. * Fixed style issue from master.
* Fixed the curly brace styles. * Merged from master and fixed the conflicts. * Merged from master, and re-fixed the style issues. * Improved the style. * Fixed style issue from master.
Type of change
Code style update (formatting, local variables)
Description of change
Fixing one of the linter exceptions for #1206.
Everything was done with
lint --fix
except for the following three spots, which I fixed manually: