From da1013c6760a997dca3050a4d1d8452f783584f1 Mon Sep 17 00:00:00 2001 From: cuithon Date: Tue, 12 Mar 2024 15:12:52 +0800 Subject: [PATCH] [Docs] `jsx-no-constructed-context-values`: fix some typos Signed-off-by: cuithon --- docs/rules/jsx-no-constructed-context-values.md | 2 +- lib/rules/display-name.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rules/jsx-no-constructed-context-values.md b/docs/rules/jsx-no-constructed-context-values.md index aba9ac6254..deb8fb6239 100644 --- a/docs/rules/jsx-no-constructed-context-values.md +++ b/docs/rules/jsx-no-constructed-context-values.md @@ -8,7 +8,7 @@ This rule prevents non-stable values (i.e. object identities) from being used as One way to resolve this issue may be to wrap the value in a `useMemo()`. If it's a function then `useCallback()` can be used as well. -If you _expect_ the context to be rerun on each render, then consider adding a comment/lint supression explaining why. +If you _expect_ the context to be rerun on each render, then consider adding a comment/lint suppression explaining why. ## Examples diff --git a/lib/rules/display-name.js b/lib/rules/display-name.js index be0e2985b3..c1b3347117 100644 --- a/lib/rules/display-name.js +++ b/lib/rules/display-name.js @@ -246,7 +246,7 @@ module.exports = { } if (node.arguments.length > 0 && astUtil.isFunctionLikeExpression(node.arguments[0])) { - // Skip over React.forwardRef declarations that are embeded within + // Skip over React.forwardRef declarations that are embedded within // a React.memo i.e. React.memo(React.forwardRef(/* ... */)) // This means that we raise a single error for the call to React.memo // instead of one for React.memo and one for React.forwardRef