at-rule-semicolon-space-before
Require a single space or disallow whitespace before the semicolons of at-rules.
@import "components/buttons";
/** ↑
* The space before this semicolon */Nothing is asked of an at-rule the file spells no semicolon behind — one running to the brace that closes its container, or to the end of the file. There is no semicolon there for whitespace to stand in front of, and the whitespace that does stand there is the closing brace's or the file's own.
The rule passes over @charset, whose spelling Stylelint's at-charset-rule-no-invalid rule judges; a CSS file holding one gets a warning asking for that rule where the configuration leaves it off.
The fix option can automatically fix most of the problems reported by this rule. It writes nothing where a // comment runs to the end of the at-rule, since the semicolon would land inside the comment. The warning stands.
Options
string: "always"|"never"
"always"
There must always be a single space before the semicolons.
The following pattern is considered a problem:
@import "components/buttons";The following pattern is not considered a problem:
@import "components/buttons" ;"never"
There must never be a single space before the semicolons.
The following pattern is considered a problem:
@import "components/buttons" ;The following pattern is not considered a problem:
@import "components/buttons";