Fix multiple reporting of same warnings in vue/no-unregistered-component
#1382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi 馃憢 First, thank you for your work on this project 馃檹
It is my first open-source PR, I hope it is the right way to do.
Issue
In components' templates using multiple
<template>
to target namedslot
s, I noticed thevue/no-unregistered-component
linter warnings were repeated as many times as there are<template>
s, for the same unregistered components.It is not very convenient, especially for large projects ongoing refactoring.
Example
Would display these errors:
Potential fix
Quick fix I could find from the existing code is to only use the root
template
to report the errors.Resulting in the following warnings:
Changes
<template>
whose parent is of typeVDocumentFragment
(root template) to report the unregisteredComponents.