Skip to content

require-default-props fails to parse Flow's read only/covariant prop types #1865

Closed
@jsteiner

Description

@jsteiner

Using Flow:

type Props = {
  +top?: SpacingType,
}

errors:

propType "+" is not required, but has no corresponding defaultProp declaration react/require-default-props

The + prefix is throwing off the parser, causing it to look for a prop + rather than the prop top.

Using eslint-plugin-react@^7.5.1

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