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

Merged
merged 2 commits into from Jun 23, 2018

Conversation

3 participants
@YozhikM
Contributor

YozhikM commented Jun 23, 2018

Which issue, if any, is this issue related to?

Closes #3417

Is there anything in the PR that needs further explanation?

No.

@jeddy3

@YozhikM Thanks. Looking good. I've made two minor requests around conventions.

accept: [
{
code: ".foo { &--a, &--a#{&}--b { div { padding: 10px; } } }"

This comment has been minimized.

@jeddy3

jeddy3 Jun 23, 2018

Member

As per the conventions:

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)) {

This comment has been minimized.

@jeddy3

jeddy3 Jun 23, 2018

Member

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);
}
@jeddy3

jeddy3 approved these changes Jun 23, 2018

LGTM

@hudochenkov

LGTM!

@hudochenkov hudochenkov merged commit 68784b2 into stylelint:master Jun 23, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 95.999%
Details
@hudochenkov

This comment has been minimized.

Member

hudochenkov commented Jun 23, 2018

  • Fixed: no-descending-specificity false positives for #{&} (#3420).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment