simonhaenisch/prettier-plugin-organize-imports

Bug or feature? Once I type blank line between imports, imports are sorted within that group

Filipeue opened this issue · 2 comments

The results are inconsistent if blank line is present.

This formatted correctly:

import "@/global.css";

import Test from "@/components/Test";
import Test2 from "@/components/Test2";

But this one is correct too:

import Test from "@/components/Test";
import Test2 from "@/components/Test2";
import "@/global.css";

Either way I think only one of these should be correct to present clear consistency.

@Filipeue It's a feature (in TypeScript, which this package is using)

depends on your ts version, i think this sorting-per-group feature was introduced in 4.7 or so.