Skip to content

Rule idea: no-mutation-props #1113

@ianschmitz

Description

@ianschmitz

A component is never meant to modify its own props (https://facebook.github.io/react/docs/components-and-props.html#props-are-read-only).

I suggest we had a no-mutation-props rule to check for mutations of a components own props. It looks like we could likely copy the logic used in no-direct-mutation-state.js.

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