Skip to content

Commit 4dd303d

Browse files
committed
fix: use type args in boolean prop naming rule
1 parent 2dbe952 commit 4dd303d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/rules/boolean-prop-naming.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,16 @@ module.exports = {
246246
&& component.node.parent.id.type === 'Identifier'
247247
&& component.node.parent.id.typeAnnotation
248248
&& component.node.parent.id.typeAnnotation.typeAnnotation
249-
&& component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters
250249
&& (
251-
component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters.type === 'TSTypeParameterInstantiation'
250+
(component.node.parent.id.typeAnnotation.typeAnnotation.typeArguments
251+
&& (
252+
component.node.parent.id.typeAnnotation.typeAnnotation.typeArguments.type === 'TSTypeParameterInstantiation'
253+
|| component.node.parent.id.typeAnnotation.typeAnnotation.typeArguments.type === 'TypeParameterInstantiation'
254+
))
255+
|| (component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters
256+
&& (component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters.type === 'TSTypeParameterInstantiation'
252257
|| component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters.type === 'TypeParameterInstantiation'
258+
))
253259
)
254260
) {
255261
return component.node.parent.id.typeAnnotation.typeAnnotation.typeParameters.params.find(

0 commit comments

Comments
 (0)