Here is a minimal example:
import React from 'react'
class MyComponent extends React.Component {
render() {
// should be "'someProp' is missing in props validation (react/prop-types)" but is not
this.props.someProp()
return <div {...{}} />
}
}
export default MyComponent
remove the spread {...{}} and everything is fine
This was filed as #1601 for no-unused-prop-types and there's an unfinished PR in #1646.
If #1946 is merged, the fix will go into that common helper and apply for both rules.
Ah yeah, this seems fixed in master. At least now it does. I just added a test and noticed that it did not fail. :)
In that case, I'll close this now.
Most helpful comment
This was filed as #1601 for
no-unused-prop-typesand there's an unfinished PR in #1646.If #1946 is merged, the fix will go into that common helper and apply for both rules.