lesshint
lesshint copied to clipboard
Upgrading to 6.3.0 gives unexpected results
Which version of lesshint are you using?
6.3.0
How are you running lesshint? CLI, Node.js API, Grunt/Gulp plugin?
linter-lesshint
What's your .lesshintrc configuration?
"singleLinePerSelector": {
"enabled": true,
"style": "none"
},
"spaceAroundComma": {
"enabled": true,
"allowNewline": false,
"style": "after"
}
If you're reporting a bug, please show us some code that's failing.
&:hover, // error occurs here
&:focus {
&::before {
width: 40px;
}
}
What did you expect to happen? pass
What's the actual result? Error: lesshint: spaceAroundComma: Commas should be followed by one space
Hi! Thanks for the report and for using the template!
Which version were you using previously? Because I think this is the expected behaviour with allowNewline set to false.
I think I was previously using 5.3 on Atom linter, no errors was thrown.
Using the same configuration as before, this two rules seems to be completely incompatible: singleLinePerSelector are forcing &:focus to be on its own line while spaceAroundComma forces the &:hover line to follow space around comma convention.
I also have a rule to force trailing whitespace to be removed at end of line 😜
Hre is a sample code I don't want to be valid:
&:hover, &:focus {
.test {
font-family: 'Arial',
'Segoe UI',
'Sans serif';
}
}
And here a code that should be validate by linter:
&:hover,
&:focus {
.test {
font-family: 'Arial', 'Segoe UI', 'Sans serif';
}
}
Hope this help ✌
@xavierfoucrier Thanks! I'll see what I can find.
Closing the issue due to project inactivity.
Feel free to reopen again when needed.