-
-
Notifications
You must be signed in to change notification settings - Fork 412
Closed
Labels
Description
Title is pretty self-explanatory. no-array-reduce
doesn't report optional chaining calls of reduce
, e.g. array?.reduce()
Rule: no-array-reduce
array.reduce((str, item) => str += item, "") // reports correctly as error
array?.reduce((str, item) => str += item, "") // doesn't report this one
I see in rule's code optionalMember: false
is explicitly passed. So, is this really a bug or an intended behaviour?
I've created a PR with new test cases - they fail: #2721
Thanks!
fregante