You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are false positives for at-rules that immediately follow a multi-line comment in SCSS single-line comment syntax (i.e. multiple lines, each preceded by // ), with "ignore": ["after-comment"] configuration.
Which rule, if any, is the bug related to?
at-rule-empty-line-before
What code is needed to reproduce the bug?
// This is a single-line comment. The next line is not flagged.@media (min-width: 600px) {
body {
background-color: lightblue;
}
}
/* This is a multi-line comment in multi-line comment syntax * and the next line is not flagged. */@media (min-width: 700px) {
body {
background-color: pink;
}
}
// This is a multi-line comment in single-line comment syntax// and the next line is flagged as an error by stylelint.@media (min-width: 800px) {
body {
background-color: green;
}
}
What stylelint configuration is needed to reproduce the bug?
How are you running stylelint: CLI, PostCSS plugin, Node.js API?
CLI with stylelint "**/*.css" and the configuration above in .stylelintrc in the CWD.
Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?
Yes, this happens with single-line comment syntax, which is an SCSS feature.
What did you expect to happen?
No errors to be flagged, since a multi-line comment in single-line syntax is still a comment. I expect "ignore": ["after-comment"] to include all syntax variations of a comment.
What actually happened (e.g. what warnings or errors did you get)?
test.scss
18:1 ✖ Expected empty line before at-rule at-rule-empty-line-before
There are false positives for at-rules that immediately follow a multi-line comment in SCSS single-line comment syntax (i.e. multiple lines, each preceded by
//
), with"ignore": ["after-comment"]
configuration.at-rule-empty-line-before
e.g.
13.7.0
CLI with
stylelint "**/*.css"
and the configuration above in.stylelintrc
in the CWD.Yes, this happens with single-line comment syntax, which is an SCSS feature.
No errors to be flagged, since a multi-line comment in single-line syntax is still a comment. I expect
"ignore": ["after-comment"]
to include all syntax variations of a comment.cc: @danarbello
The text was updated successfully, but these errors were encountered: