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

Empty line between blocks #676

Closed
menzow opened this issue Nov 8, 2016 · 2 comments

Comments

@menzow
Copy link

commented Nov 8, 2016

Hey,

The rules about empty blank lines currently say: "Multiple blank lines not allowed."

From this I assume that a single blank line is allowed:

var a = 'foo'

var b = 'bar'

I can't find any specification for this, and when running standard --fix it does remove the blank lines.

I think the goal is disallowing blank lines within blocks, but require a single blank line between blocks. If this is correct, please specify it in the rules.

// bad
function foo(){
  var foo = 'foo'

  return foo
}
function bar() {
  var bar =  'bar'

  return bar
}

//good
function foo(){
  var foo = 'foo'
  return foo
}

function bar() {
  var bar = 'bar'
  return bar
}
@feross

This comment has been minimized.

Copy link
Member

commented Nov 23, 2016

Your analysis is correct. Would you be willing to send a PR to clarify the rules in a way that's clearest to you? Thanks in advance!

@feross feross closed this Nov 23, 2016

@dcousens

This comment has been minimized.

Copy link
Member

commented Nov 23, 2016

function foo(){

bad :P

@lock 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.
3 participants
You can’t perform that action at this time.