fix spelling mistakes (#14805)
zhuoli99 committed
Feb 9, 2019 at 16:43 UTC
c11015ff4f610ac2924d1fc6d569a17657a404fd
8 files changed
+10
-10
packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
+3
-3
@@ -293,7 +293,7 @@ export default {
293
// hook functions.
294
const codePathFunctionName = getFunctionName(codePathNode);
295
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
297
// function component or we are in a hook function.
298
const isSomewhereInsideComponentOrHook = isInsideComponentOrHook(
299
codePathNode,
@@ -422,7 +422,7 @@ export default {
422
// false positives due to feature flag checks. We're less
423
// sensitive to them in classes because hooks would produce
424
// 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.
426
} else if (codePathFunctionName) {
427
// Custom message if we found an invalid function name.
428
const message =
@@ -476,7 +476,7 @@ export default {
476
};
477
478
/**
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
480
* easy. For anonymous function expressions it is much harder. If you search for
481
* `IsAnonymousFunctionDefinition()` in the ECMAScript spec you'll find places
482
* where JS gives anonymous function expressions names. We roughly detect the
packages/react-reconciler/src/ReactChildFiber.js
+1
-1
@@ -736,7 +736,7 @@ function ChildReconciler(shouldTrackSideEffects) {
736
newChildren: Array<*>,
737
expirationTime: ExpirationTime,
738
): 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
740
// don't have backpointers on fibers. I'm trying to see how far we can get
741
// with that model. If it ends up not being worth the tradeoffs, we can
742
// add it later.
packages/react-reconciler/src/ReactFiberHooks.js
+1
-1
@@ -1009,7 +1009,7 @@ function updateMemo<T>(
1009
let shouldWarnForUnbatchedSetState = false;
1010
1011
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
1013
// further, this isn't a test file, so flow doesn't recognize the symbol. So...
1014
// $FlowExpectedError - because requirements don't give a damn about your type sigs.
1015
if ('undefined' !== typeof jest) {
packages/react-reconciler/src/ReactFiberScheduler.js
+1
-1
@@ -1455,7 +1455,7 @@ function renderRoot(root: FiberRoot, isYieldy: boolean): void {
1455
return;
1456
} else if (
1457
// 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
1459
// similar to a suspend, but without a timeout because we're not waiting
1460
// for a promise to resolve.
1461
!root.didError &&
packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+1
-1
@@ -352,7 +352,7 @@ describe('ReactHooks', () => {
352
]);
353
expect(root).toMatchRenderedOutput('0 (light)');
354
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
356
// to re-render.
357
setTheme('light');
358
expect(root).toFlushAndYield([]);
packages/react-reconciler/src/forks/ReactFiberErrorDialog.www.js
+1
-1
@@ -15,7 +15,7 @@ import invariant from 'shared/invariant';
15
const ReactFiberErrorDialogWWW = require('ReactFiberErrorDialog');
16
invariant(
17
typeof ReactFiberErrorDialogWWW.showErrorDialog === 'function',
18
- 'Expected ReactFiberErrorDialog.showErrorDialog to existbe a function.',
18
+ 'Expected ReactFiberErrorDialog.showErrorDialog to be a function.',
19
);
20
21
export function showErrorDialog(capturedError: CapturedError): boolean {
packages/scheduler/src/__tests__/SchedulerDOM-test.js
+1
-1
@@ -140,7 +140,7 @@ describe('SchedulerDOM', () => {
140
expect(callbackLog).toEqual(['A', 'B']);
141
});
142
143
- it("accepts callbacks betweeen animationFrame and postMessage and doesn't stall", () => {
143
+ it("accepts callbacks between animationFrame and postMessage and doesn't stall", () => {
144
const {unstable_scheduleCallback: scheduleCallback} = Scheduler;
145
const callbackLog = [];
146
const callbackA = jest.fn(() => callbackLog.push('A'));
packages/shared/invokeGuardedCallbackImpl.js
+1
-1
@@ -36,7 +36,7 @@ if (__DEV__) {
36
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
37
// like caught exceptions, and the DevTools won't pause unless the developer
38
// 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
40
// the developer's perspective, the error is uncaught.
41
//
42
// To preserve the expected "Pause on exceptions" behavior, we don't use a