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

at-rule-empty-line-before not ignoring // comments in SCSS #225

Open
mattheu opened this issue Sep 18, 2020 · 3 comments
Open

at-rule-empty-line-before not ignoring // comments in SCSS #225

mattheu opened this issue Sep 18, 2020 · 3 comments

Comments

@mattheu
Copy link
Member

mattheu commented Sep 18, 2020

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.

@tfrommen
Copy link
Contributor

tfrommen commented Feb 9, 2021

@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. */...?

@mattheu
Copy link
Member Author

mattheu commented Feb 9, 2021

Yeah that would also work too I think

@ntwb
Copy link
Contributor

ntwb commented Feb 18, 2021

There are a few stylelint-scss comment rules we can add:

via https://github.com/kristerkari/stylelint-scss/#-comment

//-comment

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

No branches or pull requests

3 participants