eslint-plugin-sort-keys-fix icon indicating copy to clipboard operation
eslint-plugin-sort-keys-fix copied to clipboard

key groups

Open dorseth opened this issue 5 years ago • 3 comments

It would be nice if one could specify order of some keys, and sort those, then sort others alpabetically.

dorseth avatar Jun 06 '19 12:06 dorseth

I agree. The use case for this I have in mind is when you are doing css-in-js and you want to be able to keep related css properties together.

Some prior art here that's similar but different: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md

dimitropoulos avatar Dec 05 '19 18:12 dimitropoulos

Old issue but I'd keep using this plugin if this were implemented.

chancegraff avatar Aug 08 '20 17:08 chancegraff

One way to do this would be to do it based on a newline, so if there is a newline, sort all the partitions but don't move stuff over newlines (this could be an option)

entropitor avatar Feb 11 '21 11:02 entropitor