We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5211a2b commit d8a615fCopy full SHA for d8a615f
lib/rules/default-props-match-prop-types.js
@@ -82,12 +82,8 @@ module.exports = {
82
'Program:exit': function() {
83
const list = components.list();
84
85
- Object.keys(list).forEach(component => {
86
- // If no defaultProps could be found, we don't report anything.
87
- if (!list[component].defaultProps) {
88
- return;
89
- }
90
-
+ // If no defaultProps could be found, we don't report anything.
+ Object.keys(list).filter(component => list[component].defaultProps).forEach(component => {
91
reportInvalidDefaultProps(
92
list[component].declaredPropTypes,
93
list[component].defaultProps || {}
0 commit comments