Skip to content
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: no-duplicate-selectors false positives for SCSS/Less nested interpolations #6118

Merged
merged 3 commits into from
May 26, 2022
Merged

fix: no-duplicate-selectors false positives for SCSS/Less nested interpolations #6118

merged 3 commits into from
May 26, 2022

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented May 25, 2022

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

Closes #6110#issuecomment-1137211409

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

@JounQin JounQin changed the title fix: check isStandardSyntaxSelector after nested selector resolved fix: keep non-standard selector as-is May 25, 2022
@JounQin
Copy link
Member Author

JounQin commented May 25, 2022

@ybiquitous Ready for review now.

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JounQin Thank you! This fix looks good to me 👍🏼

Also, what about refactoring normalize() like this?

function normalize(selector) {
  if (!isStandardSyntaxSelector(selector) return selector;

  return selectorParser().processSync(selector, { lossless: false });
}

@JounQin
Copy link
Member Author

JounQin commented May 26, 2022

@ybiquitous Done.

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM 👍🏼

@ybiquitous ybiquitous changed the title fix: keep non-standard selector as-is fix: no-duplicate-selectors false positives for SCSS/Less nested interpolations May 26, 2022
@ybiquitous ybiquitous merged commit c7ac318 into stylelint:main May 26, 2022
@ybiquitous
Copy link
Member

Changelog entry added:

Fixed: no-duplicate-selectors false positives for SCSS/Less nested interpolations (#6118).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

no-duplicate-selectors false positives with Less syntax
2 participants