Skip to content

require-default-props does not detect properties in quotes #1201

Closed
singapore/lint-condo
#308
@zech

Description

Hi,

I've got an issue with code like this

DueEntryComponent.propTypes = {
    "isOverdue": PropTypes.bool
};

DueEntryComponent.defaultProps = {
    "isOverdue": false
};

triggers the message:

propType "isOverdue" is not required, but has no corresponding defaultProp declaration. (react/require-default-props)

changing the declaration to

DueEntryComponent.defaultProps = {
    isOverdue: false
};

omits the error.

I don't think quotes should have an effect on detecting defaultProps. Maybe I'm wrong ;-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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