Skip to content

Commit

Permalink
[Fix] boolean-prop-naming: handle TSParenthesizedType case
Browse files Browse the repository at this point in the history
  • Loading branch information
mobily committed Mar 13, 2022
1 parent 81ec186 commit b59417f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/rules/boolean-prop-naming.js
Expand Up @@ -265,6 +265,16 @@ module.exports = {
node
);
objectTypeAnnotations.set(identifier.name, currentNode);
} else if (
node.type === 'TSParenthesizedType'
&& (
node.typeAnnotation.type === 'TSIntersectionType'
|| node.typeAnnotation.type === 'TSUnionType'
)
) {
node.typeAnnotation.types.forEach((type) => {
findAllTypeAnnotations(identifier, type);
});
} else if (
node.type === 'TSIntersectionType'
|| node.type === 'TSUnionType'
Expand Down

0 comments on commit b59417f

Please sign in to comment.