From fd5c71c0a90c35287dc9397ab7aa15080ea36354 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 4 May 2016 16:52:06 -0700 Subject: [PATCH] [eslint config] [base] [breaking] widen `no-extra-parens` to include everything, except `nestedBinaryExpressions` Per https://github.com/eslint/eslint/issues/3065#event-626005438 --- packages/eslint-config-airbnb-base/rules/errors.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb-base/rules/errors.js b/packages/eslint-config-airbnb-base/rules/errors.js index 73fd7d4f..f8f38972 100644 --- a/packages/eslint-config-airbnb-base/rules/errors.js +++ b/packages/eslint-config-airbnb-base/rules/errors.js @@ -25,7 +25,11 @@ module.exports = { // disallow double-negation boolean casts in a boolean context 'no-extra-boolean-cast': 0, // disallow unnecessary parentheses - 'no-extra-parens': [2, 'functions'], + // http://eslint.org/docs/rules/no-extra-parens + 'no-extra-parens': [2, 'all', { + 'conditionalAssign': true, + 'nestedBinaryExpressions': false, + }], // disallow unnecessary semicolons 'no-extra-semi': 2, // disallow overwriting functions written as function declarations