jsx-eslint/eslint-plugin-react

react/prefer-stateless-function works different than described in docs

Open

#1901 aperta il 26 lug 2018

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (2797 fork)batch import
bughelp wanted

Metriche repository

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

Descrizione

For the react/prefer-stateless-function rule the docs for ignorePureComponents option states:

When true the rule will ignore Components extending from React.PureComponent that use this.props or this.context.

Actually it also ignore every PureComponent that use not only props or context, but ignores every component that use this. If this is not intended I prepared a fix (GH-1902), otherwise it makes sense to update the docs.

Guida contributor