javascript icon indicating copy to clipboard operation
javascript copied to clipboard

A single preferred way for event methods prefix

Open maciekmpintive opened this issue 8 years ago • 3 comments

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.

maciekmpintive avatar May 23 '18 13:05 maciekmpintive

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

ljharb avatar May 23 '18 14:05 ljharb

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

maciekmpintive avatar May 23 '18 14:05 maciekmpintive

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

ljharb avatar May 23 '18 14:05 ljharb