-
-
Notifications
You must be signed in to change notification settings - Fork 942
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
Fixed: False positive for custom selectors in selector-pseudo-class-no-unknown
#2141
#2147
Conversation
@@ -5,6 +5,7 @@ | |||
- Fixed: `comment-whitespace-inside` no longer complains about `/*!` comments with non-space whitespace (e.g. newlines) ([#2121](https://github.com/stylelint/stylelint/pull/2121)) | |||
- Fixed: `selector-max-compound-selectors` ignores SCSS nested declarations ([#2102](https://github.com/stylelint/stylelint/pull/2102)) | |||
- Fixed: regression causing `--stdin-filename` in CLI and `codeFilename` in Node API to error if a non-existent filename is provided ([#2128](https://github.com/stylelint/stylelint/pull/2128)) | |||
- Fixed: False positive for custom selectors in `selector-pseudo-class-no-unknown` ([#2141](https://github.com/stylelint/stylelint/pull/2141)) |
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.
Don't add lines in changelog, this added after merge PR
@@ -47,6 +47,9 @@ export default function (actual, options) { | |||
// Ignore pseudo-elements | |||
if (value.slice(0, 2) === "::") { return } | |||
|
|||
// Ignore custom selectors | |||
if (value.slice(0, 3) === ":--") { return } |
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.
Best solution is write util isCustomSelector.js
(also add tests) and use it
@MoOx thanks for helping 👍 |
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! Thanks!
…no-unknown` Hope I fixed this the right way. Closes #2141
PR rebased on master ;) |
👍 |
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.
Thanks for rebasing as well @MoOx !
Added to changelog as:
|
#2141
First commit proves it's failing. 2nd fix it.
Hope I fixed this the right way.
Closes #2141