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

Fix regression on no-unused-components rule #1909

Merged
merged 1 commit into from Jun 11, 2022
Merged

Fix regression on no-unused-components rule #1909

merged 1 commit into from Jun 11, 2022

Conversation

matthieumota
Copy link
Contributor

Hi,

I just saw that ES Lint no longer detects unused components in Vue. So I checked in the no-unused-components rule and noticed a change here.

Before, a filter was applied to get all unused components and throw an error in context for everyone.

But after PR, return stop for and check only first component if it is used. Rule stop and is useless at the moment. I think we want to continue in for for all registered components.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR!!
Could you add test cases to make sure this works?

@matthieumota
Copy link
Contributor Author

I've added a test when a component in middle is no present in template.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@ota-meshi ota-meshi merged commit cc35c58 into vuejs:master Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants