Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEnforces return statements in callbacks of array's methods (array-callback-return) #859
Comments
feross
added
the
enhancement
label
Apr 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Yes. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@dcousens It's fine to use |
This comment has been minimized.
This comment has been minimized.
I misread it as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
feross commentedApr 13, 2017
•
edited
ESLint just promoted this rule to their 'eslint:recommended' rule set, so it's probably pretty reliable. I want to check how much of the ecosystem this effects and consider enabling it.
Arrayhas several methods for filtering, mapping, and folding. If we forget to writereturnstatement in a callback of those, it's probably a mistake.This rule enforces usage of
returnstatement in callbacks of array's methods.This rule finds callback functions of the following methods, then checks usage of return statement.
https://github.com/eslint/eslint/blob/master/docs/rules/array-callback-return.md