Galooshi / import-js

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

Bug: cannot auto import #538

Closed tung-eh closed 7 months ago

tung-eh commented 4 years ago

Importjs will not works whenever I used this kind of syntax for omitting array value

  const [, b] = [1, 2];
mikabytes commented 7 months ago

Hmm, I could not reproduce this bug. For example if I have two files:

// b.js
const [, b] = [1, a];

// a.js
const a = 5;
export default a;

and then run

importjs fix b.js

Then it adds the line

import a from './a.js'

So I'll close this for now, but if this is still relevant for you then please reopen this issue with steps on how to reproduce. Thanks!