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

Fixed: False positive for custom selectors in selector-pseudo-class-no-unknown #2141 #2147

Merged
merged 3 commits into from
Nov 30, 2016

Conversation

MoOx
Copy link
Contributor

@MoOx MoOx commented Nov 29, 2016

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

#2141

Is there anything in the PR that needs further explanation?

First commit proves it's failing. 2nd fix it.

Hope I fixed this the right way.

Closes #2141

@@ -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))
Copy link
Member

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 }
Copy link
Member

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

@alexander-akait
Copy link
Member

@MoOx thanks for helping 👍

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

@MoOx
Copy link
Contributor Author

MoOx commented Nov 30, 2016

PR rebased on master ;)

@alexander-akait
Copy link
Member

/cc @davidtheclark @jeddy3

@davidtheclark
Copy link
Contributor

👍

Copy link
Member

@jeddy3 jeddy3 left a 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 !

@jeddy3 jeddy3 merged commit de0c4bf into master Nov 30, 2016
@jeddy3 jeddy3 deleted the fix-2141 branch November 30, 2016 14:49
@jeddy3
Copy link
Member

jeddy3 commented Nov 30, 2016

Added to changelog as:

  • Fixed: selector-pseudo-class-no-unknown no longer reports false positives for custom selectors (#2147).

sergesemashko pushed a commit to sergesemashko/stylelint that referenced this pull request Mar 3, 2017
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.

False positive for custom selectors in selector-pseudo-class-no-unknown
4 participants