ember/template-eol-last
March 12, 2026 ยท View on GitHub
๐ง 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.editorconfigsettings (viainsert_final_newline); throws ifinsert_final_newlineis 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
- eol-last from eslint