Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 1.23 KB

at-rule-no-unknown.md

File metadata and controls

75 lines (50 loc) · 1.23 KB

Pattern: Unknown at-rule

Issue: -

Description

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.

Examples

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 {}

Configuration

ignoreAtRules: ["/regex/", "string"]

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 {}

Further Reading