prettier-plugin-sort-imports icon indicating copy to clipboard operation
prettier-plugin-sort-imports copied to clipboard

Combine imports for the same dependency

Open quantizor opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Sometimes when using find/replace to update an import, you might end up with multiple imports to the same dependency in the same file. While this works, it would be great to deduplicate and combine the imports

Describe the solution you'd like

For a situation like this:

import { TEST_ID } from '../view-ui';
import { SPACING } from '../view-ui';

Convert it to this:

import { SPACING, TEST_ID } from '../view-ui';

quantizor avatar Jun 15 '24 03:06 quantizor