palantir / tslint-react

:orange_book: Lint rules related to React & JSX for TSLint.
Apache License 2.0
749 stars 76 forks source link

New Rule: component-constructor-signature #38

Closed adidahiya closed 7 years ago

adidahiya commented 8 years ago

Require all constructors to include both props and context as parameters, not just props (a common mistake that breaks libraries that rely on context.

constructor(props: SomeType, context?: any) {
    super(props, context);
}
adidahiya commented 7 years ago

superseded by #54