dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Expand `forceMultiLineSpecifiers` to format imports of a single named import as a single line
This is a continuation of https://github.com/dprint/dprint-plugin-typescript/pull/473#issuecomment-1399724050.
forceMultiLineSpecifiers forces imports to be vertical lists of single items, which is great for preventing merge conflicts. But, when importing one thing (which is surprisingly often), it looks like:
import {
someFunction,
} from "some-library";
Which is maybe a little silly, especially when you may also be writing:
import someFunction from "some-library";
For libraries that have a default export instead.
It'd be nice if there were some way to say "a single import is okay", or similar. (per https://github.com/dprint/dprint-plugin-typescript/pull/473#pullrequestreview-1273626359)