WebStorm removes imports entirely instead of updating them

Often, when I start typing a new type, the IDE provides a list of candidates in the intelli-sense dropdown. When I select the desired type, the IDE removes all the existing types from the imports.

I can share a video. Not sure how to upload it, though.

Can you please help me? This behavior is quite annoying, as you can imagine. It feels like my WebStorm has turned into VSCode.

0
3 comments

Please could you elaborate on your setup? Do you use Prettier + prettier-plugin-organize-imports  in your project? If yes, could you check if updating the prettier-plugin-organize-imports package as advised in https://youtrack.jetbrains.com/issue/WEB-50178/Code-reformat-with-prettier-and-prettier-plugin-organize-imports-deletes-imports-if-Optimize-imports-is-enabled#focus=Comments-27-8352541.0-0 helps?

0

Elena Pogorelova, thank you so much. Your advice has helped me again. I think you are one of the reasons I use JetBrains IDEs for about 15 years ❤️ I think it's been only you who helped me solve my noob problems 😊

0
Glad to hear it helped!
0

Please sign in to leave a comment.