SonarQube reports false unused imports in Vue3 Composition API


I’ve recently created a new Vue 3 project and was playing around with the new script setup.
But SonarQube doesn’t seem to be able to match import in the script setup and its usage in the template.
In all my .vue using imports, SonarQube was giving false negative.

I’ve put a link below to the github repo to recreate the issue.

  • Scanner version : sonar-scanner-cli-
  • Docker SonarQube version :

Github repo : sonique

Thanks in advance for your time,


1 Like

Yep, same issue for me. Also reports issues when importing *.vue components.

I believe SonarQube uses vue-eslint-parser to report these things according to this link:

According to their release notes, vue-eslint-parser has implemented support for Vue’s new <script setup> syntax on July 1:

Sonar devs, please update this dependency to support Vue’s new SFC syntax. You can find the rfc for it here: