-
- Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
The following is with eslint-plugin-react@6.10.3.
If a propType is quoted for some reason like this:
MyComponent.propTypes = { 'data-id': PropTypes.string, };Then the require-default-props rule gives the following warning:
propType "undefined" is not required, but has no corresponding defaultProp declaration. Howwever, giving the propType a default value like this does satisfy the rule:
MyComponent.defaultProps = { 'data-id': 'test', };It seems like this is an issue with the formatting of the error message.
viraths and ablackoff