trivago / prettier-plugin-sort-imports

A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
Apache License 2.0
3.28k stars 129 forks source link

Replace importOrderSeparation with <SEPARATOR> #268

Open joutvhu opened 11 months ago

joutvhu commented 11 months ago

I think importOrderSeparation should be removed and provide a <SEPARATOR> special word in the importOrder. It makes it easy for me to specify the split position I want.

"importOrder": [
  "<THIRD_PARTY_MODULES>",
  "<SEPARATOR>"
  "^app-",
  "^~"
  "^[./]"
]
joutvhu commented 11 months ago

It is also not necessary to remove importOrderSeparation, which can be retained to support backward compatibility.

DaveKeehl commented 4 months ago

I would also like to see this implemented to have more control over the import groups.

adnjoo commented 4 months ago

+1 trying to have groups of related files e.g. local files @/... imports with ../ imports without a space between

IanVS commented 3 months ago

Seems like a bit of a duplicate of https://github.com/trivago/prettier-plugin-sort-imports/issues/166?