Skip to main content

newline-before-return

added in: 1.5.0
🛠
Free+

Enforces a blank line between statements and returns in a block.

Example

❌ Bad:

  if ( ... ) {
...
return ...; // LINT
}

✅ Good:

  if ( ... ) {
return ...;
}

if ( ... ) {
...

return ...;
}