Disallow unknown at-rules. Should be used instead of Stylelint's at-rule-no-unknown.
@unknown (max-width: 960px) {}
/** ↑
* At-rules like this */
This rule is basically a wrapper around the mentioned core rule, but with added SCSS-specific @
-directives. So if you use the core rule, @if
, @extend
and other Sass-y things will get warnings. You must disable Stylelint's core rule to make this rule work:
{
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
}
The following patterns are considered warnings:
@unknown {}
The following patterns are not considered warnings:
@function foo () {}
@while ($i == 1) {}
@media (max-width: 960px) {}
@if ($i) {} @else {}
Given:
["/^my-/i", "custom"]
The following patterns are not considered warnings:
@my-at-rule "x.css";
@my-other-at-rule {}
@MY-OTHER-AT-RULE {}
@custom {}