I\'ve recently added the eslint rule no-param-reassign.
However, when I use reduce to build out an object (empty object as initialValue), I find myself need
initialValue
I just wrap the reduce functions in a lint rule disable block, ie:
/* eslint-disable no-param-reassign */ const newObject = ['a', 'b', 'c'].reduce((result, item, index) => { result[item] = index; return result; }, {}); /* eslint-enable no-param-reassign */