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
Chore: update to use ES6 classes (refs #7849) #7891
Conversation
@qlaire, thanks for your PR! By analyzing the history of the files in this pull request, we identified @IanVS, @mysticatea and @nzakas to be potential reviewers. |
LGTM |
|
||
RuleFixer.prototype = { | ||
constructor: RuleFixer, | ||
const ruleFixer = { |
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.
We might want to freeze this object so that we are consistent with what we had previously.
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.
One tiny nitpick, but this is looking good. Thanks for contributing!
|
||
constructor: Registry, | ||
/** | ||
* @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations |
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.
Nitpick: Can we get rid of the extra whitespace after @param
?
LGTM |
@gyandeeps @kaicataldo thanks so much for reviewing! I've made the two changes you suggested. |
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.
LGTM. Thanks for contributing!
Leaving this open a little bit longer so that we can get a few more pairs of eyes on this. |
LGTM. Thanks for contributing! |
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ x ] Other, please explain:
What changes did you make? (Give an overview)
Update constructor functions to use ES6 classes. Also, changed one constructor function (rule-fixer.js) to a plain object since it does not have any internal state.
Is there anything you'd like reviewers to focus on?