Skip to content

Accidental bypass for react/jsx-no-bind allowArrowFunctions #1535

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

Closed
trevtrich opened this issue Aug 23, 2017 · 1 comment
Closed

Accidental bypass for react/jsx-no-bind allowArrowFunctions #1535

trevtrich opened this issue Aug 23, 2017 · 1 comment

Comments

@trevtrich
Copy link

We've recently started to get rid of our usage of arrow functions in component props for similar reasons to that mentioned here. We went ahead and set:

'react/jsx-no-bind': ['error', {
      allowArrowFunctions: false,
      allowBind: false,
}]

but realized we were still able to get away with using something like:

const someFunc = () => onClickHandler(userId)
<SomeComponent onClick={someFunc} />

So we didn't fix the problem, we just accidentally tricked it. Is this expected behavior or is this a bug?

@trevtrich
Copy link
Author

Moved issue to proper repo: jsx-eslint/eslint-plugin-react#1395.

@trevtrich trevtrich reopened this Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant