sindresorhus/eslint-plugin-unicorn
Do you want to work on this issue?
You can request for a bounty in order to promote it!
1 active bounty request
$33.39
Solve someone else's bounty request by clicking on it and completing the funding to earn additional creditsMissing functions in `consistent-function-scoping` #931
fisker posted onGitHub
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 https://github.com/sindresorhus/eslint-plugin-unicorn/issues/596#issuecomment-628711205