Skip to content

forbid-prop-types w/ es6 classes #514

Closed
@foxtree

Description

@foxtree

forbid-prop-types does not work when propTypes are declared using an es6 static member:

  static get propTypes() {
    return {
      store: PropTypes.object.isRequired,
      history: PropTypes.object.isRequired,
      DevTools: PropTypes.func.isRequired
    };
  }

...however, display-name still works correctly, when using a similar es6 notation:

  static get displayName() {return 'Root';}

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