Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upZero newlines allowed at end of file #990
Comments
This comment has been minimized.
This comment has been minimized.
|
It seems like your file ends with two newlines? (one blank line) The rule comes from the fact that a unix text file is defined as multiple strings all terminated by Basically, there should be exactly one newline character at the end of the file, which will result in no blank lines at the end of the file. Hope that this made sense |
This comment has been minimized.
This comment has been minimized.
|
Thanks @LinusU, that does make sense. I misunderstood. |
LinusU
closed this
Sep 20, 2017
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gryff commentedSep 20, 2017
From the standard rules I see that files must end with a newline. However when running standard it tells me files that adhere to this rule are wrong.
myFile.js -
Searching the issues here I see this comment about enforcing no more than 1 newline at the end of a file.
Eslint's rules imply that this is wrong and we should use
maxEOF: 1.Maybe eslint fixed the wonkiness mentioned in the issue comment above?