Skip to content

Commit

Permalink
Reword missing effect callback message
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRu committed Jan 11, 2021
1 parent bbb11f3 commit d5767cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1704,25 +1704,25 @@ const tests = {
errors: [
{
message:
'React Hook useEffect will crash when called with no arguments. ' +
'React Hook useEffect requires an effect callback. ' +
'Did you forget to pass a callback to the hook?',
suggestions: undefined,
},
{
message:
'React Hook useLayoutEffect will crash when called with no arguments. ' +
'React Hook useLayoutEffect requires an effect callback. ' +
'Did you forget to pass a callback to the hook?',
suggestions: undefined,
},
{
message:
'React Hook useCallback will crash when called with no arguments. ' +
'React Hook useCallback requires an effect callback. ' +
'Did you forget to pass a callback to the hook?',
suggestions: undefined,
},
{
message:
'React Hook useMemo will crash when called with no arguments. ' +
'React Hook useMemo requires an effect callback. ' +
'Did you forget to pass a callback to the hook?',
suggestions: undefined,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ export default {
reportProblem({
node: reactiveHook,
message:
`React Hook ${reactiveHookName} will crash when called with no arguments. ` +
`React Hook ${reactiveHookName} requires an effect callback. ` +
`Did you forget to pass a callback to the hook?`,
});
return;
Expand Down

0 comments on commit d5767cd

Please sign in to comment.