eslint-plugin-react-hooks 6.1.0-canary-4123f6b7-20250826 → 6.1.0-canary-33a1095d-20250827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19467,7 +19467,8 @@ function printType(type) {
|
|
|
19467
19467
|
return `:T${type.kind}<${type.shapeId}>`;
|
|
19468
19468
|
}
|
|
19469
19469
|
else if (type.kind === 'Function' && type.shapeId != null) {
|
|
19470
|
-
|
|
19470
|
+
const returnType = printType(type.return);
|
|
19471
|
+
return `:T${type.kind}<${type.shapeId}>()${returnType !== '' ? `: ${returnType}` : ''}`;
|
|
19471
19472
|
}
|
|
19472
19473
|
else {
|
|
19473
19474
|
return `:T${type.kind}`;
|
|
@@ -40452,6 +40453,18 @@ function computeSignatureForInstruction(context, env, instr) {
|
|
|
40452
40453
|
});
|
|
40453
40454
|
}
|
|
40454
40455
|
}
|
|
40456
|
+
for (const prop of value.props) {
|
|
40457
|
+
if (prop.kind === 'JsxAttribute' &&
|
|
40458
|
+
prop.place.identifier.type.kind === 'Function' &&
|
|
40459
|
+
(isJsxType(prop.place.identifier.type.return) ||
|
|
40460
|
+
(prop.place.identifier.type.return.kind === 'Phi' &&
|
|
40461
|
+
prop.place.identifier.type.return.operands.some(operand => isJsxType(operand))))) {
|
|
40462
|
+
effects.push({
|
|
40463
|
+
kind: 'Render',
|
|
40464
|
+
place: prop.place,
|
|
40465
|
+
});
|
|
40466
|
+
}
|
|
40467
|
+
}
|
|
40455
40468
|
}
|
|
40456
40469
|
break;
|
|
40457
40470
|
}
|
|
@@ -46745,6 +46758,14 @@ class Unifier {
|
|
|
46745
46758
|
if (type.kind === 'Phi') {
|
|
46746
46759
|
return { kind: 'Phi', operands: type.operands.map(o => this.get(o)) };
|
|
46747
46760
|
}
|
|
46761
|
+
if (type.kind === 'Function') {
|
|
46762
|
+
return {
|
|
46763
|
+
kind: 'Function',
|
|
46764
|
+
isConstructor: type.isConstructor,
|
|
46765
|
+
shapeId: type.shapeId,
|
|
46766
|
+
return: this.get(type.return),
|
|
46767
|
+
};
|
|
46768
|
+
}
|
|
46748
46769
|
return type;
|
|
46749
46770
|
}
|
|
46750
46771
|
}
|
|
@@ -19458,7 +19458,8 @@ function printType(type) {
|
|
|
19458
19458
|
return `:T${type.kind}<${type.shapeId}>`;
|
|
19459
19459
|
}
|
|
19460
19460
|
else if (type.kind === 'Function' && type.shapeId != null) {
|
|
19461
|
-
|
|
19461
|
+
const returnType = printType(type.return);
|
|
19462
|
+
return `:T${type.kind}<${type.shapeId}>()${returnType !== '' ? `: ${returnType}` : ''}`;
|
|
19462
19463
|
}
|
|
19463
19464
|
else {
|
|
19464
19465
|
return `:T${type.kind}`;
|
|
@@ -40279,6 +40280,18 @@ function computeSignatureForInstruction(context, env, instr) {
|
|
|
40279
40280
|
});
|
|
40280
40281
|
}
|
|
40281
40282
|
}
|
|
40283
|
+
for (const prop of value.props) {
|
|
40284
|
+
if (prop.kind === 'JsxAttribute' &&
|
|
40285
|
+
prop.place.identifier.type.kind === 'Function' &&
|
|
40286
|
+
(isJsxType(prop.place.identifier.type.return) ||
|
|
40287
|
+
(prop.place.identifier.type.return.kind === 'Phi' &&
|
|
40288
|
+
prop.place.identifier.type.return.operands.some(operand => isJsxType(operand))))) {
|
|
40289
|
+
effects.push({
|
|
40290
|
+
kind: 'Render',
|
|
40291
|
+
place: prop.place,
|
|
40292
|
+
});
|
|
40293
|
+
}
|
|
40294
|
+
}
|
|
40282
40295
|
}
|
|
40283
40296
|
break;
|
|
40284
40297
|
}
|
|
@@ -46572,6 +46585,14 @@ class Unifier {
|
|
|
46572
46585
|
if (type.kind === 'Phi') {
|
|
46573
46586
|
return { kind: 'Phi', operands: type.operands.map(o => this.get(o)) };
|
|
46574
46587
|
}
|
|
46588
|
+
if (type.kind === 'Function') {
|
|
46589
|
+
return {
|
|
46590
|
+
kind: 'Function',
|
|
46591
|
+
isConstructor: type.isConstructor,
|
|
46592
|
+
shapeId: type.shapeId,
|
|
46593
|
+
return: this.get(type.return),
|
|
46594
|
+
};
|
|
46595
|
+
}
|
|
46575
46596
|
return type;
|
|
46576
46597
|
}
|
|
46577
46598
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks",
|
|
3
3
|
"description": "ESLint rules for React Hooks",
|
|
4
|
-
"version": "6.1.0-canary-
|
|
4
|
+
"version": "6.1.0-canary-33a1095d-20250827",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/facebook/react.git",
|