jsx-eslint/eslint-plugin-react

Rule proposal: check constructor params for props and context

Open

#626 geöffnet am 7. Juni 2016

Auf GitHub ansehen
 (7 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)JavaScript (8.630 Stars) (2.797 Forks)batch import
help wantednew rule

Beschreibung

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.

Contributor Guide