Webstorm ES6 organize imports Follow
Hello,
we started using WebStorm and ES6 and I have some question about it:
1) Most annoying: why auto-import doesn't work. For example when I start typing Socket Def webstorm see it in code-completion box but when I chose it there is no entry like this
import SocketDef from '../../../src/lib/SocketDef';
WebStorm knows exaclly location beacuse I can simply jump to this code with "show source"
2) When I "Extract method" this method has wrong singature
class SocketDef {
constructor(name, type) {
this.name = name;
this.type = type;
}
}
goes to
class SocketDef {
constructor(name, type) {
this.name = name;
extracted.call(this, type);
}
function extracted(type) { //should be without function keeywork
this.type = type;
}
}
3) Completion behaviour.
Assertions.required(empty.id);
and now I want change require funciton to 'type', after dot i press 't' and press enter, I got
Assertions.type()required(empty.id);
How can I solve this issues. Maybe there is some settings?
Please sign in to leave a comment.
1. ES6 auto-imports are not yet supported, please vote for https://youtrack.jetbrains.com/issue/WEB-16144
2. logged as https://youtrack.jetbrains.com/issue/WEB-16872
3. Make sure to use Tab instead of Enter for choosing name from completion. This is a standard completion behavior: Enter inserts the text of the selected completion element, and Tab replaces the identifier after caret with the selected element. The keys can be swapped in Settings | Keymap