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.
This commit is contained in:
Javi Martín
2019-07-03 01:59:55 +02:00
parent 044da18af1
commit 25bfd01e69

View File

@@ -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