You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If both <script setup> and regular <script> sections are present, the latter will be ignored by no-undef-properties rule. To reproduce, go the rule's page on the website and paste the following snippet in the editor:
<template>
<!-- ✓ GOOD -->
<div>{{ name }}: {{ count }}</div>
<!-- ✗ BAD -->
<div>{{ label }}: {{ cnt }}</div>
<!-- From <script>: -->
{{ myComputed }}
</template>
<script>exportdefault { computed: {myComputed() {return'any'; }, },};</script><scriptsetup>constprop=defineProps(['name', 'def'])let count =0/* ✓ GOOD */watch(() =>prop.def, () =>console.log('Updated!'))/* ✗ BAD */watch(() =>prop.undef, () =>console.log('Updated!'))</script>
If you then remove <script setup> section, myComputed will be recognized.
What did you expect to happen?
Properties from both <script setup> and <script> sections are recognized by this rule.
The text was updated successfully, but these errors were encountered:
Checklist
Tell us about your environment
What did you do?
If both
<script setup>
and regular<script>
sections are present, the latter will be ignored byno-undef-properties
rule. To reproduce, go the rule's page on the website and paste the following snippet in the editor:If you then remove
<script setup>
section,myComputed
will be recognized.What did you expect to happen?
Properties from both
<script setup>
and<script>
sections are recognized by this rule.The text was updated successfully, but these errors were encountered: