I'm in Atom, with v0.3.0 of atom-import-js with the default settings (via no settings file). I'm able to get cmd-shift-J to reliably insert duplicate imports if the import that's already present either ends with a semicolon, or has the file extension in it.
I'm in a file like this, with a sibling file AppView.js which exports AppView:
import AppView from './AppView'
const Test = AppView;
If I cursor over AppView in line 3 and hit cmd-shift-J, I end up with this:
import AppView from './AppView';
import AppView from './AppView'
const Abc = AppView;
Same with importing from ./AppView.js. If I match the expectations from the default settings and provide import AppView from './AppView'; then it works correctly.
I'm in Atom, with v0.3.0 of atom-import-js with the default settings (via no settings file). I'm able to get cmd-shift-J to reliably insert duplicate imports if the import that's already present either ends with a semicolon, or has the file extension in it.
I'm in a file like this, with a sibling file AppView.js which exports AppView:
If I cursor over
AppView
in line 3 and hit cmd-shift-J, I end up with this:Same with importing from
./AppView.js
. If I match the expectations from the default settings and provideimport AppView from './AppView';
then it works correctly.