Closed
Description
I have the following (simplified) piece of code:
componentWillReceiveProps(nextProps) {
if (!nextProps.error) {
console.log('oh noez');
}
}
This triggers the following ESLint error:
89:27 error 'error' is missing in props validation react/prop-types
However, if I do add error
to propTypes
, another error is triggered:
33:10 error 'error' PropType is defined but prop is never used react/no-unused-prop-types
I think the two rules should cooperate.
I'm using the following relevant packages: