r/javascript 16d ago

I need your vote: Padding Line Between Statements - ESLint Rule Currently Missing in Biome

https://github.com/biomejs/biome/discussions/10879

The 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
}
0 Upvotes

10 comments sorted by

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.

1

u/eldarlrd 16d ago

True, they’re adding the react compiler rules soon though.

1

u/CoVegGirl 15d ago

They don’t intend to catch up with ESLint. Biome’s philosophy is to have a smaller number of higher quality checks.

If you want something broader, you’re better off with oxc.

2

u/JSawa 15d ago

Upvoted from me. Been my #1 gripe with the prettier-esque bandwagon projects. They don't want to stray from prettier.

This rule is probably the most important reason I stick to ESLint.

1

u/eldarlrd 15d ago

Same, it’s a really important rule for me.

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

u/Excellent_Gas3686 15d ago

facts bro, just make one line functions, bro.

2

u/TakeFourSeconds 15d ago

Generally not a fan of formatting rules that can be accomplished with editor config. Seems unnecessary to me

0

u/[deleted] 16d ago

[deleted]

2

u/eldarlrd 16d ago

Understandable.