-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
I have made a rule that enforces you to specify propTypes and defaultProps as static class properties. I don't know if I should make a PR for this since it depends on the experimental feature. We are planning on using it in our codebase, which is large. Would it be of interest here?
INCORRECT
class MyComp extends Component {} MyComp.propTypes = {}; MyComp.defaultProps = {}
CORRECT
class MyComp extends Component { static propTypes = {}; static defaultProps = {}; }