Check that ES6 static propTypes/defaultProps are not functions? #1174
Closed
Description
It is possible to erroneously define propTypes
and defaultProps
in ES6 class as function. In that case React will silently ignore them. See first component in example at https://jsbin.com/jidupehebu/edit?js,console
Is it possible to add a rule to check that propTypes
and defaultProps
are properly defined (either static property initializers from ES7 proposal or static property getters, but not functions)?
Activity