---
url: /docs/guide/usage/linter/rules/vue/no-dupe-keys.md
---

### What it does

Disallow duplication of field names.

### Why is this bad?

Duplicate keys in Vue component options (props, data, computed, methods, setup)
can cause unexpected behavior because they may overwrite each other at runtime,
and they cause name collisions in the template.

### Examples

Examples of **incorrect** code for this rule:

```vue
<script>
export default {
  props: ["foo"],
  computed: {
    foo() {},
  },
};
</script>
```

Examples of **correct** code for this rule:

```vue
<script>
export default {
  props: ["foo"],
  computed: {
    bar() {},
  },
};
</script>
```

## Configuration

### groups

type: `string[]`

default: `[]`

Additional group names to search for duplicate keys in, on top of the
built-in `props`, `computed`, `data`, `methods` and `setup` groups.

## How to use

## Version

This rule was added in v1.70.0.

## References
