Skip to content

forbid-prop-types warning shown on Yup validation #2722

Closed
@MerlinMason

Description

@MerlinMason

Hey there, a project I work on uses both prop-types and Yup which have a similar syntax.

The following where I'm declaring a Yup validation object:

const formValidation = Yup.object().shape({
    name: Yup.string(),
    customer_ids: Yup.array()
});

Gives me a warning on the line customer_ids: Yup.array() like so:

Prop type `array` is forbidden eslint(react/forbid-prop-types)

I believe this is a bug as this is not a prop type declaration.

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