Skip to content

Commit 586b162

Browse files
HenryBrown0ljharb
authored andcommitted
fix: use type args in boolean prop naming rule
1 parent e05ce3c commit 586b162

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rules/boolean-prop-naming.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ module.exports = {
250250
return;
251251
}
252252

253-
const annotationTypeParams = component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters;
253+
const typeAnnotation = component.node.parent.id.typeAnnotation.typeAnnotation;
254+
const annotationTypeParams = typeAnnotation.typeArguments || typeAnnotation.typeParameters;
254255
if (
255256
annotationTypeParams && (
256257
annotationTypeParams.type === 'TSTypeParameterInstantiation'

0 commit comments

Comments
 (0)