Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix spelling mistakes #14805

Merged
merged 2 commits into from
Feb 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default {
// hook functions.
const codePathFunctionName = getFunctionName(codePathNode);

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

/**
* Gets tbe static name of a function AST node. For function declarations it is
* Gets the static name of a function AST node. For function declarations it is
* easy. For anonymous function expressions it is much harder. If you search for
* `IsAnonymousFunctionDefinition()` in the ECMAScript spec you'll find places
* where JS gives anonymous function expressions names. We roughly detect the
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChildren: Array<*>,
expirationTime: ExpirationTime,
): Fiber | null {
// This algorithm can't optimize by searching from boths ends since we
// This algorithm can't optimize by searching from both ends since we
// don't have backpointers on fibers. I'm trying to see how far we can get
// with that model. If it ends up not being worth the tradeoffs, we can
// add it later.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ function updateMemo<T>(
let shouldWarnForUnbatchedSetState = false;

if (__DEV__) {
// jest isnt' a 'global', it's just exposed to tests via a wrapped function
// jest isn't a 'global', it's just exposed to tests via a wrapped function
// further, this isn't a test file, so flow doesn't recognize the symbol. So...
// $FlowExpectedError - because requirements don't give a damn about your type sigs.
if ('undefined' !== typeof jest) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ function renderRoot(root: FiberRoot, isYieldy: boolean): void {
return;
} else if (
// There's no lower priority work, but we're rendering asynchronously.
// Synchronsouly attempt to render the same level one more time. This is
// Synchronously attempt to render the same level one more time. This is
// similar to a suspend, but without a timeout because we're not waiting
// for a promise to resolve.
!root.didError &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ describe('ReactHooks', () => {
]);
expect(root).toMatchRenderedOutput('0 (light)');

// Updating the theme to the same value does't cause the consumers
// Updating the theme to the same value doesn't cause the consumers
// to re-render.
setTheme('light');
expect(root).toFlushAndYield([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import invariant from 'shared/invariant';
const ReactFiberErrorDialogWWW = require('ReactFiberErrorDialog');
invariant(
typeof ReactFiberErrorDialogWWW.showErrorDialog === 'function',
'Expected ReactFiberErrorDialog.showErrorDialog to existbe a function.',
'Expected ReactFiberErrorDialog.showErrorDialog to be a function.',
);

export function showErrorDialog(capturedError: CapturedError): boolean {
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/__tests__/SchedulerDOM-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('SchedulerDOM', () => {
expect(callbackLog).toEqual(['A', 'B']);
});

it("accepts callbacks betweeen animationFrame and postMessage and doesn't stall", () => {
it("accepts callbacks between animationFrame and postMessage and doesn't stall", () => {
const {unstable_scheduleCallback: scheduleCallback} = Scheduler;
const callbackLog = [];
const callbackA = jest.fn(() => callbackLog.push('A'));
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/invokeGuardedCallbackImpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (__DEV__) {
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
// like caught exceptions, and the DevTools won't pause unless the developer
// takes the extra step of enabling pause on caught exceptions. This is
// untintuitive, though, because even though React has caught the error, from
// unintuitive, though, because even though React has caught the error, from
// the developer's perspective, the error is uncaught.
//
// To preserve the expected "Pause on exceptions" behavior, we don't use a
Expand Down