mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge 9bd9e33e42 into sapling-pr-archive-josephsavona
This commit is contained in:
@@ -68,9 +68,7 @@ testRule('plugin-recommended', TestRecommendedRules, {
|
||||
</>;
|
||||
}
|
||||
`,
|
||||
errors: [
|
||||
makeTestCaseError('Hooks must always be called in a consistent order'),
|
||||
],
|
||||
errors: [makeTestCaseError('Cannot call hooks conditionally')],
|
||||
},
|
||||
{
|
||||
name: 'Multiple diagnostics within the same file are surfaced',
|
||||
@@ -84,8 +82,8 @@ testRule('plugin-recommended', TestRecommendedRules, {
|
||||
return props.cond && useConditionalHook();
|
||||
}`,
|
||||
errors: [
|
||||
makeTestCaseError('Hooks must always be called in a consistent order'),
|
||||
makeTestCaseError('Hooks must always be called in a consistent order'),
|
||||
makeTestCaseError('Cannot call hooks conditionally'),
|
||||
makeTestCaseError('Cannot call hooks conditionally'),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -98,9 +96,7 @@ testRule('plugin-recommended', TestRecommendedRules, {
|
||||
|
||||
}
|
||||
`,
|
||||
errors: [
|
||||
makeTestCaseError('Hooks must always be called in a consistent order'),
|
||||
],
|
||||
errors: [makeTestCaseError('Cannot call hooks conditionally')],
|
||||
},
|
||||
{
|
||||
name: 'Multiple non-fatal useMemo diagnostics are surfaced',
|
||||
|
||||
Reference in New Issue
Block a user