Closed
Description
Please describe what the rule should do:
Warn against components that appear in the template but not defined/imported in script-setup
What category should the rule belong to?
[ ] Enforces code style (layout)
[X] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
// Bad: OtherComponent not defined
<template>
<div>
<SomeComponent />
<OtherComponent />
</div>
</template>
<script setup>
import SomeComponent from '@/components/SomeComponent.vue'
</script>
//Good:
<template>
<div>
<SomeComponent />
<OtherComponent />
</div>
</template>
<script setup>
import SomeComponent from '@/components/SomeComponent.vue'
import OtherComponent from '@/components/OtherComponent.vue' // or: const OtherComponent = xxx.
</script>
//Also Good:
<template>
<div>
<some-component />
<other-component />
</div>
</template>
<script setup>
import SomeComponent from '@/components/SomeComponent.vue'
import OtherComponent from '@/components/OtherComponent.vue' // or: const OtherComponent = xxx.
</script>
Additional context
This is like the script-setup version of "no-unregistered components" rule