# no-use-v-else-with-v-for

Rule `vue/no-use-v-else-with-v-for`. Disallow using `v-else-if`/`v-else` on the same element as `v-for`

- Source: vue
- Technologies: Vue
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1841 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-use-v-else-with-v-for` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html) |
| Biome | `correctness/noVueVIfWithVFor` | yes | no | group correctness, since 2.3.6 | [docs](https://biomejs.dev/linter/rules/no-vue-v-if-with-v-for/) |

## Code examples

### Incorrect: the rule reports this

```vue
  <div v-if="foo">foo</div>
  <div v-else-if="bar" v-for="x in xs">{{ x }}</div>
  <div v-else v-for="x in xs">{{ x }}</div>
</template>
```

### Correct: the rule accepts this

```vue
<div v-if="foo">foo</div>
<template v-else-if="bar">
  <div v-for="x in xs">{{ x }}</div>
</template>
<template v-else>
  <div v-for="x in xs">{{ x }}</div>
</template>
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-use-v-else-with-v-for": "error",
    },
  },
];
```

### Biome: `biome.json`

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

## Related rules

- [vue/no-undef-properties](https://lintradar.dev/rules/vue/no-undef-properties.md): Disallow undefined properties
- [vue/no-useless-concat](https://lintradar.dev/rules/vue/no-useless-concat.md): Disallow unnecessary concatenation of literals or template literals in `<template>`
- [vue/no-undef-directives](https://lintradar.dev/rules/vue/no-undef-directives.md): Disallow use of undefined custom directives
- [vue/no-v-text](https://lintradar.dev/rules/vue/no-v-text.md): Disallow use of v-text
- [vue/no-template-target-blank](https://lintradar.dev/rules/vue/no-template-target-blank.md): Disallow target="_blank" attribute without rel="noopener noreferrer"
- [vue/prefer-prop-type-boolean-first](https://lintradar.dev/rules/vue/prefer-prop-type-boolean-first.md): Enforce `Boolean` comes first in component prop types

---

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