Skip to content

Commit b59417f

Browse files
committed
[Fix] boolean-prop-naming: handle TSParenthesizedType case
1 parent 81ec186 commit b59417f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/rules/boolean-prop-naming.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,16 @@ module.exports = {
265265
node
266266
);
267267
objectTypeAnnotations.set(identifier.name, currentNode);
268+
} else if (
269+
node.type === 'TSParenthesizedType'
270+
&& (
271+
node.typeAnnotation.type === 'TSIntersectionType'
272+
|| node.typeAnnotation.type === 'TSUnionType'
273+
)
274+
) {
275+
node.typeAnnotation.types.forEach((type) => {
276+
findAllTypeAnnotations(identifier, type);
277+
});
268278
} else if (
269279
node.type === 'TSIntersectionType'
270280
|| node.type === 'TSUnionType'

0 commit comments

Comments
 (0)