load-no-partial-leading-underscore
What it does
Section titled “What it does”Reports a @use, @forward or @import of a partial with a leading underscore (@use 'a/_b'). CSS imports are not reported.
Why it matters
Section titled “Why it matters”Sass looks the partial up without the underscore, so the underscore is noise that makes a path look like a different file.
To fix, write the name without the underscore: @use 'a/b'.
Example
Section titled “Example”With this configuration:
no-global-function-names: warnat-mixin-argumentless-call-parentheses: warnat-rule-conditional-no-parentheses: warnat-extend-no-missing-placeholder: warnat-if-no-null: warnload-no-partial-leading-underscore: warndollar-variable-pattern: { level: warn, options: { pattern: "^[a-z-]+$" } }at-mixin-pattern: { level: warn, options: { pattern: "^[a-z-]+$" } }at-function-pattern: { level: warn, options: { pattern: "^[a-z-]+$" } }@use "a/_b";@use "c.css";...Configuration
Section titled “Configuration”css: lint: rules: load-no-partial-leading-underscore: warn # off (default), warn, errorless: lint: rules: load-no-partial-leading-underscore: warn # off (default), warn, errorscss: lint: rules: load-no-partial-leading-underscore: warn # off (default), warn, errorEnabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line load-no-partial-leading-underscore 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/load-no-partial-leading-underscore |
full |