# vue/no-dupe-keys

disallow duplication of field names

  • ⚙️ 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.

# 📖 Rule Details

This rule is aimed at preventing duplicated property names.

<script> /* ✗ BAD */ export default { props: { foo: String }, computed: { foo: { get () {} } }, data: { foo: null }, methods: { foo () {} } } </script>
Now loading...

# 🔧 Options

{
  "vue/no-dupe-keys": ["error", {
    "groups": []
  }]
}
  • "groups" (string[]) Array of additional groups to search for duplicates. Default is empty.

# "groups": ["firebase"]

<script> /* ✗ BAD */ export default { computed: { foo () {} }, firebase: { foo () {} } } </script>
Now loading...

# 🔍 Implementation

Last Updated: 8/26/2019, 2:42:55 PM