soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165 stars 62 forks source link

Doesn't pick up default export when it there is an export of the same name in the same file #100

Open ghost opened 5 years ago

ghost commented 5 years ago

A library we work with has this common pattern:

SomeComponent.tsx:

export function SomeComponent() {};

export default = wrap(SomeComponent, withSomethingElse);

Now when I type:

<SomeCom

and trigger this plugin I get the popup that has the correct file, but only one entry, and when I import I get:

import { SomeComponent } from 'path/to/Component.tsx';

While I usually want:

import SomeComponent from 'path/to/Component.tsx';

I think both options should be in the drop-down in this case.