From 4391ea4a57ae859b3051a0aae72b7311158c2a57 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 24 Dec 2017 23:11:15 -0800 Subject: [PATCH] tools: enable array-callback-return ESLint rule For array methods that depend on a callback (such as `.filter()` or `.map()`), require a return value from the callback. PR-URL: https://github.com/nodejs/node/pull/17858 Reviewed-By: Weijia Wang Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Khaidi Chu Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- .eslintrc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index da49eb8b4f7c82..4735778b7bbff8 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -43,6 +43,7 @@ rules: # Best Practices # http://eslint.org/docs/rules/#best-practices accessor-pairs: error + array-callback-return: error dot-location: [error, property] eqeqeq: [error, smart] no-fallthrough: error