Skip to content

Commit

Permalink
fix: use type args in boolean prop naming rule
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryBrown0 authored and ljharb committed Sep 4, 2023
1 parent e05ce3c commit 586b162
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rules/boolean-prop-naming.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 586b162

Please sign in to comment.