Skip to content

Commit

Permalink
fix(bool-prop-naming): simplify a validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mobily committed Mar 12, 2022
1 parent 0ff87fb commit 5ecea6b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/rules/boolean-prop-naming.js
Expand Up @@ -361,18 +361,13 @@ module.exports = {
propType = objectTypeAnnotations.get(annotation.typeName.name);
}

if (Array.isArray(propType)) {
propType.forEach((prop) => {
if (propType) {
[].concat(propType).forEach((prop) => {
validatePropNaming(
list[component].node,
prop.properties || prop.members
);
});
} else if (propType) {
validatePropNaming(
list[component].node,
propType.properties || propType.members
);
}
}

Expand Down

0 comments on commit 5ecea6b

Please sign in to comment.