Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.1 KB

File metadata and controls

57 lines (38 loc) · 1.1 KB

ember/template-template-length

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>

Related rules

References