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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
There is a proposal to disable the
unicorn/no-array-reduce
rule.Beta Was this translation helpful? Give feedback.
All reactions