jsx-eslint/eslint-plugin-react

Rule proposal: check constructor params for props and context

Open

#626 ouverte le 7 juin 2016

Voir sur GitHub
 (7 commentaires) (5 réactions) (0 assignés)JavaScript (8 630 stars) (2 797 forks)batch import
help wantednew rule

Description

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.

Guide contributeur