jsx-eslint/eslint-plugin-react

Detect uninitialized states and statefulness

Open

#1,778 opened on Apr 30, 2018

View on GitHub
聽(7 comments)聽(0 reactions)聽(0 assignees)JavaScript聽(8,630 stars)聽(2,797 forks)batch import
help wantednew rulequestion

Description

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.

Contributor guide

Detect uninitialized states and statefulness 路 jsx-eslint/eslint-plugin-react#1778 | Good First Issue