On the vue3 project, defineProps and defineEmits should be automatically available in <script setup>

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube enterprise 9.9
    vue 3
    node.js 14 and 16

  • how is SonarQube deployed: zip, Docker, Helm

  • what are you trying to achieve
    On the vue3 project, defineProps() and defineEmits() should be automatically available in .

On the vue2 project, undefined defineProps() and defineEmits() were used which should trigger rule S3827

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

I’ve moved your post to the section for reporting false-positives.

Can your review this post and adjust your post – specifically providing a text-based sample of code rather than a screenshot?

Which product(s) you’re using

SonarQube Enterprise edition 9.9

Which language you’re analyzing (and tag your post with the language!)


Which rule is affected


Why you believe it’s a false-positive / false-negative

Described in the following link:

We also need you to include a code sample

Vue3.zip (40.5 KB)

Hi @honghua ,

Thanks for bringing this to our attention. I created a ticket to better support Vue3 compiler macros.


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