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: Missing a blank line before 'return'.
}

✅ Good:

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

if ( ... ) {
...

return ...;
}