mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
Fix outdated comment
This commit is contained in:
parent
32d221a9a9
commit
b7b984349c
|
|
@ -432,8 +432,7 @@ export default {
|
||||||
'React Hook function.';
|
'React Hook function.';
|
||||||
context.report({node: hook, message});
|
context.report({node: hook, message});
|
||||||
} else if (codePathNode.type === 'Program') {
|
} else if (codePathNode.type === 'Program') {
|
||||||
// We could warn here but there are false positives related
|
// These are dangerous if you have inline requires enabled.
|
||||||
// configuring libraries like `history`.
|
|
||||||
const message =
|
const message =
|
||||||
`React Hook "${context.getSource(hook)}" cannot be called ` +
|
`React Hook "${context.getSource(hook)}" cannot be called ` +
|
||||||
'at the top level. React Hooks must be called in a ' +
|
'at the top level. React Hooks must be called in a ' +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user