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
Refactor to remove some uses of _.get
and _.set
#5327
Conversation
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.
@stephenwade Thank you for making this change! 👏🏼
Could you check my review comments, please?
_.get
and _.set
_.get
and _.set
Hi @ybiquitous, I've implemented your suggested changes. |
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.
@stephenwade Thank you so much! LGTM 👍🏼
disabledRanges: {}, | ||
ruleSeverities: {}, | ||
customMessages: {}, | ||
}; |
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.
[note] I'm a bit concerned about the newly added properties like disabledRanges
, but it seems due to our TypeScript definitions (maybe another issue). 🤔
Anyway, I think no problems going on as-is. 👍🏼
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.
Yes, that was because of the TypeScript definitions. It wouldn't let me just set result.stylelint
to {}
.
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.
Thanks!
Ref #4412.
Most of the code is self-explanatory. I replaced the simpler uses of
_.get
and_.set
with native code.I had to change a couple of
array.forEach
loops to regularfor … of array
loops to maketsc
happy. I also updated the JSDoc types in a couple places for the same reason.