hudochenkov / stylelint-order

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

Alphabetical sorting obeys property shorthands #91

Closed jamesarosen closed 5 years ago

jamesarosen commented 5 years ago

Given

border-color: transparent;
border-bottom-color: pink;

the default alphabetical sort would rorder that to

border-bottom-color: pink;
border-color: transparent;

That changes the behavior since the shorthand border-color now overrides the longhand border-bottom-color. This commit makes the alphabetical sorting shorthand-aware.

This commit also upgrades postcss-sorting to ^5.0.1 so the "fix" logic is the same as the linting logic.

See https://github.com/hudochenkov/postcss-sorting/pull/85

Closes #50

hudochenkov commented 5 years ago

A loot of tests are failing. https://travis-ci.org/hudochenkov/stylelint-order/jobs/557424260

hudochenkov commented 5 years ago

When you fix, please, don't force push. If you force push, then I can't see what changes you did and I have to review everything again. I'll squash commits on merge for clean Git history.

hudochenkov commented 5 years ago

Thank you! Awesome job!