jsx-eslint/eslint-plugin-react
Voir sur GitHubCreate a new rule or update jsx-no-bind to work with react hooks and jsx
Open
#2 901 ouverte le 13 janv. 2021
help wantednew rule
Métriques du dépôt
- Stars
- (8 630 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
I am looking for a lint rule that helps me enforce not declaring inline functions (function type is irrelevant) inside jsx code. React hooks don't need binding anymore soo... i'm not sure if including this inside jsx-no-bind would be fair..
React Native basic example below:

This is a something profiling nerds need and I a recommended way of handling functions when jsx is concerned. One possible option available could be to allow one liners to still exist (but i don't see a reason why other than laziness).