This rule prevents to use reserved names from to avoid conflicts and unexpected behavior.
👎 Examples of incorrect code for this rule:
export default {
props: {
$el: String
},
computed: {
$on: {
get () {
}
}
},
data: {
_foo: null
},
methods: {
$nextTick () {
}
}
}
This rule has an object option:
"reserved"
: [] (default) array of dissalowed names inside groups
.
"groups"
: [] (default) array of additional groups to search for duplicates.
vue/no-dupe-keys: [2, {
reserved: ['foo']
}]
👎 Examples of incorrect code for this configuration
export default {
computed: {
foo () {}
}
}