8 Trailing newlines in non-empty files are a common UNIX idiom. Benefits of
9 trailing newlines include the ability to concatenate or append to files as well
10 as output files to the terminal without interfering with shell prompts.
14 This rule enforces at least one newline (or absence thereof) at the end
17 Prior to v0.16.0 this rule also enforced that there was only a single line at
18 the end of the file. If you still want this behavior, consider enabling
19 [no-multiple-empty-lines](no-multiple-empty-lines) with `maxEOF` and/or
20 [no-trailing-spaces](no-trailing-spaces).
22 Examples of **incorrect** code for this rule:
27 /*eslint eol-last: ["error", "always"]*/
29 function doSomething() {
36 Examples of **correct** code for this rule:
41 /*eslint eol-last: ["error", "always"]*/
43 function doSomething() {
52 This rule has a string option:
54 * `"always"` (default) enforces that files end with a newline (LF)
55 * `"never"` enforces that files do not end with a newline
56 * `"unix"` (deprecated) is identical to "always"
57 * `"windows"` (deprecated) is identical to "always", but will use a CRLF character when autofixing
59 **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`.