copy-with-imports
copy-with-imports copied to clipboard
Join imports from same package
Hi,
I really appreciate your work 😄 I'd like to know if it is possible to join imports from same package.
example:
https://user-images.githubusercontent.com/29805626/117725385-5a90d380-b1e5-11eb-8d86-ffa51d80c4f3.mp4
in the example I'd like to have:
import React, {useContext} from 'react';
instead of:
import React from 'react';
import {useContext} from 'react';
Thank you!
I use prettier with prettier-plugin-organize-imports to format and sort/combine import statements.
Does a solution like that work for your project?
If you'd like to submit a pull request to implement this, I am open to it. The code that brings in the new import statements is here.