Skip to content

Commit 74baea5

Browse files
HenryBrown0ljharb
authored andcommitted
fix: use type args in jsx props multi space rule
1 parent e8d431f commit 74baea5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rules/jsx-props-no-multi-spaces.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module.exports = {
9898
}
9999

100100
function containsGenericType(node) {
101-
const nodeTypeParams = node.typeParameters;
101+
const nodeTypeParams = node.typeArguments || node.typeParameters;
102102
if (typeof nodeTypeParams === 'undefined') {
103103
return false;
104104
}
@@ -109,7 +109,7 @@ module.exports = {
109109
function getGenericNode(node) {
110110
const name = node.name;
111111
if (containsGenericType(node)) {
112-
const type = node.typeParameters;
112+
const type = node.typeArguments || node.typeParameters;
113113

114114
return Object.assign(
115115
{},

0 commit comments

Comments
 (0)