import-notation
What it does
Section titled “What it does”Reports an @import written in the notation the url option does not ask for: by default a string, so url(...) is reported; with url: true, url(...), so a string is reported.
Why it matters
Section titled “Why it matters”One notation for imports keeps the file uniform and easy to search. The string form is shorter; the url() form is the one that the older tools and bundlers read.
Example
Section titled “Example”@import url("a.css");@import "b.css";@import 'c.css' screen;Configuration
Section titled “Configuration”css: lint: rules: import-notation: level: warn # off (default), warn, error options: url: falseless: lint: rules: import-notation: level: warn # off (default), warn, error options: url: falsescss: lint: rules: import-notation: level: warn # off (default), warn, error options: url: false| Option | Type | Default | Description |
|---|---|---|---|
url |
bool | false |
Ask for url() instead of a string. |
Enabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line import-notation 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 | import-notation |
full |