-
-
Notifications
You must be signed in to change notification settings - Fork 942
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
Fix false positives for no-descending-specificity and scss syntax #3420
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.
@YozhikM Thanks. Looking good. I've made two minor requests around conventions.
|
||
accept: [ | ||
{ | ||
code: ".foo { &--a, &--a#{&}--b { div { padding: 10px; } } }" |
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.
Use the minimum amount of code possible to communicate the pattern e.g. if the rule targets selectors then use an empty rule e.g. {}.
Can we use the following please?:
.foo { &--a, &--a#{&}--b { div {} } }
checkSelector(s, rule, index, comparisonContext) | ||
); | ||
parseSelector(resolvedSelector, result, rule, s => { | ||
if (isStandardSyntaxSelector(resolvedSelector)) { |
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.
The convention, in this file and others, is to return early when using the isStandard*
utils. We should probably follow it here too:
parseSelector(resolvedSelector, result, rule, s => {
if (isStandardSyntaxSelector(resolvedSelector)) {
return;
}
checkSelector(s, rule, index, comparisonContext);
}
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
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!
|
Closes #3417
No.