Skip to content

at-mixin-argumentless-call-parentheses

Reports an @include of a mixin with empty parentheses (@include foo()). A using (...) clause after them is not reported.

Sass allows @include foo and @include foo() for a mixin without arguments. Empty parentheses add noise and suggest arguments that are not there.

To fix, delete the ().

With this configuration:

no-global-function-names: warn
at-mixin-argumentless-call-parentheses: warn
at-rule-conditional-no-parentheses: warn
at-extend-no-missing-placeholder: warn
at-if-no-null: warn
load-no-partial-leading-underscore: warn
dollar-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-]+$" } }
Reported
...
a {
@include foo();
@include foo() using ($x) { top: 0; }
...
@extend %b;
...
css:
lint:
rules:
at-mixin-argumentless-call-parentheses: warn # off (default), warn, error
less:
lint:
rules:
at-mixin-argumentless-call-parentheses: warn # off (default), warn, error
scss:
lint:
rules:
at-mixin-argumentless-call-parentheses: warn # off (default), warn, error

Enabled by the presets: css/stylelint-standard.

Suppress one line with sudsy-disable-next-line at-mixin-argumentless-call-parentheses in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint-scss scss/at-mixin-argumentless-call-parentheses full