From 586b1629ef103d8409e2119697bc19cd66e7522b Mon Sep 17 00:00:00 2001 From: HenryBrown0 <26250092+HenryBrown0@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:13:24 +0100 Subject: [PATCH] fix: use type args in boolean prop naming rule --- lib/rules/boolean-prop-naming.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rules/boolean-prop-naming.js b/lib/rules/boolean-prop-naming.js index b5dd37b529..96a84b61a8 100644 --- a/lib/rules/boolean-prop-naming.js +++ b/lib/rules/boolean-prop-naming.js @@ -250,7 +250,8 @@ module.exports = { return; } - const annotationTypeParams = component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters; + const typeAnnotation = component.node.parent.id.typeAnnotation.typeAnnotation; + const annotationTypeParams = typeAnnotation.typeArguments || typeAnnotation.typeParameters; if ( annotationTypeParams && ( annotationTypeParams.type === 'TSTypeParameterInstantiation'