Skip to content

Commit

Permalink
Fixing grammatical errors in error message (#16973)
Browse files Browse the repository at this point in the history
* Fixing grammatical errors in error message

* Fixing grammar error in test file
  • Loading branch information
RaneWallin authored and Sunil Pai committed Oct 3, 2019
1 parent 4c56984 commit 5943b1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,8 @@ function loopError(hook) {
function functionError(hook, fn) {
return {
message:
`React Hook "${hook}" is called in function "${fn}" which is neither ` +
'a React function component or a custom React Hook function.',
`React Hook "${hook}" is called in function "${fn}" that is neither ` +
'a React function component nor a custom React Hook function.',
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export default {
const message =
`React Hook "${context.getSource(hook)}" is called in ` +
`function "${context.getSource(codePathFunctionName)}" ` +
'which is neither a React function component or a custom ' +
'that is neither a React function component nor a custom ' +
'React Hook function.';
context.report({node: hook, message});
} else if (codePathNode.type === 'Program') {
Expand Down

0 comments on commit 5943b1d

Please sign in to comment.