vue/no-undef-components
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-undef-components": "error",
},
},
]; <Bar />
</template><template>
<div>
<h2>Lorem ipsum</h2>
<TheModal />
</div>
</template>
<script>
export default {
components: {}
}
</script> <Bar />
</template><Foo /><template>
<div>
<h2>Lorem ipsum</h2>
<the-modal>
<component is="TheInput" />
<component :is="'TheDropdown'" />
<TheButton>CTA</TheButton>
</the-modal>
</div>
</template>
<script>
import TheButton from 'components/TheButton.vue'
import TheModal from 'components/TheModal.vue'
import TheInput from 'components/TheInput.vue'
import TheDropdown from 'components/TheDropdown.vue'
export default {
components: {
TheButton,
TheModal,
TheInput,
TheDropdown,
}
}
</script><CustomComponent />Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/no-undef-components
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-undef-components": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow unsupported Vue.js syntax on the specified version