I would like the following to be ignored by no-fn-reference-in-iterator
:
const fn = item => {
// do stuff with iterator items
};
iter1.forEach(fn);
iter2.forEach(fn);
iter3.forEach(fn);
Since fn
is locally declared and defined the purpose of no-fn-reference-in-iterator
does not apply. I see value in the following situations being reported:
const mapper = require('unicorn-mapper');
function doStuff(iter, fn) {
iter.forEach(fn); // error on `fn` provided by argument
}
[2, 3, 4].forEach(mapper); // error as `mapper` is from a `require`
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too