Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Warn for PropTypes that don't exist but do exist with a different case #7

Closed
aweary opened this issue Apr 9, 2017 · 4 comments
Closed

Comments

@aweary
Copy link
Contributor

aweary commented Apr 9, 2017

Original issue: facebook/react#6153

@katsos
Copy link

katsos commented May 16, 2017

Is anyone working on this one? I'd like to contribute.

@aweary can you please provide me the copy to display when the prop-type doesn't exist?

@lukescott
Copy link

lukescott commented May 18, 2017

Isn't #11 somewhat related? If you warned about every property that wasn't defined, wouldn't that highlight onaction as not defined? You could also look for similar cases though to provide a better error message - did you mean 'onAction'?.

@aladh
Copy link

aladh commented May 18, 2017

@lukescott A warning about different capitalization would be useful in any scenario, as it is most likely a typo. The issue mentioned in #11 does overlap, but seems like it should be opt-in.

@ljharb
Copy link
Contributor

ljharb commented Dec 22, 2021

This seems like something that React itself would have to do. Separately, PropTypes.exact can catch all these typos by warning on any unrecognized prop.

@ljharb ljharb closed this as completed Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants