at-function-named-arguments
August 12, 2018 · View on GitHub
Require named parameters in SCSS function call rule.
animation: animation($duration: 250ms) {
// ↑
// Require or disallow this
Options
string: "always"|"never"
always
The following patterns are considered warnings:
.foo {
animation: animation(250ms, 100ms, infinite);
}
.foo {
animation: animation(250ms);
}
.foo {
border: reset($value: 20, "bar", $color: #fff);
}
The following patterns are not considered warnings:
.foo {
animation: animation($duration: 250ms);
}
.foo {
animation: animation($duration: 250ms, $delay: 100ms, $direction: infinite);
}
never
The following patterns are considered warnings:
.foo {
border: reset($value: 20);
}
.foo {
animation: animation($duration: 250ms, $delay: 100ms, $direction: infinite);
}
.foo {
border: reset($value: 20, "bar", $color: #fff);
}
The following patterns are not considered warnings:
.foo {
animation: animation(250ms, 100ms, infinite);
}
Optional secondary options
"ignore": ["single-argument"]
Given:
{ "ignore": ["single-argument"] }
The following patterns are not considered warnings:
.foo {
@include animation($duration: 250ms);
}
.foo {
@include reset(20);
}
ignoreFunctions: ["/regex/", "string"]
Given:
["always", { ignoreFunctions: ["/^my-/i", "custom"] }];
The following patterns are not considered warnings:
.foo {
border: custom(20, 30);
}
.foo {
border: my-func(20, 30);
}
.foo {
border: MY-FUNC(20, 30);
}