airbnb / airbnb/javascript

ESLint is missing rules for blank lines after blocks (section 19.7)

Open
#1,660 16 comments 4 reactions 1 assignee Claimed by @ljharb View on GitHub
Dominant language
JavaScript
Stars
148k
Forks
26.6k
PR merge metrics
No merged PRs in 30d

Description

[Section 19.7](https://github.com/airbnb/javascript#whitespace--after-blocks) requires a blank line after blocks and before the next statement. This uses JSCS [requirePaddingNewLinesAfterBlocks](http://jscs.info/rule/requirePaddingNewLinesAfterBlocks) but the equivalent [padding-line-between-statements](https://eslint.org/docs/rules/padding-line-between-statements) is missing from the base ESLint config.

I believe ESLint base config should include something like this:

"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": ["const", "let", "var", "block", "block-like"], "next": "*" }
]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.