Skip to content

Experimental features? #1807

@hornta

Description

@hornta

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 = {}; }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions