double-slash-comment-empty-line-before
What it does
Section titled “What it does”Reports a // comment on a line of its own with no empty line before it. One that is first in its block, right after another comment, on the line of code, or a directive comment is not reported.
Why it matters
Section titled “Why it matters”A comment describes what follows, and an empty line before it ties it to the next rule rather than to the end of the previous one.
Example
Section titled “Example”With this configuration:
dollar-variable-empty-line-before: warncustom-property-empty-line-before: warndouble-slash-comment-empty-line-before: warnno-empty-comment: { level: warn, options: { separators: true } }$a: 1;$b: 2;// note$c: 3;.x { $d: 4;... --g: 7; // one
// two top: 0; // inline...Configuration
Section titled “Configuration”css: lint: rules: double-slash-comment-empty-line-before: warn # off (default), warn, errorless: lint: rules: double-slash-comment-empty-line-before: warn # off (default), warn, errorscss: lint: rules: double-slash-comment-empty-line-before: warn # off (default), warn, errorEnabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line double-slash-comment-empty-line-before in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint-scss | scss/double-slash-comment-empty-line-before |
full |