Disable the unicorn/no-array-reduce rule
#229
Replies: 2 comments 2 replies
|
It's only somewhat useful in the rare case of summing up numbers, which is allowed by default. Please see the documentation of the rule. |
|
I use reduce all the time. It is a very powerful language feature we should not disable because some people are not familiar with it. All the logic to achieve the closestChildIndex value is contained inside the reduce. Otherwise I would have to do something like: I don't know if I'm too familiar with how reduce works, but the first option is easier to read. |
Uh oh!
There was an error while loading. Please reload this page.
There is a proposal to disable the
unicorn/no-array-reducerule.All reactions