Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.39 KB

File metadata and controls

56 lines (35 loc) · 1.39 KB

ember/template-eol-last

🔧 This rule is automatically fixable by the --fix CLI option.

Require or disallow newline at the end of template files.

Rule Details

This rule enforces at least one newline (or no newline) at the end of template files.

Config

This rule accepts a single string option:

  • "always" (default) — enforces that template files end with a newline
  • "never" — enforces that template files do not end with a newline

Examples

Examples of incorrect code with the default "always" config:

<div>test</div>

Examples of correct code with the default "always" config:

<div>test</div>
{{! newline at end of file }}

Examples of incorrect code with the "never" config:

<div>test</div>
{{! trailing newline not allowed }}

Examples of correct code with the "never" config:

<div>test</div>

Related Rules

References