at-rule-empty-line-before not ignoring // comments in SCSS
The rule at-rule-empty-line-before enforces a line break before anything with an @, which in SCSS can be quite a few things e.g. @function. We have this configured to still allow comments before, but it only recognises comments of the format /* comment */ and not // comment. I suspect because these aren't really allowed in vanilla CSS.
@mattheu so, given that //-style "comments", indeed, are not actual comments according to CSS specification, do you still think this is a bug?
Maybe we should disallow these comments, and enforce using proper /* CSS comments. */...?
Yeah that would also work too I think
There are a few stylelint-scss comment rules we can add:
via https://github.com/kristerkari/stylelint-scss/#-comment
//-comment
-
double-slash-comment-empty-line-before: Require or disallow an empty line before//-comments (Autofixable). -
double-slash-comment-inline: Require or disallow//-comments to be inline comments. -
double-slash-comment-whitespace-inside: Require or disallow whitespace after the//in//-comments