-
Notifications
You must be signed in to change notification settings - Fork 31
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
group.forEach is not a function #32
Comments
Stylelint config is not fully compatible with this plugin yet. gajus/stylelint-config-canonical@2c58f19#diff-33d8a40ae0050661239a87463149dcafR4 array of arrays will be a correct config for PostCSS Sorting. |
@hudochenkov Would you accept a PR that makes this change? or is there a reason this is on hold (since it does not look like a big change) |
It's a big change because it would broke plugin backwards compatibility. Grouping in this plugin allows to group declarations, nested rules, at-rules. See default config. Stylelint only support grouping for declarations only. We are working now on a plugin for stylelint which will check sort order for non declarations (nested rules, at-rules). After this plugin will be ready I will think about how to integrate postcss-sorting in stylefmt, tool which format style sheets based on stylelint config. Now stylefmt support stylelint's |
I disagree. This plugin could support both syntaxes without introducing backwards breaking changes. |
I'll be glad if you right because it would be a great feature. Feel free to make a PR if it only adds new syntax and won't break anything. |
This is an excellent idea! It looks like stylefmt added support for |
@jeddy3 Yeah, I found out about this support from PostCSS twitter :) And as I can see, it's very limited support. I'm going to fix that too :) It's won't be a full support, because stylelint have “flexible” order option, and postcss-sorting do strict order only. But I will change stylefmt's part of |
That makes sense to me. I'm not sure how many people use the "flexible" order option, but I suspect it's a much smaller number than the combined total of people who use alphabetical or define a strict custom order. If someone does use the "flexible" order option, then they can always PR the support themselves if they want it :) |
Trying to format this CSS:
Using https://github.com/gajus/stylelint-config-canonical (v1.0.2) config, gives an error:
Upon inspection,
sortOrder
is:This does not look like an expected format.
Regardless, the input format meeds the schema defined in https://github.com/stylelint/stylelint/blob/master/src/rules/declaration-block-properties-order/README.md
The text was updated successfully, but these errors were encountered: