Greater-London-Authority / ldn-viz-tools

https://greater-london-authority.github.io/ldn-viz-tools/
1 stars 0 forks source link

don't auto-remove imports on save in VSCode #191

Closed jamesscottbrown closed 8 months ago

jamesscottbrown commented 9 months ago

What does this change?

After this change, VScode will still auto-sort imports on save, but won't automatically remove any unused imports.

Why?

Automatically removing imports can be quite annoying - for example, when commenting out a sction of code duing debugging.

ChrisKnightLDN commented 8 months ago

As annoying as this is, I would advocate that we keep it. Having unused imports in files, or manually having to groom imports is more annoying imo. Or at least it's worth the pain.

jamesscottbrown commented 8 months ago

I think eslint will still warn about the unused imports, to tell you to remove them before committing/merging.

Unused imports should be removed before commiting/merging, but removing them on every save seems unnecessary.