Closed
Description
I'd like a rule that errors if anything is in defaultProps
that is not also in propTypes
.
This came up with the following code:
Component.propTypes = {
fooValue: PropTypes.string,
};
Component.defaultProps = {
foo: '',
};
In other words, it was a partially completed prop rename.
This rule should also look up a propTypes variable (Component.propTypes = propTypes
) defined elsewhere in the file.