nedjulius / prettier-plugin-stylex-key-sort

Prettier plugin that auto-sorts StyleX keys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-process instead of modifying the AST

nedjulius opened this issue · comments

Related to #1

It seems that there is no good way to preserve line separated groups, besides preprocessing the code with babel and then replacing stylex.create or stylex.keyframes text with the newly generated code string.

This technique is employed by the prettier-plugin-sort-imports plugin as well. The only drawback is that it may take longer to sort the keys.