Recompose: Is eslint props validation possible with recompose?

Created on 1 May 2016  路  6Comments  路  Source: acdlite/recompose

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

Most helpful comment

@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

All 6 comments

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

Interesting. Thanks for the link.

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 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.

@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 :)

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uriklar picture uriklar  路  4Comments

rndmerle picture rndmerle  路  3Comments

rockchalkwushock picture rockchalkwushock  路  3Comments

cdomigan picture cdomigan  路  4Comments

astanciu picture astanciu  路  3Comments