From f278d3eae875d45f98eda53b7554931c0dabd822 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 12 Dec 2022 14:49:47 -0330 Subject: [PATCH] Stop requiring newlines between multiline blocks/expressions 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. --- packages/base/rules-snapshot.json | 5 ----- packages/base/src/index.js | 5 ----- 2 files changed, 10 deletions(-) diff --git a/packages/base/rules-snapshot.json b/packages/base/rules-snapshot.json index c7076aba..751cdaea 100644 --- a/packages/base/rules-snapshot.json +++ b/packages/base/rules-snapshot.json @@ -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", diff --git a/packages/base/src/index.js b/packages/base/src/index.js index e85d4fc4..1305b129 100644 --- a/packages/base/src/index.js +++ b/packages/base/src/index.js @@ -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': [