stylelint-config-recommended-scss icon indicating copy to clipboard operation
stylelint-config-recommended-scss copied to clipboard

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

Open Hyzual opened this issue 2 years ago • 0 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.

Hyzual avatar Sep 27 '22 15:09 Hyzual