False positive: Remove this unused import of with Vue.js

Hi SonarTeam,

we have a mass of false positives in “Unnecessary imports should be removed typescript:S1128” in our Quality-Gate issues list.

Mainly caused in Vue 3 Single-File-Components with <script setup> and TypeScript, e.g.:

Version: SonarQube Server Developer Edition v2025.1 (102418)
Deployed via Docker

I use VSCode with Connected Mode to SonarQube, so I see these errors everywhere during development also.

Is there a way to fix this?

Best Regards,
ElSuture

Hi ElSuture,

Can we have a text reproducer? I’m looking to be able to copy/paste a code snippet into a file to get this same issue.

 
Thx,
Ann