-
-
Notifications
You must be signed in to change notification settings - Fork 681
vue/no-deprecated-slot-attribute
conflicts with web component named slots
#2710
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
Comments
That is exactly what I would recommend in this situation. How would this plugin be able to distinguish web components and Vue components, to allow the |
Hi @FloEdelmann |
I think keeping it enabled is most helpful for most users; few people will mix Vue components and web components in their code base. So I'll close this issue as won't fix. But if you think the documentation could be more clear about this case, feel free to open a PR! |
I understand the reasoning behind keeping the rule enabled by default. However, I'd like to propose a more flexible solution for projects that use Web Components alongside Vue, particularly those using the Ionic Framework, which relies on native Currently, the 🧩 Proposed Improvements1. Support
|
Supporting regexes in the |
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
Vue has a documented limitation when using named slots with web components. If a web component that accepts a named slot is used in a Vue app, the
vue/no-deprecated-slot-attribute
linting rule conflicts with this behavior.https://vuejs.org/guide/extras/web-components#slots
What actually happened?
Since we must use the native slot attribute when working with named slots in web components and vue, consumers will encounter the following linting error unless it is explicitly disabled:
Repository to reproduce this issue
The issue can be reproduced in this nuxt@3 example
To see the lint error:
Navigate to the nuxt-app directory:
Run the following command and you should be able to see the error:
The text was updated successfully, but these errors were encountered: