Skip to content

Commit

Permalink
Stop requiring newlines between multiline blocks/expressions (#263)
Browse files Browse the repository at this point in the history
This effectively reverts #197. This rule is being removed because we
have found that it forces us to introduce newlines in places where they
obstruct readability rather than helping it.

When grouping statements, it is often useful to "chunk" related lines
together by using a newline before and after the chunk, to denote that
each of the statements are related in some way. This is often done in
unit tests for example, when the "arrange", "act", "assert" grouping
style is used. This rule was forcing us to break up chunks.
  • Loading branch information
Gudahtt committed Dec 12, 2022
1 parent 22b2089 commit fe32312
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions packages/base/rules-snapshot.json
Expand Up @@ -3282,11 +3282,6 @@
"blankLine": "any",
"prev": "directive",
"next": "directive"
},
{
"blankLine": "always",
"prev": ["multiline-block-like", "multiline-expression"],
"next": ["multiline-block-like", "multiline-expression"]
}
],
"prefer-arrow-callback": "off",
Expand Down
5 changes: 0 additions & 5 deletions packages/base/src/index.js
Expand Up @@ -241,11 +241,6 @@ module.exports = {
prev: 'directive',
next: 'directive',
},
{
blankLine: 'always',
prev: ['multiline-block-like', 'multiline-expression'],
next: ['multiline-block-like', 'multiline-expression'],
},
],
'prefer-const': 'error',
'prefer-destructuring': [
Expand Down

0 comments on commit fe32312

Please sign in to comment.