infctr/eslint-plugin-typescript-sort-keys

Change Sorting Algorithm or Support Custom Sort Function

FlorianWendelborn opened this issue · 2 comments

Currently,

UPDATE_OFFER_DETAIL: MaterialsState['offerDetail']
UPDATE_OFFERS_LIST: MaterialsState['offerList']

gets sorted because _ is considered to be after S. This unfortunately clashes with expectations and with other sorting extensions.

IMO, the most sustainable solution would be to allow passing a custom Array.prototype.sort callback as an option in the rule. Then, users can configure it exactly as they wish.