From 25bfd01e693482f35fed537ef1a4fb8a53702c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 3 Jul 2019 01:59:55 +0200 Subject: [PATCH] Add JavaScript rule to return a value in callbacks It's very easy for Ruby developers to omit the `return` statement in an array callback, such as the ones in `map` or `filter`. Doing so will make those funcions have the same effect as `forEach`, which is usually not the intended behaviour. --- .eslintrc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.yml b/.eslintrc.yml index 31807c846..944715bb8 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -14,6 +14,7 @@ parserOptions: ecmaVersion: 5 rules: array-bracket-spacing: error + array-callback-return: error block-spacing: error brace-style: error comma-spacing: error