Is it possible to enable source.organizeImports without removing unused imports?
P粉116631591
P粉116631591 2023-10-30 21:50:21
0
2
664

This is the content in my user settings.json.

"editor.codeActionsOnSave": {
  "source.organizeImports": true
},

Like this ordering, but don't like that Visual Studio Code removes unused imports instead of graying them out.

P粉116631591
P粉116631591

reply all(2)
P粉311617763

Finally possible in 2021.

Replace source.organizeImports with source.sortImports.

"editor.codeActionsOnSave": {
  "source.sortImports": true
},
P粉006847750

Currently this is not possible. See https://github.com/microsoft/TypeScript/issues/36085 p>

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template