jsx-eslint/eslint-plugin-react

Rule proposal: check constructor params for props and context

Aperta

#626 aperta il 7 giu 2016

 (7 commenti) (5 reazioni) (0 assegnatari)JavaScript (2731 fork)batch import
help wantednew rule

Metriche repository

Star
 (9293 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

This rule would check for:

class X extends Component {
  constructor(props, context) {
    super(props, context);
  }
}

React is lenient, so constructor() { super(); } works, so this is just a stylistic preference.

Guida contributor