Optimize imports (Alt-Ctrl-O) removes unused imports and merges imports from the same module into one statement.
And it can also sort imports by the module name – enable this option in the Imports section of the IDE Code Style settings. #WebStormTippic.twitter.com/Ps0op5g3on
It's pretty interesting that ESLint decided to distinguish between imports with single and multiple symbols and not between imports from files and node modules or between named and default imports...
-
-
I personally think that organizing imports by alphanumeric makes the most sense because I’m a human being and alphanumeric sorting is the most natural and effortless way to sort (and find) names. It’s really irrelevant where the import came from.
-
This we can do actually. If you have 'sort-imports' option enabled in your ESLint config file, WebStorm will enable alphanumeric sorting when ESLint code style rules are applies.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.