jsx-eslint/eslint-plugin-react

Rule proposal: check constructor params for props and context

开放

#626 创建于 2016年6月7日

 (7 条评论) (5 个反应) (0 位负责人)JavaScript (2,731 个派生)batch import
help wantednew rule

仓库指标

星标
 (9,293 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南