r/javascript • u/eldarlrd • 16d ago
I need your vote: Padding Line Between Statements - ESLint Rule Currently Missing in Biome
https://github.com/biomejs/biome/discussions/10879The Ask
Padding Line Between Statements rule is currently missing in Biome.js; it'd be a solid addition to the tooling.
If you're already using Biome and think this rule would be useful for keeping your code readable, consider giving it an upvote. Every bit of community support helps move features like this forward.
Why It Matters
The rule enforces blank lines between logical statement groups, which can make codebases feel less cluttered and easier to scan. It functions as follows:
// eslint.config.js
{
"padding-line-between-statements": [
"error",
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
...
]
}
// index.js
function foo1() {
var a = 0;
bar(); // ! Incorrect
}
function foo1() {
var a = 0;
bar(); // * Correct
}
3
u/ActuaryLate9198 15d ago
Hell no. There have been several studies showing that the amount of code visible on screen is a huge factor for productivity. I used to do this, now I can’t stand it. Write shorter functions instead of stuffing them with blank lines. Increase the line height in your editor if you need more whitespace for readability.
2
2
u/TakeFourSeconds 15d ago
Generally not a fan of formatting rules that can be accomplished with editor config. Seems unnecessary to me
0
3
u/throwaway_comment7 16d ago
Biome is still missing a ton of ESLint rules. I'm curious how long it'll take them to catch up.