9 Trailing newlines in non-empty files are a common UNIX idiom. Benefits of
10 trailing newlines include the ability to concatenate or append to files as well
11 as output files to the terminal without interfering with shell prompts.
15 This rule enforces at least one newline (or absence thereof) at the end
18 Prior to v0.16.0 this rule also enforced that there was only a single line at
19 the end of the file. If you still want this behavior, consider enabling
20 [no-multiple-empty-lines](no-multiple-empty-lines) with `maxEOF` and/or
21 [no-trailing-spaces](no-trailing-spaces).
23 Examples of **incorrect** code for this rule:
28 /*eslint eol-last: ["error", "always"]*/
30 function doSomething() {
37 Examples of **correct** code for this rule:
42 /*eslint eol-last: ["error", "always"]*/
44 function doSomething() {
53 This rule has a string option:
55 * `"always"` (default) enforces that files end with a newline (LF)
56 * `"never"` enforces that files do not end with a newline
57 * `"unix"` (deprecated) is identical to "always"
58 * `"windows"` (deprecated) is identical to "always", but will use a CRLF character when autofixing
60 **Deprecated:** The options `"unix"` and `"windows"` are deprecated. If you need to enforce a specific linebreak style, use this rule in conjunction with `linebreak-style`.