Skip to content

Commit

Permalink
Docs: On maxEOF with eol-last (fixes eslint#12742)
Browse files Browse the repository at this point in the history
Added an explanation on how and why maxEOF should be set to 0 to work with the eol-last rule.
  • Loading branch information
arthurdias-trad committed May 30, 2020
1 parent f858f2a commit 59d5d5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/no-multiple-empty-lines.md
Expand Up @@ -94,3 +94,7 @@ var bar = 3;
## When Not To Use It

If you do not care about extra blank lines, turn this off.

## Regarding the Airbnb JavaScript Style Guide `eol-last` rule

If you wish to use the Airbnb style guide rule regarding ending files with a single newline character (`eol-last`) with this rule, `maxEOF` should be set to 0, as an empty line is actually represented by two newline characters (`\n\n`). There is no empty line at the end of a file after the last `\n`, although editors may show an additional line.

0 comments on commit 59d5d5c

Please sign in to comment.