Skip to content

Commit c11015f

Browse files
alicialicssophiebits
authored andcommitted
fix spelling mistakes (facebook#14805)
1 parent 3e295ed commit c11015f

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export default {
293293
// hook functions.
294294
const codePathFunctionName = getFunctionName(codePathNode);
295295

296-
// This is a valid code path for React hooks if we are direcly in a React
296+
// This is a valid code path for React hooks if we are directly in a React
297297
// function component or we are in a hook function.
298298
const isSomewhereInsideComponentOrHook = isInsideComponentOrHook(
299299
codePathNode,
@@ -422,7 +422,7 @@ export default {
422422
// false positives due to feature flag checks. We're less
423423
// sensitive to them in classes because hooks would produce
424424
// runtime errors in classes anyway, and because a use*()
425-
// call in a class, if it works, is unambigously *not* a hook.
425+
// call in a class, if it works, is unambiguously *not* a hook.
426426
} else if (codePathFunctionName) {
427427
// Custom message if we found an invalid function name.
428428
const message =
@@ -476,7 +476,7 @@ export default {
476476
};
477477

478478
/**
479-
* Gets tbe static name of a function AST node. For function declarations it is
479+
* Gets the static name of a function AST node. For function declarations it is
480480
* easy. For anonymous function expressions it is much harder. If you search for
481481
* `IsAnonymousFunctionDefinition()` in the ECMAScript spec you'll find places
482482
* where JS gives anonymous function expressions names. We roughly detect the

packages/react-reconciler/src/ReactChildFiber.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ function ChildReconciler(shouldTrackSideEffects) {
736736
newChildren: Array<*>,
737737
expirationTime: ExpirationTime,
738738
): Fiber | null {
739-
// This algorithm can't optimize by searching from boths ends since we
739+
// This algorithm can't optimize by searching from both ends since we
740740
// don't have backpointers on fibers. I'm trying to see how far we can get
741741
// with that model. If it ends up not being worth the tradeoffs, we can
742742
// add it later.

packages/react-reconciler/src/ReactFiberHooks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ function updateMemo<T>(
10091009
let shouldWarnForUnbatchedSetState = false;
10101010

10111011
if (__DEV__) {
1012-
// jest isnt' a 'global', it's just exposed to tests via a wrapped function
1012+
// jest isn't a 'global', it's just exposed to tests via a wrapped function
10131013
// further, this isn't a test file, so flow doesn't recognize the symbol. So...
10141014
// $FlowExpectedError - because requirements don't give a damn about your type sigs.
10151015
if ('undefined' !== typeof jest) {

packages/react-reconciler/src/ReactFiberScheduler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ function renderRoot(root: FiberRoot, isYieldy: boolean): void {
14551455
return;
14561456
} else if (
14571457
// There's no lower priority work, but we're rendering asynchronously.
1458-
// Synchronsouly attempt to render the same level one more time. This is
1458+
// Synchronously attempt to render the same level one more time. This is
14591459
// similar to a suspend, but without a timeout because we're not waiting
14601460
// for a promise to resolve.
14611461
!root.didError &&

packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ describe('ReactHooks', () => {
352352
]);
353353
expect(root).toMatchRenderedOutput('0 (light)');
354354

355-
// Updating the theme to the same value does't cause the consumers
355+
// Updating the theme to the same value doesn't cause the consumers
356356
// to re-render.
357357
setTheme('light');
358358
expect(root).toFlushAndYield([]);

packages/react-reconciler/src/forks/ReactFiberErrorDialog.www.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import invariant from 'shared/invariant';
1515
const ReactFiberErrorDialogWWW = require('ReactFiberErrorDialog');
1616
invariant(
1717
typeof ReactFiberErrorDialogWWW.showErrorDialog === 'function',
18-
'Expected ReactFiberErrorDialog.showErrorDialog to existbe a function.',
18+
'Expected ReactFiberErrorDialog.showErrorDialog to be a function.',
1919
);
2020

2121
export function showErrorDialog(capturedError: CapturedError): boolean {

packages/scheduler/src/__tests__/SchedulerDOM-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe('SchedulerDOM', () => {
140140
expect(callbackLog).toEqual(['A', 'B']);
141141
});
142142

143-
it("accepts callbacks betweeen animationFrame and postMessage and doesn't stall", () => {
143+
it("accepts callbacks between animationFrame and postMessage and doesn't stall", () => {
144144
const {unstable_scheduleCallback: scheduleCallback} = Scheduler;
145145
const callbackLog = [];
146146
const callbackA = jest.fn(() => callbackLog.push('A'));

packages/shared/invokeGuardedCallbackImpl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (__DEV__) {
3636
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
3737
// like caught exceptions, and the DevTools won't pause unless the developer
3838
// takes the extra step of enabling pause on caught exceptions. This is
39-
// untintuitive, though, because even though React has caught the error, from
39+
// unintuitive, though, because even though React has caught the error, from
4040
// the developer's perspective, the error is uncaught.
4141
//
4242
// To preserve the expected "Pause on exceptions" behavior, we don't use a

0 commit comments

Comments
 (0)