stylelint-scss
Version:
A collection of SCSS specific rules for stylelint
77 lines (54 loc) • 1.19 kB
Markdown
# at-rule-no-unknown
Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](http://stylelint.io/user-guide/rules/at-rule-no-unknown/).
```css
@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, ``, `` and other Sass-y things will get warnings. You must to disable core rule to make this rule work:
```json
{
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
}
```
## Options
### `true`
The following patterns are considered warnings:
```css
@unknown {}
```
The following patterns are *not* considered warnings:
```css
foo () {}
```
```css
($i == 1) {}
```
```css
(max-width: 960px) {}
```
```css
($i) {} {}
```
## Optional secondary options
### `ignoreAtRules: ["/regex/", "string"]`
Given:
```js
["/^my-/i", "custom"]
```
The following patterns are *not* considered warnings:
```css
-at-rule "x.css";
```
```css
-other-at-rule {}
```
```css
-OTHER-AT-RULE {}
```
```css
{}
```