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

False positive for pseudos and Less guard in selector-descendant-combinator-no-non-space #2110

Closed
thybzi opened this issue Nov 23, 2016 · 8 comments
Assignees
Labels
status: wip is being worked on by someone syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule

Comments

@thybzi
Copy link

thybzi commented Nov 23, 2016

Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?

Using CSS pseudo selector (:hover, :not(), ::after etc.) and LESS guard (when) in the same line leads to selector-descendant-combinator-no-non-space false positive.

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

selector-descendant-combinator-no-non-space

What CSS is needed to reproduce this issue?

:hover when (@a = 42) {
    color: red;
}

What stylelint configuration is needed to reproduce this issue?

e.g.

{
    "rules": {
        "selector-descendant-combinator-no-non-space": true
    }
}

Which version of stylelint are you using?

e.g. 7.6.0

How are you running stylelint: CLI, PostCSS plugin, Node API?

CLI with stylelint test.less

Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?

Yes, it's related to LESS when syntax: http://lesscss.org/features/#css-guards-feature

What did you expect to happen?

No warnings to be flagged.

What actually happened (e.g. what warnings or errors you are getting)?

The following warnings were flagged:

test.less
 1:12  ×  Unexpected " (@a = 42)"   selector-descendant-combinator-no-non-space
@thybzi thybzi changed the title :not() and when => selector-descendant-combinator-no-non-space false positive Pseudo + LESS guard => selector-descendant-combinator-no-non-space false positive Nov 23, 2016
@thybzi
Copy link
Author

thybzi commented Nov 23, 2016

Concerns not only :not(), but all pseudo selectors. Updated the issue description.

@alexander-akait
Copy link
Member

@thybzi Thanks for feedback, today i can see this.

@alexander-akait
Copy link
Member

@thybzi can you provide full example, i can't find using pseudo with when in docs?

@alexander-akait alexander-akait added status: needs investigation triage needs further investigation syntax: less relates to Less and Less-like syntax labels Nov 25, 2016
@jeddy3 jeddy3 changed the title Pseudo + LESS guard => selector-descendant-combinator-no-non-space false positive False positive for pseudos and Less guard in selector-descendant-combinator-no-non-space Nov 26, 2016
@thybzi
Copy link
Author

thybzi commented Dec 10, 2016

Hi @evilebottnawi! I have provided the example in the head of this issue:

:hover when (@a = 42) {
    color: red;
}

Isn't this code enough to reproduce to failure?

@alexander-akait
Copy link
Member

@thybzi I am on the weekends 😄 Tomorrow it'll 👍

@thybzi
Copy link
Author

thybzi commented Feb 8, 2017

Okay, waiting for this. Thank you!

@alexander-akait
Copy link
Member

alexander-akait commented Feb 8, 2017

@thybzi sorry, very busy last month 😭 you can try to resolve himself if you need this immediately 😄

@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule and removed status: needs investigation triage needs further investigation labels Feb 12, 2017
@alexander-akait alexander-akait added status: wip is being worked on by someone and removed status: ready to implement is ready to be worked on by someone labels May 7, 2017
@alexander-akait alexander-akait self-assigned this May 7, 2017
@alexander-akait
Copy link
Member

Done in #2557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule
Development

No branches or pull requests

3 participants