Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation-no-unknown should allow !default #131

Closed
Hyzual opened this issue Sep 27, 2022 · 2 comments · Fixed by #132
Closed

annotation-no-unknown should allow !default #131

Hyzual opened this issue Sep 27, 2022 · 2 comments · Fixed by #132

Comments

@Hyzual
Copy link
Contributor

Hyzual commented Sep 27, 2022

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 added a commit to Hyzual/stylelint-config-recommended-scss that referenced this issue Sep 27, 2022
Hyzual added a commit to Hyzual/stylelint-config-recommended-scss that referenced this issue Sep 27, 2022
@jnoordsij
Copy link
Contributor

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.

@kristerkari
Copy link
Collaborator

Thanks, sure, let's fix this!

jnoordsij pushed a commit to jnoordsij/stylelint-config-recommended-scss that referenced this issue Oct 22, 2022
kristerkari pushed a commit that referenced this issue Oct 24, 2022
* Allow `!default` annotation

This fixes #131

* Add !default annotation to valid.scss

* Allow !global annotations in scss

* Fix formatting in index.js

Co-authored-by: Jesper Noordsij <jesper@sslleiden.nl>
nickcharlton added a commit to thoughtbot/administrate that referenced this issue Feb 2, 2024
nickcharlton added a commit to thoughtbot/stylelint-config that referenced this issue Feb 2, 2024
In addition to being valid SCSS, we often use `!default` in places like
`variables.scss`.

stylelint-scss/stylelint-config-recommended-scss#131
stylelint-scss/stylelint-config-recommended-scss#132
nickcharlton added a commit to thoughtbot/stylelint-config that referenced this issue Feb 2, 2024
In addition to being valid SCSS, we often use `!default` in places like
`variables.scss`.

stylelint-scss/stylelint-config-recommended-scss#131
stylelint-scss/stylelint-config-recommended-scss#132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants