ember/template-template-length

March 18, 2026 ยท View on GitHub

Enforce template size constraints.

Very long templates can indicate that markup should be split into smaller components. Very short templates can indicate that markup might be better inlined.

Config

This rule accepts either:

  • true / false
  • an object with:
    • max (integer): maximum allowed template length in lines
    • min (integer): minimum allowed template length in lines

Using true defaults to:

  • max: 200
  • min: 5

Examples

Examples of incorrect code for this rule:

<template>
  <div>short</div>
</template>

with config:

{ "min": 10 }

Examples of correct code for this rule:

<template>
  <div>line 1</div>
  <div>line 2</div>
  <div>line 3</div>
</template>

References