We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vue/no-dupe-keys
What rule do you want to change?
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
I think it should be the default behavior.
Please provide some example code that this change will affect:
Here is a simple example (BTW, removing the intermediate withPrefix computed makes the error to disappear on const messages = ...).
withPrefix
const messages = ...
<template> <div v-for="message of messages" :key="message">{{ message }}</div> </template> <script lang="ts" setup> import { computed } from 'vue'; const { messages: _messages } = defineProps<{ messages: string[] }>() const withPrefix = computed(() => _messages.map(message => `→ ${message}`)) const messages = computed(() => withPrefix.value.map(message => `${message} ←`)) </script>
What does the rule currently do for this code?
ESLint: Duplicate key 'messages'. May cause name collision in script or template tag. (vue/no-dupe-keys)
What will the rule do after it's changed?
No warning nor error since the destructured prop is intentionally renamed.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What rule do you want to change?
vue/no-dupe-keys
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
I think it should be the default behavior.
Please provide some example code that this change will affect:
Here is a simple example (BTW, removing the intermediate
withPrefix
computed makes the error to disappear onconst messages = ...
).What does the rule currently do for this code?
What will the rule do after it's changed?
No warning nor error since the destructured prop is intentionally renamed.
The text was updated successfully, but these errors were encountered: