Galooshi / import-js

A tool to simplify importing JS modules
MIT License
526 stars 70 forks source link

Variables aren't imported #480

Open trotzig opened 6 years ago

trotzig commented 6 years ago

Originally reported by @ivangeorgiew in #476, but moved here to better capture things:

Thanks, its working now. However I found other bugs with fixImports: Here MY_VAR isn't imported.

const bla = { keyName: obj[MY_VAR] } Desctructured aliases are imported, but they shouldn't be: myAlias shouldn't be imported.

const { prop: myAlias } = obj

trotzig commented 6 years ago

I've got a lot on my plate right now, so I won't get to this in a while. If anyone is willing to give it a go, here's a good commit to use for inspiration: https://github.com/Galooshi/import-js/commit/2f1ced713e863ec5bb9715ca1cf443741eb6ecb9