Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine imports for the same dependency #298

Open
quantizor opened this issue Jun 15, 2024 · 2 comments
Open

Combine imports for the same dependency #298

quantizor opened this issue Jun 15, 2024 · 2 comments
Labels
feature request A new feature request

Comments

@quantizor
Copy link

quantizor commented Jun 15, 2024

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 quantizor added the feature request A new feature request label Jun 15, 2024
@menasheh
Copy link

+1. Currently migrating away from this plugin due to this feature, even though I like the import order rules.

@iamrandys
Copy link

+1. If the maintainers agree, I'm willing to add this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new feature request
Projects
None yet
Development

No branches or pull requests

3 participants