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(no-deprecated-slot-attribute): no fix for dynamic components #2530

Merged

Conversation

privatenumber
Copy link
Contributor

Warning: I made this PR on top of #2529 but I needed to open a PR against the master branch for it to show up in this repo

The #slot syntax doesn't work when passed into a native HTML <div> element for obvious reasons.

However, the old slot="name" syntax works... Demo

This can happen (and has happened in my work project) when a dynamic component renders a div to fallback when certain conditions aren't met:

@privatenumber privatenumber changed the title fix(no-deprecated-slot-attribute): handle v-for with dynamic slot fix(no-deprecated-slot-attribute): no fix for dynamic components Aug 15, 2024
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.

I agree, it makes sense to skip the autofix in this case. Thanks for submitting this patch!

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

@ota-meshi ota-meshi merged commit 21d3ed8 into vuejs:master Sep 2, 2024
12 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants