# no-dupe-keys

Rule `vue/no-dupe-keys`. Disallow duplication of field names

- Source: vue
- Technologies: Vue
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 41.6M weekly downloads of presets that enable it
- Trend: +89.3% last quarter
- Rank: #404 by reach, #300 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-dupe-keys` | yes | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-dupe-keys.html) |
| Oxlint | `vue/no-dupe-keys` | no | no | plugin `vue`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/vue/no-dupe-keys.html) |
| Biome | `correctness/noVueDuplicateKeys` | yes | no | group correctness, since 2.2.5 | [docs](https://biomejs.dev/linter/rules/no-vue-duplicate-keys/) |

## Code examples

### Incorrect: the rule reports this

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

### Correct: the rule accepts this

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

Examples from the Oxlint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-dupe-keys": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "vue"
  ],
  "rules": {
    "vue/no-dupe-keys": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noVueDuplicateKeys": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Vue recommended](https://lintradar.dev/presets/vue-recommended.md) | ESLint | `eslint-plugin-vue` | 118 | 9.5M | +46.6% |
| [Vue essential](https://lintradar.dev/presets/vue-essential.md) | ESLint | `eslint-plugin-vue` | 85 | 9.5M | +46.6% |
| [Vue strongly recommended](https://lintradar.dev/presets/vue-strongly-recommended.md) | ESLint | `eslint-plugin-vue` | 110 | 9.5M | +46.6% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |

## Related rules

- [eslint/no-dupe-keys](https://lintradar.dev/rules/eslint/no-dupe-keys.md): Disallow duplicate keys in object literals
- [vue/require-default-prop](https://lintradar.dev/rules/vue/require-default-prop.md): Require default value for props
- [vue/require-prop-types](https://lintradar.dev/rules/vue/require-prop-types.md): Require type definitions in props
- [vue/this-in-template](https://lintradar.dev/rules/vue/this-in-template.md): Disallow usage of `this` in template
- [vue/no-v-html](https://lintradar.dev/rules/vue/no-v-html.md): Disallow use of v-html to prevent XSS attack
- [vue/no-lone-template](https://lintradar.dev/rules/vue/no-lone-template.md): Disallow unnecessary `<template>`

---

Web page: https://lintradar.dev/rules/vue/no-dupe-keys. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
