-
Notifications
You must be signed in to change notification settings - Fork 527
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
Doesn't handle CSS Modules composition #302
Comments
This may need to be another whitelist option where whitelisted properties are ignored in property sort orders, I think going any further into forcing certain elements to be first or last for the alphabetical sort order would open up a whole can of worms.. |
Yes absolutely. I think just ignoring the whole declaration if the property is I guess it's about not adding it to the sass-lint/lib/rules/property-sort-order.js Line 104 in 6756702
|
Thinking about it we actually have a list of all valid CSS properties in the linter already to check property spelling so it makes sense to only apply this to valid/default css properties and ignore everything else. |
I am getting the same error:
But I have added the "composes" property to the "order" declaration: property-sort-order:
- 1
- order:
- composes
- background
no-misspelled-properties:
- 1
- extra-properties:
- composes Is there a reason it does not work? |
I can't replicate your issue @gajus I'm afraid, #331 is currently waiting to be merged to improve the way this rule handles custom properties so it may resolve there. I would just check your yaml is valid as this may cause issues If you find this happening again once @jgthms sorry this has taken so long to finalise and get done but should be moving forward now! |
I cannot replicate it in the most recent version either. Thank you |
In CSS Modules, you have compositions, which basically act like
@extend
in Sass. That's why they should come first in the list of properties.But the
property-sort-order
rule doesn't handle that.For example:
Will output:
It would be useful if
composes
was ignored when ordering alphabetically.The text was updated successfully, but these errors were encountered: