Closed hibikiledo closed 6 years ago
with-issue.js
ImportJS: Fix Imports
import I18n from './common/I18n'; function Hello () { return I18n.t('key') }
import I18n from './common/I18n'; return I18n.t('key') }
I believe this is the issue with the extension. When calling importjs directly with the command below,
importjs
importjs fix ./src/with-issue.js
importjs returns the correct value of fileContent
fileContent
{"messages":["Imported I18n from './common/I18n'"],"fileContent":"import I18n from './common/I18n';\n\nfunction Hello () {\n return I18n.t('key')\n}\n","unresolvedImports":{}}
To reproduce the issue
with-issue.js
and useImportJS: Fix Imports
commandExpected Result
Actual Result
I believe this is the issue with the extension.
When calling
importjs
directly with the command below,importjs returns the correct value of
fileContent