-
-
Notifications
You must be signed in to change notification settings - Fork 681
Extend vue/no-dupe-keys
to support <script setup>
#2096
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
vue/no-props-shadow
vue/no-prop-shadow
@nasvillanueva In this part, the rule vue/no-dupe-keys resolve this case. Maybe it would be better to extend |
I also think that |
vue/no-prop-shadow
vue/no-dupe-keys
to support <script setup>
I'm also seeing problems for reactive props destructuring https://blog.vuejs.org/posts/vue-3-3#reactive-props-destructure with |
Reactive props destructure is not supported in eslint-plugin-vue, since it is an experimental Vue feature. |
I see, thanks! |
Hi, I have the same problem with this comment, but not using reactive props destructure, just like this:
Should this case be considered? |
Same. Imho this is legit usage of duplicate keys and should not be considered for this rule. I had to deactivate this particular rule for now, as my whole project uses |
Indeed, this seems like a bug. A fix is already being worked on by @ota-meshi in #2189. |
Please describe what the rule should do:
Similar to ESLint's
no-shadow
rule, it would be great to have something similar, likevue/no-prop-shadow
where it would warn on local variable declaration that has the same name as a prop, which can lead to issues when referencing it in the template because props can be directly accessed from the template.What category should the rule belong to?
[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
WARN
WARN
Additional context
More context from the original issue:
The text was updated successfully, but these errors were encountered: