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: Prevent spread operator from disabling the rule #2456

Merged
merged 2 commits into from
May 9, 2024

Conversation

GuillaumeGuerinPP
Copy link
Contributor

The rule vue/require-default-prop return an error for all optional props when using withDefaults and a spread operator as second argument

image

The rule seems to return an empty object if something different from Property is found. Ignoring it instead will allow the check for at least props defined in the file

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Could you please add one valid and one invalid test case to to the rule tests?

@GuillaumeGuerinPP
Copy link
Contributor Author

GuillaumeGuerinPP commented Apr 26, 2024

Thanks for the fix! Could you please add one valid and one invalid test case to to the rule tests?

Thanks for your quick answer 🙌 Test added here : edceab2

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me!

@FloEdelmann FloEdelmann requested a review from ota-meshi April 26, 2024 11:33
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.

LGTM! Thank you!

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.

3 participants