import statements are removed on save
-
When preparing adding import statements (like firebase), they are removed on save. I assume this happens because the imported code is not yet used anywhere. However, I would like to keep all imports for now and remove them later.
Is there a way to toggle that feature on/off?
Or do I have to do something else to keep the imports even when they are not used yet?
Thank you! -
I don’t think Quasar does this (directly). Probably your IDE ( or a plugin). Could be eslint if you enabled
--fix
. Or Prettier…( but I doubt it’s either eslint or prettier removing imports) -
Here is what I observed further:
- it only happens, when a npm script (like “npm run dev”) is running
- it is not a Vetur setting ( “vetur.completion.autoImport”: false )
- rules like /* eslint-disable / import … / eslint-enable */ do not work
- no changes, when
parserOptions: { allowImportExportEverywhere: true }
is set
I do not use Prettier…
This is incredibly annoying…