Skip to main content

newline-before-method

added in: 1.21.0
🛠
Pro+

Enforces a blank line before a method declaration.

Example

❌ Bad:

class Wrong {
void fn() {}
void another() {} // LINT
void anotherFn() {} // LINT
}

✅ Good:

class Correct {
void fn() {}

void another() {}

void anotherFn() {}
}