-
-
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-duplicate-selectors
false negatives for three or more duplicates
#7583
Comments
@erosman Thanks for the report. As you commented, this is a bug. I've labeled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to fix a bug in a rule in the Developer guide. |
Sadly, we have no such a rule in the built-in rules. If you're interested, feel free to open a new issue. |
no-duplicate-selectors
issue with empty valuesno-duplicate-selectors
false negatives for empty attribute values
For your reference, this bug is not only for empty values. a[href*="abc"], /* this line only is reported */
a[href*="abc"],
a[href*="abc"],
a[href*=""] {
color: #fd0;
} See the demo. |
no-duplicate-selectors
false negatives for empty attribute valuesno-duplicate-selectors
false negatives for three or more duplicates
Is the code for the rule in /lib/rules/no-duplicate-selectors/index.mjs? TBH, my writing style is considerably different for me to contribute to the code. |
Yes.
Regarding coding style, we keep consistency thanks to Prettier and ESLint. |
BTW, is CLA required by StyleLint? |
No, CLA is not required. |
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant. |
What minimal example or steps are needed to reproduce the bug?
What minimal configuration is needed to reproduce the bug?
default
How did you run Stylelint?
Demo
Which Stylelint-related dependencies are you using?
What did you expect to happen?
Error should occur on line 3 & 4 and refer to line 2 e.g.
Line 2 selector is not a duplicate of line 1 selector.
PS. (on another note) Is there a rule for empty selector value? 🤔
What actually happened?
ERROR Unexpected duplicate selector "a[href*=""]", first used at line 1 (no-duplicate-selectors) [2:1-12]
Do you have a proposal to fix the bug?
No response
The text was updated successfully, but these errors were encountered: