---
pageClass: rule-details
sidebarDepth: 0
title: vue/no-constant-condition
description: Disallow constant expressions in conditions in `<template>`
since: v7.5.0
---

# vue/no-constant-condition

> Disallow constant expressions in conditions in `<template>`

This rule is the same rule as core [no-constant-condition] rule but it applies to the expressions in `<template>`.

## :books: Further Reading

- [no-constant-condition]

[no-constant-condition]: https://eslint.org/docs/rules/no-constant-condition

## :rocket: Version

This rule was introduced in eslint-plugin-vue v7.5.0

## :mag: Implementation

- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-constant-condition.js)
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/no-constant-condition.js)

<sup>Taken with ❤️ [from ESLint core](https://eslint.org/docs/latest/rules/no-constant-condition)</sup>
