- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
Closed
Labels
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-typesI think the two rules should cooperate.
I'm using the following relevant packages:
- eslint@3.15.0
 - eslint-config-airbnb@14.1.0
 - eslint-plugin-react@6.10.0
 
ankitrg, msteward, Kerumen, wdoug, iilei and 8 more