no-empty-source
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesssuspiciousno fixdefault: offcss/stylelint-recommended
What it does
Section titled “What it does”Reports a file with nothing but whitespace. A file with only comments is not empty.
Why it matters
Section titled “Why it matters”An empty stylesheet is a mistake: either the content was lost or the file is not needed. A build that imports it then loads a file that does nothing.
Configuration
Section titled “Configuration”css: lint: rules: no-empty-source: warn # off (default), warn, errorless: lint: rules: no-empty-source: warn # off (default), warn, errorscss: lint: rules: no-empty-source: warn # off (default), warn, errorEnabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line no-empty-source 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 | no-empty-source |
full |