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

A single preferred way for event methods prefix #1815

Open
maciekmpintive opened this issue May 23, 2018 · 3 comments
Open

A single preferred way for event methods prefix #1815

maciekmpintive opened this issue May 23, 2018 · 3 comments

Comments

@maciekmpintive
Copy link

@maciekmpintive maciekmpintive commented May 23, 2018

In React config there is set up for two rules jsx-handler-names and sort-comp. First one is turned off and has default options assigned. First one suggests using handle prefix and the second one we have on prefix for event handlers (if I am not wrong).

I think there should be a single approach for this and as react documentation suggests maybe handle is better one.

@ljharb
Copy link
Collaborator

@ljharb ljharb commented May 23, 2018

I believe the intention is to not be proscriptive about handler names, but to ensure all potential handler names are sorted as expected.

@maciekmpintive
Copy link
Author

@maciekmpintive maciekmpintive commented May 23, 2018

So along with this should not handle prefix be added to sort-comp rule and vice versa in jsx-handler-names?

@ljharb
Copy link
Collaborator

@ljharb ljharb commented May 23, 2018

That seems reasonable - altho the jsx-handler-names config doesn't matter since it's off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.