Skip to content

Destructuring allows me to bypass prop-types rule #104

Closed
@jamischarles

Description

@jamischarles

When I use this rule:
"react/prop-types": 2,

This code

var testing = this.props.something;

yields this

  31:33  error  'something' is missing in props validation  react/prop-types

which I expect.

When I use destructuring however:

let {something} = this.props;

There is no eslint error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions