Closed ylc395 closed 2 months ago
If this feature request is acceptable, I can submit a PR.
If this is possible without much code, then yes, please submit a PR! Make sure to also include test cases (valid and invalid ones) to verify the implementation.
I almost finish the PR, but I notice that just use comment like this:
<template>
<Bar />
</template>
<script>
// @vue/component
@Component({
components: { Bar }
})
export default class Foo {}
</script>
will solve this problem.
So I think we do not need support Vue class component on purpose in this case. All we should do is to add an example about Vue class component in doc
Feel free to open a PR to improve the docs!
OK, please check #2561
What rule do you want to change? vue/no-undef-components
Does this change cause the rule to produce more or fewer warnings? fewer warning
How will the change be implemented? (New option, new default behavior, etc.)? New default behavior
Please provide some example code that this change will affect:
What does the rule currently do for this code? trigger a vue/no-undef-components warning, which is incorrect
What will the rule do after it's changed? do nothing