From 2676cbfb2f9cae832f02f0ea43a9df3f024a24f9 Mon Sep 17 00:00:00 2001 From: Sharmila Date: Tue, 24 Oct 2017 17:36:18 -0700 Subject: [PATCH] [eslint config] [base] [breaking] Enables `nonblock-statement-body-position` rule and adds link to guide --- README.md | 2 +- packages/eslint-config-airbnb-base/rules/style.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 116e6a57..c5f79a6f 100644 --- a/README.md +++ b/README.md @@ -1981,7 +1981,7 @@ Other Style Guides ## Blocks - - [16.1](#blocks--braces) Use braces with all multi-line blocks. + - [16.1](#blocks--braces) Use braces with all multi-line blocks. eslint: [`nonblock-statement-body-position`](https://eslint.org/docs/rules/nonblock-statement-body-position) ```javascript // bad diff --git a/packages/eslint-config-airbnb-base/rules/style.js b/packages/eslint-config-airbnb-base/rules/style.js index fe621239..e358e2a4 100644 --- a/packages/eslint-config-airbnb-base/rules/style.js +++ b/packages/eslint-config-airbnb-base/rules/style.js @@ -354,7 +354,7 @@ module.exports = { // enforce the location of single-line statements // http://eslint.org/docs/rules/nonblock-statement-body-position - 'nonblock-statement-body-position': 'off', + 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], // require padding inside curly braces 'object-curly-spacing': ['error', 'always'],