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

No proptype errors on compile time #395

Closed
kasperpeulen opened this issue Aug 8, 2016 · 2 comments
Closed

No proptype errors on compile time #395

kasperpeulen opened this issue Aug 8, 2016 · 2 comments

Comments

@kasperpeulen
Copy link
Contributor

I suspected to get some compile time errors, if I forget a required proptype

Webstorm does give me an error, but not eslint. Not sure if this a configuration problem or an eslint problem, but would be cool if this was a compile time error (even if you don't use flow etc.)

@gaearon
Copy link
Contributor

gaearon commented Aug 8, 2016

PropTypes is a runtime validation by design. I don't know what WebStorm does but it's probably hardcoding all possible options which doesn't seem like a great way going forward.

We do suggest using Flow for this. Did you have a chance to give it a try?

@kasperpeulen
Copy link
Contributor Author

Yeah, I love flow. Ironically, Webstorm doesn't support flow that well.

But okay, I kind of thought that this propTypes syntax was designed so that editors and linters can give helpful hints. But if that is not the case, then I'm just going to hope that better flow support will land in create-react-app 👯 (and Webstorm)

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants