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 e2faac1 commit fa4a396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/no-multiple-empty-lines.md
Expand Up @@ -95,6 +95,6 @@ var bar = 3;

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

## Regarding the Airbnb JavaScript Style Guide `eol-last` rule
## Using It With The `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.
If you wish to use this rule with the `eol-last` core rule regarding ending files with a single newline character, `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 fa4a396

Please sign in to comment.