Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing functions in consistent-function-scoping #931

Open
fisker opened this issue Dec 10, 2020 · 2 comments
Open

Missing functions in consistent-function-scoping #931

fisker opened this issue Dec 10, 2020 · 2 comments
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted

Comments

@fisker
Copy link
Collaborator

fisker commented Dec 10, 2020

Issuehunt badges

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)


IssueHunt Summary

Backers (Total: $46.61)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

@issuehunt-oss
Copy link

issuehunt-oss bot commented May 4, 2023

@fregante has funded $46.61 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 4, 2023
@fregante
Copy link
Collaborator

fregante commented May 4, 2023

I'd really like this rule to actually report as many functions as possible. Currently it feels like it's ignoring a lot of cases, with more exceptions mentioned in #1074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

3 participants