Skip to content

Commit

Permalink
style: multiline if statement in boolean prop naming
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Harband <[email protected]>
  • Loading branch information
HenryBrown0 and ljharb committed Sep 27, 2023
1 parent 32cb6e2 commit bcd12ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/rules/boolean-prop-naming.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ module.exports = {
}

const annotationTypeParams = component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters;
if (annotationTypeParams && (
annotationTypeParams.type === 'TSTypeParameterInstantiation'
|| annotationTypeParams.type === 'TypeParameterInstantiation'
)) {
if (
annotationTypeParams && (
annotationTypeParams.type === 'TSTypeParameterInstantiation'
|| annotationTypeParams.type === 'TypeParameterInstantiation'
)
) {
return annotationTypeParams.params.find(
(param) => param.type === 'TSTypeReference' || param.type === 'GenericTypeAnnotation'
);
Expand Down

0 comments on commit bcd12ac

Please sign in to comment.