Hi!
consistent-function-scoping
is complaining about a function that is being created in a loop, and which depends on a dynamic variable inside that loop.
export const myMap = new Map();
for (const value of values) {
const regexp = new RegExp(`^${value}\\/?$`);
const match = href => regexp.test(href);
myMap.set(value, {value, regexp, match});
}
ESLint: Move arrow function `match` to the outer scope.(unicorn/consistent-function-scoping)
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