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
Add selector-not-notation #5975
Conversation
* @param {Node} node | ||
* @returns {boolean} | ||
*/ | ||
const isSimpleSelector = (node) => |
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.
If another rule ever needs it, it will have to be moved to utils.
YAGNI
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.
@Mouvedia Thank you! This is looking great already.
I've suggested some minor nits in the tests and docs, but the rule itself is shaping up really nicely.
1237872
to
93fcf7b
Compare
f911658
to
0c33e0e
Compare
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.
@Mouvedia Thanks! It's looking great, especially the autofix.
I've requested some minor changes.
a577466
to
bbb6284
Compare
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 for making the changes.
LGTM, thank you!
(Pull requests that add rules need a second review, so we'll wait on one of those before merging, as the second pair of eyes usually catches something the first pair missed).
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.
[suggest] What if making isNot()
an assert function? Type-casting via @type
will be unnecessary.
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.
[suggest] .shift()
can return undefined
, so TS compiler complains. What if checking .shift()
return value by assert()
and removing @ts-ignore
?
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.
@Mouvedia Thank you. LGTM 👍🏼
@ybiquitous Thanks for the 2nd review. I'm glad you reviewed as your type checking suggestions are always fantastic! |
#5974
read #5974 (comment)