import-sort
import-sort copied to clipboard
import-sort via prettier
I've always found it awkward to run import-sort and prettier in the editor since chaining these two is somewhat error prone and can easily have both running at the same time.
So I wrote a prettier plugin https://github.com/ggascoigne/prettier-plugin-import-sort that allows import-sort to run as a preprocessor to prettier. I'll admit that it's not a very sophisticated approach and could most likely be improved by trying to reuse the prettier parser, but I didn't have time for that.
Anyway, this led me to wonder if it's worth officially supporting a prettier-plugin in this repo, or whether it's better to keep it separate.
Hi @ggascoigne
that's pretty cool! I wasn't aware that prettier now has support for plugins. I will take a closer look to learn how it works.
Your plugin being part of this repository definitely makes sense to me; at the very least we should mention it in the README.
+1 bumping because it looks like this is outstanding.