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

Add configuration to react/jsx-handler-names (e.g. whitelist some name) #732

Closed
mik01aj opened this issue Aug 2, 2016 · 2 comments
Closed
Labels

Comments

@mik01aj
Copy link

mik01aj commented Aug 2, 2016

In my case, I often use _.noop as event handler in my unit tests. I'd like to whitelist this case.

Perhaps this could be solved in some generic way, i.e. since the rule uses RegExps anyway, these RegExps could be configurable.

This was originally reported by me in #571 (comment)

@ljharb ljharb added the question label Aug 2, 2016
@sheshbabu
Copy link

Would also be useful for some react native props like onTintColor

https://facebook.github.io/react-native/docs/switch.html#ontintcolor

@ljharb
Copy link
Member

ljharb commented Feb 2, 2022

Using things like _.noop has become pretty discouraged in the ecosystem, since () => {} is supremely optimized and much clearer.

@sheshbabu onTintColor should just work fine, because of the "on" prefix.

@ljharb ljharb closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants