# SonarLint for JetBrains IDEs: false positive for unused import in Vue 3 with \<script setup\>

**URL:** <https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175>\
**Category:** Report False-positive / False-negative...\
**Created:** [April 25, 2022, 12:35pm UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175 "2022-04-25T12:35:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![linkurzweg](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@linkurzweg](https://community.sonarsource.com/u/linkurzweg)\
**Post date:** [April 25, 2022, 12:35pm UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/1 "2022-04-25T12:35:47Z")

</div>

I am using the latest version of WebStorm with version 6.7.0.45926 of the SonarLint plugin and the plugin shows imported files as unimported when using the script setup syntax and kebap-case for the imported component in the template:

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/e/4/e4e84290d9f558887201a174470d4f8a0a31a881.png)

Reproducible example here: [vue3-webstorm-example/App.vue at main · linkurzweg/vue3-webstorm-example · GitHub](https://github.com/linkurzweg/vue3-webstorm-example/blob/main/src/App.vue)

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 25, 2022, 2:16pm UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/2 "2022-04-25T14:16:38Z")

</div>

Hey there.

Please make sure to read this post:

> [@How to Report a False-positive / False-negative](https://community.sonarsource.com/t/how-to-report-a-false-positive-false-negative/37022):
>
> Hey SonarSource Community! [False-positives happen](https://blog.sonarsource.com/false-positives-our-enemies-but-maybe-your-friends), as do false-negatives, and we’re eager to fix them. We are thrilled when our users report problems, so we can make our products better. What is a false-positive (FP)? A false-positive is when an issue is raised unexpectedly on code that should not trigger an issue, or where the suggested action doesn’t make any sense for the code. What is a false-negative (FN)? A false-negative is when an issue should be raised on a piece of code, but isn’t. …

Specifically, we are missing a reproducible code/project sample (that is not a screenshot).

It would also be useful to know if you are using Connected Mode with SonarLint (connecting to SonarQube or SonarCloud).

---

<div class="post-metadata">

**Author:** ![linkurzweg](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@linkurzweg](https://community.sonarsource.com/u/linkurzweg)\
**Post date:** [April 25, 2022, 2:39pm UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/3 "2022-04-25T14:39:03Z")

</div>

Sorry, reproducible example here: [vue3-webstorm-example/App.vue at main · linkurzweg/vue3-webstorm-example · GitHub](https://github.com/linkurzweg/vue3-webstorm-example/blob/main/src/App.vue)

I am importing `HelloWorldComponent` here and use it in the template as `<hello-world-component />`. The false positive seems to only appear when I use kebap-case in the template with a component name that consists of more than two words.

I’m currently not using Connected Mode, since we are still running an older version of SonarQube on our servers that reports a lot of false positives.

---

<div class="post-metadata">

**Author:** ![Yassin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/yassin/32/36096_2.png) [@Yassin](https://community.sonarsource.com/u/Yassin)\
**Post date:** [April 28, 2022, 10:16am UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/6 "2022-04-28T10:16:19Z")

</div>

Hello Lin,

Welcome to the Sonar community, and thank you for your feedback!

As you rightfully pointed out, false positives are raised whenever one refers to imported Vue components using the kebab case with more than two words. In that regard, I created this [ticket](https://github.com/SonarSource/SonarJS/issues/3125) to address that as soon as possible.

Thank you,  
Yassin

---

<div class="post-metadata">

**Author:** ![linkurzweg](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@linkurzweg](https://community.sonarsource.com/u/linkurzweg)\
**Post date:** [April 28, 2022, 11:07am UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/8 "2022-04-28T11:07:01Z")

</div>

Hello Yassin,

thank you very much! I will subscribe to the GitHub issue.

Cheers  
Lin

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [May 5, 2022, 11:07am UTC](https://community.sonarsource.com/t/sonarlint-for-jetbrains-ides-false-positive-for-unused-import-in-vue-3-with-script-setup/62175/9 "2022-05-05T11:07:34Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
