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

bug(duplicates): false positives, if exists comments for Stylus selectors #457

Open
Kristinita opened this issue Sep 22, 2019 · 1 comment

Comments

@Kristinita
Copy link

Kristinita commented Sep 22, 2019

1. Summary

If I use comments for Stylus selectors, I get:

duplicates error duplicate property or selector, consider merging

2. Data

2.1. Environment

  • Windows 10 Enterprise LTSB 64-bit EN
  • Node.js 12.1.0
  • Stylint 2.0.0

3. Files

  • Kira--Stylint-comments.styl:
p
    // Comment
    // Another comment
    font-size 1.9375rem
    font-style italic

div
    // Kira
    // Goddess!
    font-size 1.3rem
    font-style italic

I couldn't find, that such comments are prohibited in Stylus.

  • .stylintrc:
{
    "colons": {
        "expect": "never",
        "error": true
    },
    "duplicates": {
        "expect": "always",
        "error": true
    }
}

4. Steps to reproduce

stylint Kira--Stylint-comments.styl

5. Actual behavior

If comments in Kira--Stylint-comments.styl exists:

D:\Kira--Stylint-comments.styl
10 duplicates error duplicate property or selector, consider merging

D:\Kira--Stylint-comments.styl
11 duplicates error duplicate property or selector, consider merging

Stylint: 2 Errors.
Stylint: 0 Warnings.

6. Expected behavior

Else I strip comments:

p
    font-size 1.9375rem
    font-style italic

div
    font-size 1.3rem
    font-style italic

No warnings or errors.

Thanks.

@amitYadavDev
Copy link

Hi @Kristinita, i m going to work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants