Skip to content

vue/no-negated-v-if-condition

disallow negated conditions in v-if/v-else

  • 💡 Some problems reported by this rule are manually fixable by editor suggestions.

📖 Rule Details

This rule disallows negated conditions in v-if and v-else-if directives which have an v-else branch.

Negated conditions make the code less readable. When there's an else clause, it's better to use a positive condition and switch the branches.

Now loading...

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-vue v10.4.0

🔍 Implementation