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

Is eslint props validation possible with recompose? #150

Closed
joshburgess opened this issue May 1, 2016 · 6 comments
Closed

Is eslint props validation possible with recompose? #150

joshburgess opened this issue May 1, 2016 · 6 comments

Comments

@joshburgess
Copy link

Is there a way to get props validation warnings working with recompose like with the eslint-plugin-react/prop-types rule?

@wuct
Copy link
Contributor

wuct commented May 2, 2016

I don't think there is a way currently. Here is a releated issue opened in eslint-plugin-react.

@joshburgess
Copy link
Author

Interesting. Thanks for the link.

@acdlite
Copy link
Owner

acdlite commented May 2, 2016

Closing since there's not much we can do here. I've also looked into using Flow types but haven't found any success adding types to higher-order components.

@acdlite acdlite closed this as completed May 2, 2016
@winkler1
Copy link

@acdlite Not sure if you've seen - the Flow docs have this example of Flow annotations for HOC's: https://github.com/facebook/flow/blob/master/website/docs/ref/react.doc.js#L201.

@acdlite
Copy link
Owner

acdlite commented May 15, 2016

@winkler1 I've seen that, but it's not really an HoC. It's more of a container component. Need a way to type annotate a function that returns a component. I asked some FB people and they said they'll be working on the problem soon.

Unless I'm mistaken, in which case a PR or issue showing how to do it would be great :)

@arronmabrey
Copy link

@joshburgess I opened a PR that adds a failing test case to the issue in the eslint-plugin-react project that @wuct mentioned above.

Hopefully with that we can get props validation warnings working with recompose

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

5 participants