Skip to content

Commit 5943b1d

Browse files
RaneWallinSunil Pai
authored and
Sunil Pai
committed
Fixing grammatical errors in error message (#16973)
* Fixing grammatical errors in error message * Fixing grammar error in test file
1 parent 4c56984 commit 5943b1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ function loopError(hook) {
758758
function functionError(hook, fn) {
759759
return {
760760
message:
761-
`React Hook "${hook}" is called in function "${fn}" which is neither ` +
762-
'a React function component or a custom React Hook function.',
761+
`React Hook "${hook}" is called in function "${fn}" that is neither ` +
762+
'a React function component nor a custom React Hook function.',
763763
};
764764
}
765765

packages/eslint-plugin-react-hooks/src/RulesOfHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export default {
428428
const message =
429429
`React Hook "${context.getSource(hook)}" is called in ` +
430430
`function "${context.getSource(codePathFunctionName)}" ` +
431-
'which is neither a React function component or a custom ' +
431+
'that is neither a React function component nor a custom ' +
432432
'React Hook function.';
433433
context.report({node: hook, message});
434434
} else if (codePathNode.type === 'Program') {

0 commit comments

Comments
 (0)