Fix outdated comment

This commit is contained in:
Dan Abramov 2019-08-21 15:42:44 +01:00
parent 32d221a9a9
commit b7b984349c

View File

@ -432,8 +432,7 @@ export default {
'React Hook function.';
context.report({node: hook, message});
} else if (codePathNode.type === 'Program') {
// We could warn here but there are false positives related
// configuring libraries like `history`.
// These are dangerous if you have inline requires enabled.
const message =
`React Hook "${context.getSource(hook)}" cannot be called ` +
'at the top level. React Hooks must be called in a ' +