pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue-pug/no-pug-control-flow |
disallow pug control flow features. |
disallow pug control flow features.
- ❗ This rule has not been released yet.
- ⚙️ This rule is included in all of
"plugin:vue/vue3-strongly-recommended"
,"plugin:vue/strongly-recommended"
,"plugin:vue/vue3-recommended"
and"plugin:vue/recommended"
.
This rule aims to prevent usage of pug control flow syntax like conditionals, loops and code. They break further linting and have better vue equivalents.
Forbidden pug features/syntax are:
- code
if
,else if
,else
conditionalseach
,for
,while
iterationcase
,when
case- includes
extends
,block
inheritance- interpolation
- mixins
<template lang="pug">
// ✗ BAD
- var foo = 'bar'
if foo
p= foo
else
each bar in foo
</template>
Nothing.