-
Notifications
You must be signed in to change notification settings - Fork 61
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
duplicateCheck looks buggy #27
Comments
Hey @PalleZingmark thanks for pointing this out. So, really we got 2 issues here. Duplicates can't toggle and the actual check itself isn't working as intended. Don't have a lot of time right now, so I just pushed up a quick fix for the toggle issue: if you update to the latest stylint you should be able to toggle duplicates off. I'll take a longer look at false positives problem prolly tonight. Thanks! |
Thank you, toggling duplicates is now working as intended. 👍 |
Hey, i wasn't able to replicate your issue, but I was able to make a few improvements to duplicates. I'd get the latest and see if they resolve your issue maybe? I'm gonna close this issue out, i'll reopen if I can replicate it. |
No, unfortunately it does not solve my issue. I did some further tests, and while this throws a warning: .foo {
.bar {
color: red;
}
} This does not: .foo {
.bar {
color: red;
}} It also throws warnings if you're using BEM naming methodology, so it looks like the match pattern is somewhat off in the duplicateCheck. .foo {
.foo-bar {
color: red;
}
} |
So, i still couldn't replicate this. Maybe post your config? Are you using tabs or spaces for indenting? |
stylint-test.styl .foo {
.foo-bar {
color: red;
}
} .stylintrc {
"alphabetical": false,
"borderNone": true,
"brackets": false,
"colons": false,
"commaSpace": true,
"commentSpace": false,
"cssLiteral": false,
"duplicates": true,
"depthLimit": 4,
"efficient": true,
"enforceVarStyle": false,
"enforceBlockStyle": false,
"extendPref": false,
"globalDupe": false,
"indentSpaces": 2,
"leadingZero": false,
"maxWarnings": 10,
"mixed": true,
"namingConvention": "BEM",
"parenSpace": false,
"placeholders": false,
"semicolons": false,
"Whitespace": true,
"universal": false,
"valid": true,
"zeroUnits": true,
"zIndexDuplicates": false,
"zIndexNormalize": false
} hmm, I can see some strange behavior. If I just lint stylint-test.styl by itself, using the config above - it passes.
I have no other classes named .foo or .foo-bar in my project, so it shouldn't throw a warning. To make it pass, I need to do like this: .foo {
.foo-bar {
color: red;
}} |
@PalleZingmark hey so, i was eventually able to replicate the issue and hopefully 0.8.8 fixes it. Let me know! |
.....in 0.8.8,i set duplicates as true.but didnt throw a warning .some-class
margin 0
margin 5px
|
@lin-hun thx for reporting: was able to duplicate, try upgrading to 0.8.9 and see if that fixes it. |
=w= duplicates works well |
+1 cool, gonna close this now |
Hi,
It seems like duplicateCheck is a bit buggy.
I get a warning for the following code:
Setting it to false has no effect either, same warning regardless of settings.
The text was updated successfully, but these errors were encountered: