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

4 participants
@MoOx
Contributor

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))

This comment has been minimized.

@evilebottnawi

evilebottnawi Nov 29, 2016

Member

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 }

This comment has been minimized.

@evilebottnawi

evilebottnawi Nov 29, 2016

Member

Best solution is write util isCustomSelector.js (also add tests) and use it

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Nov 29, 2016

@MoOx thanks for helping 👍

@evilebottnawi

Great! Thanks!

MoOx added a commit to phenomic/phenomic that referenced this pull request Nov 29, 2016

MoOx added some commits Nov 29, 2016

Fixed: False positive for custom selectors in `selector-pseudo-class-…
…no-unknown`

Hope I fixed this the right way.

Closes #2141

@MoOx MoOx force-pushed the fix-2141 branch from 633c1ca to af5696f Nov 30, 2016

@MoOx

This comment has been minimized.

Contributor

MoOx commented Nov 30, 2016

PR rebased on master ;)

@MoOx MoOx force-pushed the fix-2141 branch from af5696f to 47ccfa4 Nov 30, 2016

MoOx added a commit to phenomic/phenomic that referenced this pull request Nov 30, 2016

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Nov 30, 2016

@davidtheclark

This comment has been minimized.

Contributor

davidtheclark commented Nov 30, 2016

👍

@jeddy3

jeddy3 approved these changes Nov 30, 2016

Thanks for rebasing as well @MoOx !

@jeddy3 jeddy3 merged commit de0c4bf into master Nov 30, 2016

3 of 4 checks passed

coverage/coveralls Coverage increased (+0.005%) to 91.891%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jeddy3 jeddy3 deleted the fix-2141 branch Nov 30, 2016

@jeddy3

This comment has been minimized.

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