Repository navigation
fix(no-unused-components): match registered names the way Vue resolves components - #3248
Merged
ota-meshi merged 3 commits intoNov 30, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 799cff7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
FloEdelmann
requested changes
Nov 13, 2026
Contributor
Author
|
Thanks for the approval, @FloEdelmann. The branch is still clean against master and CI is green. Is there anything else you need from me before it can be merged? |
bardrop
force-pushed
the
fix-no-unused-components-resolution
branch
from
November 24, 2026 16:12
46dc7bc to
ea0b0d0
Compare
…s components Vue resolves a component used as `name` by trying the registered names `name`, its camelized form, and its capitalized camelized form. The rule also accepted a camelCase registration used as PascalCase (e.g. `myComp` used as `<MyComp>`), which Vue cannot resolve, so it missed a real runtime error. Fixes #1445
…ls, clarify docs note
…in no-unused-components and no-undef-components
bardrop
force-pushed
the
fix-no-unused-components-resolution
branch
from
November 29, 2026 21:12
ea0b0d0 to
799cff7
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1445
vue/no-unused-componentstreated amyCompregistration as used by<MyComp>. Vue can't resolve that:resolveAssetonly tries the used name, its camelized form, and its capitalized camelized form. So the rule stayed quiet while the component failed to resolve at runtime.The rule now marks a registration as used only if its name is one of those three forms of a used name, same as Vue.
<my-comp>,<myComp>and<MyComp>still find aMyCompregistration;<MyComp>no longer findsmyComp.A non-string
:isliteral (<component :is="null" />, which renders nothing) is no longer added as a used name. Before, it crashed the rule whenever a PascalCase or camelCase component was registered.:is="null"/:is="1".tscpass.