We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da67123 commit 0377afbCopy full SHA for 0377afb
lib/rules/jsx-props-no-multi-spaces.js
@@ -98,14 +98,18 @@ module.exports = {
98
}
99
100
function containsGenericType(node) {
101
- const containsTypeParams = typeof node.typeParameters !== 'undefined';
102
- return containsTypeParams && node.typeParameters.type === 'TSTypeParameterInstantiation';
+ const nodeType = node.typeArguments || node.typeParameters;
+ if (typeof nodeType === 'undefined') {
103
+ return false;
104
+ }
105
+
106
+ return nodeType.type === 'TSTypeParameterInstantiation';
107
108
109
function getGenericNode(node) {
110
const name = node.name;
111
if (containsGenericType(node)) {
- const type = node.typeParameters;
112
+ const type = node.typeArguments || node.typeParameters;
113
114
return Object.assign(
115
{},
0 commit comments