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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GuillaumeGuerinPP
Copy link

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
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!

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