Closed matthew-dean closed 1 year ago
ESLint does not have access to other file's contents, so this rule cannot work properly when referencing the script from another file. Volar / TypeScript on the other hand do have access to the whole project, but ESLint is separate.
Since there is nothing we can do, I'll close this issue.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
I have a file called
Links.vue
. It has a tag like:That component exports a component setup like:
However, when this rule is enabled and I use' component has been used, but not defined.
MetadataTemplate
, I get: `The 'This is definitely an error, as TypeScript / Volar is able to determine the type of
MetadataTemplate
in the<template>
block.What did you expect to happen? I expected defined components to be understood as defined, even if the script is referenced externally.
What actually happened?
The '<MetadataTemplate>' component has been used, but not defined.eslint[vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components.html)
Repository to reproduce this issue
I spent a while trying to set up CodeSandbox with a working version of ESLint / Vite / TypeScript / Vue3 and an external code source, but CodeSandbox itself didn't seem to want to do this. So, maybe this issue will be auto-closed, but at least it'll be searchable by someone else?