hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

Add tests for ignoring properties case for ordering. Related to #78 #196

Closed Astrael1 closed 1 month ago

Astrael1 commented 1 month ago

Hello :) There are some issues with #78

  1. Shorthands I don't know how the plugin should behave with shorthands. I assumed that if user types

Border-width: 1px; Border-top-width: 2px;

they do it on purpose and they expect it to behave just like any other css properties. Do you agree with that?

  1. It needs postcss-sorting to have an option to ignore case. Shall I report that issue there?
  2. Do you have any more tests ideas? Are you willing to merge the tests without other changes?
hudochenkov commented 1 month ago
  1. Shorthands area already supported https://github.com/hudochenkov/stylelint-order/blob/416d00c13c416a3529f712f3dd8cd0fbf63ea909/rules/checkAlphabeticalOrder.js#L11-L19 I don't expect anything new needed for this.
  2. Correct. First postcss-sorting need to ignore case, then we can add it to stylelint-order. Because postcss-sorting powering autofixing, it would be strange if logic for checking order in stylelint-order would be different than its fixing functionality.
  3. I've added few suggestions. Also need tests for properties-order.
Astrael1 commented 1 month ago

I added some tests. I haven't added tests in grouped-strict yet.

I'd like to know if it's fine. Are there too many tests or not enough etc?

hudochenkov commented 1 month ago

I haven't added tests in grouped-strict yet.

They are not needed.