From fac53890c886103b34a407ee85dd45a452d63f91 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Thu, 13 Apr 2017 17:08:27 -0400 Subject: [PATCH] Breaking: Remove array-callback-return from recommended (fixes #8428) (#8433) --- conf/eslint-recommended.js | 2 +- docs/user-guide/migrating-to-4.0.0.md | 4 +--- lib/rules/array-callback-return.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/eslint-recommended.js b/conf/eslint-recommended.js index 1656ec458d7..17b0f448e8f 100755 --- a/conf/eslint-recommended.js +++ b/conf/eslint-recommended.js @@ -17,7 +17,7 @@ module.exports = { /* eslint-enable sort-keys */ "accessor-pairs": "off", "array-bracket-spacing": "off", - "array-callback-return": "error", + "array-callback-return": "off", "arrow-body-style": "off", "arrow-parens": "off", "arrow-spacing": "off", diff --git a/docs/user-guide/migrating-to-4.0.0.md b/docs/user-guide/migrating-to-4.0.0.md index 6510b8c4f99..e616dd56f69 100644 --- a/docs/user-guide/migrating-to-4.0.0.md +++ b/docs/user-guide/migrating-to-4.0.0.md @@ -32,9 +32,8 @@ The lists below are ordered roughly by the number of users each change is expect ## `eslint:recommended` changes -Three new rules have been added to the [`eslint:recommended`](http://eslint.org/docs/user-guide/configuring#using-eslintrecommended) config: +Two new rules have been added to the [`eslint:recommended`](http://eslint.org/docs/user-guide/configuring#using-eslintrecommended) config: -* [`array-callback-return`](/docs/rules/array-callback-return) requires predicate functions to return a value when using functional patterns such as `map` and `filter`. * [`no-compare-neg-zero`](/docs/rules/no-compare-neg-zero) disallows comparisons to `-0` * [`no-useless-escape`](/docs/rules/no-useless-escape) disallows uselessly-escaped characters in strings and regular expressions @@ -45,7 +44,6 @@ Three new rules have been added to the [`eslint:recommended`](http://eslint.org/ "extends": "eslint:recommended", "rules": { - "array-callback-return": "off", "no-compare-neg-zero": "off", "no-useless-escape": "off" } diff --git a/lib/rules/array-callback-return.js b/lib/rules/array-callback-return.js index 05c1a11bed5..cf64a98e327 100644 --- a/lib/rules/array-callback-return.js +++ b/lib/rules/array-callback-return.js @@ -138,7 +138,7 @@ module.exports = { docs: { description: "enforce `return` statements in callbacks of array methods", category: "Best Practices", - recommended: true + recommended: false }, schema: []