Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.57 KB

File metadata and controls

57 lines (36 loc) · 1.57 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
  • "editorconfig" — requires or disallows a final newline based on the project's .editorconfig settings (via insert_final_newline); throws if insert_final_newline is not set
  • "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