stylelint: Deprecate emptyLineBefore option in declaration-block-properties-order
Feature to be moved into a plugin (e.g. block-structure). Include request for maintainer in deprecation notice.
Anyone fancy giving a home this plugin?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (27 by maintainers)
Thanks for all the discussion above.
I think we should deprecate the grouping feature of the rule. It makes sense to me because of reasons stated above — it is unwieldy, without clear boundaries, and the source of a disproportionate number of issues.
It’s also an excellent candidate for an independent project, whether as a stylelint plugin or a postcss plugin like
postcss-sorting. There’s really an indefinite number of features that people could build into a “sorting” tool/rule (which is why it can’t be “finished” I think).I understand that people like it and will be disappointed. Those people that like it should create a plugin and maintain it. If nobody who likes it is willing to step up and create the plugin, that’s on them: you can’t always get everything you want for free.
While working on deprecating the “group objects” configuration feature this morning I’ve come to realise that I wrongly assumed the “group objects” feature was only to do with whitespace, whereas I now realise it is also used to legitimately define a semi-flexible property-order (using the
order: "flexible"option).This discovery is a good thing. I think it means that both the transition to
7.0.0is going to be smoother and we still get to define clear boundaries (which means we still get to push the outstanding issues to a plugin) e.g.In summary,
declaration-block-properties-orderis only concerned with the order of properties within a declaration-block. It is not concerned with whitespace nor the order of non-properties.So, I believe we should only deprecate the
emptyLineBeforeoption. The other options (order: "flexible"andunspecified) are legitimate.I’ve a pending PR that updates the release planning doc to reflect this. Have a look through that and see what you think. Hopefully, we’ve stumbled onto the sweet spot that defines a clear purpose and scope for this rule, while offering a smoother transition to
7.0.0.@davidtheclark What do you think? I think this is (after digging a bit deeper into the rule) the best path going forward, but it is also the least amount of immediate work and so something I can complete before Monday.