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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user