# ember/template-eol-last 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). 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: ```hbs
test
``` Examples of **correct** code with the default `"always"` config: ```hbs
test
{{! newline at end of file }} ``` Examples of **incorrect** code with the `"never"` config: ```hbs
test
{{! trailing newline not allowed }} ``` Examples of **correct** code with the `"never"` config: ```hbs
test
``` ## Related Rules - [eol-last](https://eslint.org/docs/rules/eol-last) from eslint ## References - [ember-template-lint eol-last](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/eol-last.md) - [POSIX standard/line](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206) - [Wikipedia/newline](https://en.wikipedia.org/wiki/Newline#Interpretation)