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 upallow blank lines at the end of a file #8
Comments
This comment has been minimized.
This comment has been minimized.
|
Agree with this one. It's my understanding that a lot of UNIX utilities require the extra LF at the end of a file to determine if it's a text file or not. |
This comment has been minimized.
This comment has been minimized.
|
100% agree with you guys about always terminating a file with an LF. However, in the example @joshhartigan posted, x.js actually has two line breaks at the end of the file. Multiple consecutive line breaks are disallowed. I don't feel strongly about this rule, but I do think that: function one (x) {
return x
}
function two (x) {
return x * 2
}is better than: function one (x) {
return x
}
function two (x) {
return x * 2
} |
This comment has been minimized.
This comment has been minimized.
|
Agreed with @feross. I personally feel strongly about this and feel there is no need to have continuous line breaks in a file. |
This comment has been minimized.
This comment has been minimized.
|
Agreed. Current behavior seems fine. |
This comment has been minimized.
This comment has been minimized.
|
Cool, I'm going to close this issue. |
joshhartigan commentedJan 27, 2015
this is a fairly common practice. some reasoning can be seen here: http://stackoverflow.com/questions/2287967/why-is-it-recommended-to-have-empty-line-in-the-end-of-file

here's 'proof' it is counted as an error: