-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Chore: Enable object-shorthand rule (refs #6407) #6812
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
Conversation
initializeConfig: /* istanbul ignore next */ function(callback) { | ||
getConfigForStyleGuide, | ||
processAnswers, | ||
/* istanbul ignore next */initializeConfig(callback) { |
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.
Istanbul comment fix
ef4b048
to
e6a6048
Compare
@@ -65,7 +65,7 @@ function importPlugin(pluginRules, pluginName) { | |||
* @param {string} ruleId Rule id (file name). | |||
* @returns {Function} Rule handler. | |||
*/ | |||
function get(ruleId) { | |||
function getHandler(ruleId) { |
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.
Function renamed to avoid Node v4.x.x bug that treats shorthand properties named get
as syntax errors.
e6a6048
to
5dfb581
Compare
LGTM |
LGTM, thanks for contributing! (Got a mocha timeout in the CLIEngine tests when running locally, but I can't imagine that would have anything to do with your changes.) |
@kaicataldo looks like a rebase is needed. |
d63eb5a
to
78e0a19
Compare
78e0a19
to
473c21e
Compare
LGTM |
Rebased |
@kaicataldo Sorry but one more time plz. 😄 |
Maybe we should try splitting this up into batches? |
@nzakas Probably a good idea - I'll do that tonight. |
I'm not actually going to be able to get to this tonight, unfortunately. Will get to it ASAP. |
What issue does this pull request address?
#6407
What changes did you make? (Give an overview)
Enabled
object-shorthand
rule and ran auto-fix on codebase.Command used to make changes:
bin/eslint.js --no-eslintrc --rule 'object-shorthand: 2' --env 'es6' --fix lib bin conf packages tests Makefile.js
Is there anything you'd like reviewers to focus on?
Would love a few more pairs of eyes to scan all the changes to make sure they look good!
Pretty straightforward, aside from two things:
/* istanbul ignore next */
comment to work for the shorthand notation (see this issue in the Istanbul repo for more info)get
as a shorthand property name. We actually saw a bug report for this very situation and decided against fixing it, so my solution was to just rename the function. Will comment the specific location in the code.