Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow blank lines at the end of a file #8

Closed
joshhartigan opened this issue Jan 27, 2015 · 5 comments

Comments

@joshhartigan
Copy link

commented Jan 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:

@jprichardson

This comment has been minimized.

Copy link
Member

commented Jan 27, 2015

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.

@feross

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

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
}
@dcousens

This comment has been minimized.

Copy link
Member

commented Jan 29, 2015

Agreed with @feross.

I personally feel strongly about this and feel there is no need to have continuous line breaks in a file.

@mafintosh

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2015

Agreed. Current behavior seems fine.

@feross

This comment has been minimized.

Copy link
Member

commented Jan 29, 2015

Cool, I'm going to close this issue.

@feross feross closed this Jan 29, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
5 participants
You can’t perform that action at this time.