JS.VUE.REQUIRE.TOGGLE.INSIDE.TRANSITION

Require control the display of the content inside '<transition>'

Rule Details

This rule reports elements inside <transition> that do not control the display.

{'vue/require-toggle-inside-transition': ['error']}

Copy
<template>
  <!-- GOOD -->
  <transition><div v-if="show" /></transition>
  <transition><div v-show="show" /></transition>

  <!-- BAD -->
  <transition><div /></transition>
</template>

Options

Nothing.

Further Reading

  • Vue RFCs - 0017-transition-as-root (https://github.com/vuejs/rfcs/blob/master/active-rfcs/0017-transition-as-root.md)

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/