-
-
Notifications
You must be signed in to change notification settings - Fork 681
Improve error message for vue/no-dupe-keys
#2247
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
Actually I think this is intended behavior because there would be a conflict in the It just caught me off guard because my code wasn't throwing these errors until I updated eslint/prettier/plugins/etc. Before that, anywhere where I was using duplicate props and imports, I was only using them in |
Re-opening this because maybe the error message could be better? Took me a minute to realize what was going on. Or maybe there could be some kind of option to ignore if the duplicates don't actually lead to a conflict? Not sure how hard that would be to implement. |
Yes, the rule is working as intended. Could you suggest a better error message? |
vue/no-dupe-keys
This might not be consistent with the brevity or granularity of the other error messages, but I might try something like:
Alternatively, and perhaps more appropriately, just update the docs page. Checking this page was the first thing I did, and some clarification could've helped.
Elaborating on this (in general I think rules descriptions should be more than 1 terse sentence):
|
I think both changes are a good improvement! Would you fancy opening a PR? |
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
These two names are in different contexts, and don't refer to the same thing. I'm not sure if this is expected behavior, but if it is, I find that a little weird, because they don't really conflict.
Repository to reproduce this issue
dupe keys.zip
The text was updated successfully, but these errors were encountered: