Skip to content

Conversation

@ota-meshi
Copy link
Member

This PR adds vue/no-dupe-v-else-if rule.

vue/no-dupe-v-else-if rule disallows duplicate conditions in the same v-if / v-else-if chain.

<template>
  <!-- ✗ BAD -->
  <div v-if="isSomething(x)" />
  <div v-else-if="isSomething(x)" />

  <!-- ✓ GOOD -->
  <div v-if="isSomething(x)" />
  <div v-else-if="isSomethingElse(x)" />
</template>

this rule was inspired by no-dupe-else-if rule.

@ota-meshi ota-meshi self-assigned this Jul 9, 2020
@ota-meshi ota-meshi merged commit fec4e41 into master Jul 14, 2020
@ota-meshi ota-meshi deleted the add-rule/no-dupe-else-if branch July 14, 2020 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants