Arrow function (throws error):
// ESLint: Move arrow function to the outer scope.(unicorn/consistent-function-scoping)
//
// here
// ⬇
export const someAction = () => (dispatch) =>
dispatch({
type: SOME_TYPE,
});
Function declaration (no error):
export function someAction() {
return (dispatch) =>
dispatch({
type: SOME_TYPE,
});
}
The arrow function in the second one should be reported.
Original posted by @Arttse #596 (comment)
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