stylelint-scss / stylelint-config-recommended-scss

The recommended shareable SCSS config for Stylelint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`annotation-no-unknown` should allow `!default`

Hyzual opened this issue Β· comments

Hi, thank you for maintaining this stylelint configuration, it is very helpful πŸ‘.

Since v14.10.0, stylelint added the annotation-no-unknown rule. Given that !default is a valid flag for Sass variables, I suggest to add some configuration to allow it. This way, users of this config will not have errors raised on their default Sass variables.

Before the change:

$my-variable: #ff0000 !default; // βœ–  Unexpected unknown annotation "!default"  annotation-no-unknown

After the change:

$my-variable: #ff0000 !default; // No error

What do you think about it ? I'll submit a PR for it shortly.

This could be combined with #117, because the rule is enabled in stylelint-config-recommended version 9.0, which causes this error to appear now for users.

Thanks, sure, let's fix this!