-
-
Notifications
You must be signed in to change notification settings - Fork 930
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-descending-specificity
false positives for nested selectors
#7724
Fix no-descending-specificity
false positives for nested selectors
#7724
Conversation
🦋 Changeset detectedLatest commit: 1f5c69e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
This LGTM but could you update line 132 to be
* @param {import('postcss-selector-parser').Selector} resolvedSelectorNode
?
We have discussed this with @ybiquitous. He's around thankfully but even if he wasn't you could release in his absence. |
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.
@romainmenke Thanks for the quick patch! LGTM 👍🏼
If you want, I can grant you permission to publish the stylelint
package (you don't have it, right?).
I have time to release a new version within a few days, though.
It's fine that I don't have publishing access. Having a next patch out in the next few days is still a really quick response, thank you 🙇 Also thank you for the reviews! |
That function is correct as it is now imho. This function does transform the provided selector but it is not this transform that was key to this bug. It was which selector was used as the reference. The transform could be useful for any selector, even those not produced by resolving nested selectors or when the result isn't used as a reference. |
Due to a regression in no-descending-specificity rule: stylelint/stylelint#7724
Due to a regression in no-descending-specificity rule: stylelint/stylelint#7724
Closes #7723
We didn't have coverage for nested selectors where the nested part is the same while the parent is different.
I should have double checked this when refactoring this rule.
I am certain that this case is very common.
Do we have capacity to ship a patch in the next few days?