Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vue/no-dupe-v-else-if rule #1239

Merged
merged 1 commit into from Jul 14, 2020
Merged

Add vue/no-dupe-v-else-if rule #1239

merged 1 commit into from Jul 14, 2020

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.

None yet

1 participant