Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Detect missing component import for vue-tsc #1203

Closed
ahnpnl opened this issue Apr 15, 2022 · 2 comments
Closed

[Feature request] Detect missing component import for vue-tsc #1203

ahnpnl opened this issue Apr 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ahnpnl
Copy link
Contributor

ahnpnl commented Apr 15, 2022

Use case

I have a component like this

<template>
  <HelloWorld :msg="message" />
</template>

<script lang="ts" setup>
import { ref } from 'vue';

const message = ref();
</script>

Here I use the HelloWorld component which is NOT registered globally. It would be nice if vue-tsc can catch this.

Alternative solution

Currently I'm using https://eslint.vuejs.org/rules/no-undef-components.html#vue-no-undef-components to catch this error.

@alfeg
Copy link

alfeg commented Mar 5, 2024

Not sure if I read this read this correctly. But this feature is now not working, or maybe there is some configuration needed? @johnsoncodehk

@so1ve
Copy link
Member

so1ve commented Mar 6, 2024

Enable strictTemplates

"vueCompilerOptions": {
"strictTemplates": true
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants