vue/max-template-depth
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/max-template-depth": "error",
},
},
];<template>
<main-container>
<child-component>
<div />
</child-component>
<child-component>
<nested-component>
<div>
<div />
</div>
</nested-component>
</child-component>
</main-container>
</template><template>
<main-container>
<child-component>
<div />
</child-component>
</main-container>
</template>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/max-template-depth
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/max-template-depth": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce newlines between operands of ternary expressions in <template>
Enforce new lines between multi-line properties in Vue components
Require the registered component name to match the imported component name