jsx-eslint/eslint-plugin-react

Rule proposal: check constructor params for props and context

Open

#626 aperta il 7 giu 2016

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

Metriche repository

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

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