Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule proposal: Warn on duplicate props #143

Closed
Markus-ipse opened this issue Jul 10, 2015 · 1 comment
Closed

Rule proposal: Warn on duplicate props #143

Markus-ipse opened this issue Jul 10, 2015 · 1 comment

Comments

@Markus-ipse
Copy link
Contributor

When you're in strict-mode you get warnings when you have duplicate properties in an object, a similiar warning for props on React components would be nice.

return (
   <Mycomponent className={classes}
                            onClick={this.handleClick}
                            someOtherProp={stuff}
                            onClick={this.onClick} /> // Duplicate prop, should produce an ESLint error
);
@Markus-ipse Markus-ipse changed the title Warn on duplicate props Rule proposal: Warn on duplicate props Jul 10, 2015
@mathieumg
Copy link
Contributor

👍 +1

yannickcr added a commit that referenced this issue Jul 20, 2015
Add jsx-no-duplicate-props rule (fixes #143)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants