jsx-eslint/eslint-plugin-react

Detect uninitialized states and statefulness

Open

#1778 aperta il 30 apr 2018

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)JavaScript (2797 fork)batch import
help wantednew rulequestion

Metriche repository

Star
 (8630 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

First things first, thank you for making this great plugin. 🙌🏻I'm hopeful that I will be able to contribute to this project. Maybe you can tell me if my two requests below make sense. Or maybe there are some rules which I do the job that I haven't discovered yet.

  • PureComponent detection works well but not the other way around: there are no errors thrown for using setState in a component declared as extends React.PureComponent.
  • In React 16.3, it eslint should warn if we have uninitialized state in a stateful component.

Guida contributor