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 message, positions, and false positives for selector-no-qualifying-type
#6260
Fix message, positions, and false positives for selector-no-qualifying-type
#6260
Conversation
@@ -78,6 +78,10 @@ const rule = (primary, secondaryOptions) => { | |||
return; | |||
} | |||
|
|||
const ignoreId = optionsMatches(secondaryOptions, 'ignore', 'id'); | |||
const ignoreClass = optionsMatches(secondaryOptions, 'ignore', 'class'); | |||
const ignoreAttribute = optionsMatches(secondaryOptions, 'ignore', 'attribute'); |
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.
[note] Avoid repeated evaluations in the loop.
selector-no-qualifying-type
selector-no-qualifying-type
&.bar {} | ||
} | ||
}`, | ||
}, |
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.
[note] A test case for #5020.
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.
Great work closing the bugs.
LGTM.
Thanks for your many reviews! 😊 Changelog entry added:
|
As of stylelint v14.11.0, the `stylelint-disable-line` override no longer appears to work in this case, giving a build failure of ``` 61:3 Unexpected qualifying type selector "a.ui-state-default" selector-no-qualifying-type ``` I suspect this is down to this change: stylelint/stylelint#6260 Applying the ignore to the block of CSS rather than to the line seems to appease the linter.
As of stylelint v14.11.0, the `stylelint-disable-line` override no longer appears to work in this case, giving a build failure of ``` 61:3 Unexpected qualifying type selector "a.ui-state-default" selector-no-qualifying-type ``` I suspect this is down to this change: stylelint/stylelint#6260 Applying the ignore to the block of CSS rather than to the line seems to appease the linter.
Closes #4410
Closes #5020
Part of #5694
This PR aims to fix three problems:
Unexpected qualifying type selector "a#id"