- ⚙️ This rule is included in all of
"plugin:vue/essential"
,"plugin:vue/strongly-recommended"
and"plugin:vue/recommended"
.
This rule prevents to use duplicated names.
This rule is aimed at preventing duplicated property names.
👎 Examples of incorrect code for this rule:
export default {
props: {
foo: String
},
computed: {
foo: {
get () {}
}
},
data: {
foo: null
},
methods: {
foo () {}
}
}
👍 Examples of correct code for this rule:
export default {
props: ['foo'],
computed: {
bar () {}
},
data () {
return {
baz: null
}
},
methods: {
boo () {}
}
}
This rule has an object option:
"groups"
: [] (default) array of additional groups to search for duplicates.
"vue/no-dupe-keys": [2, {
groups: ["firebase"]
}]
👎 Examples of incorrect code for this configuration
export default {
computed: {
foo () {}
},
firebase: {
foo () {}
}
}