@samitouri / QOS-React-2 / commits / 5943b1da6c

Fixing grammatical errors in error message (#16973)

* Fixing grammatical errors in error message * Fixing grammar error in test file

Rane Wallin committed Oct 3, 2019 at 05:44 UTC 5943b1da6cb49476ee79dd3c06b10d0bd299bfe0
2 files changed +3 -3
packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js
+2 -2
@@ -758,8 +758,8 @@ function loopError(hook) {
758 function functionError(hook, fn) {
759 return {
760 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.',
763 };
764 }
765
packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
+1 -1
@@ -428,7 +428,7 @@ export default {
428 const message =
429 `React Hook "${context.getSource(hook)}" is called in ` +
430 `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 ' +
432 'React Hook function.';
433 context.report({node: hook, message});
434 } else if (codePathNode.type === 'Program') {