`Fix all imports` removes star imports (* as)
See original GitHub issueHi, how are you? 😊
First, I want to thank you so much for the 2.0 release, Auto import named exports is amazing!
Lately, I encountered a regression where calling importjs: fix all imports removes all import expression with * as syntax
I’m not 100% sure, but I believe that it starts with v2.0.0, where earlier versions (v1.1.2) works fine.
Steps to reproduce:
- Create 2 files:
// api.js
export function get () {
// ....
}
export function post () {
// ....
}
// index.js
import * as api from './api'
api.get()
- Call
importjs: fix all importson index.js
Results:
// index.js
api.get()
Tested on:
- Sublime Text 3
- node
v6.6.0 - importjs
2.1.0 - macOS sierra
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
`source.fixAll` (Fix All command) removes unused imports ...
Pylance recently added fix all for unused import. let me take a look and make sure we don't remove unused imports whose diagnostic...
Read more >Auto import | IntelliJ IDEA Documentation - JetBrains
The Optimize Imports feature helps you remove unused imports and organize import statements in the current file or in all files in a ......
Read more >How to organize import in Eclipse but not *change* star imports
In the Unnecessary Code tab uncheck the Remove unused imports checkbox; Click OK and Apply and Save to close both dialogs. Share.
Read more >Why you should disable wildcard imports in IntelliJ IDEA
The default behavior of IntelliJ IDEA is to replace multiple class imports from a package with a star/wildcard/asterisk.
Read more >zimports - PyPI
no star imports (e.g. from <foo> import *); these are rewritten as explicit names, by importing all the names from each target module...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I use Sublime Text 3. As much as I’d like to try something new, it’s hard to let go after I configured every inch of it 😆
At first glance, looks like it works I’ll test it more thoroughly tomorrow, and let you know if I find anything funny.
It’s been a few busy days for me lately, Finally manage to find some free time.
Seems like all works as expected regarding the import behavior. One thing I noticed is that the exclude list is ignored. I created a separate issue for it: #375
Will let you know if I find anything else (: