From c16ec5df137fbd96420935aa2bc0d2d678e11838 Mon Sep 17 00:00:00 2001 From: Sean Gransee Date: Mon, 13 Feb 2017 16:01:54 -0600 Subject: [PATCH] fix misspellings in comments and tests (#8946) * fix misspellings in comments and tests * revert change in docs/js/react-dom.js --- docs/_css/bourbon/helpers/_linear-positions-parser.scss | 4 ++-- fixtures/dom/public/react-loader.js | 2 +- scripts/error-codes/__tests__/invertObject-test.js | 2 +- scripts/fiber/tests-passing.txt | 2 +- src/renderers/dom/fiber/ReactDOMFiberComponent.js | 2 +- src/renderers/dom/stack/client/ReactDOMComponent.js | 2 +- src/renderers/native/ReactNativeAttributePayload.js | 2 +- src/renderers/native/ReactNativeEventEmitter.js | 2 +- src/renderers/shared/fiber/ReactFiberScheduler.js | 9 +++++---- src/renderers/shared/fiber/ReactFiberUpdateQueue.js | 2 +- .../shared/fiber/__tests__/ReactIncremental-test.js | 6 +++--- .../fiber/__tests__/ReactIncrementalSideEffects-test.js | 4 ++-- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/docs/_css/bourbon/helpers/_linear-positions-parser.scss b/docs/_css/bourbon/helpers/_linear-positions-parser.scss index d26383edce..9d619301ef 100644 --- a/docs/_css/bourbon/helpers/_linear-positions-parser.scss +++ b/docs/_css/bourbon/helpers/_linear-positions-parser.scss @@ -11,7 +11,7 @@ $side: nth($pos, 2); @if $length == 2 { // eg. to top - // Swap for backwards compatability + // Swap for backwards compatibility $degree: _position-flipper(nth($pos, 2)); } @else if $length == 3 { // eg. to top left @@ -38,7 +38,7 @@ $spec: to $side $corner; } @else if $length == 1 { - // Swap for backwards compatability + // Swap for backwards compatibility @if $type == string { $degree: $pos; $spec: to _position-flipper($pos); diff --git a/fixtures/dom/public/react-loader.js b/fixtures/dom/public/react-loader.js index f9f3c4d419..f738275848 100644 --- a/fixtures/dom/public/react-loader.js +++ b/fixtures/dom/public/react-loader.js @@ -38,6 +38,6 @@ document.write(''); if (version === 'local' || parseFloat(version, 10) > 0.13) { document.write(''); } else { - // Aliasing React to ReactDOM for compatability. + // Aliasing React to ReactDOM for compatibility. document.write(''); } diff --git a/scripts/error-codes/__tests__/invertObject-test.js b/scripts/error-codes/__tests__/invertObject-test.js index 1b8c35c6fe..dff7c25035 100644 --- a/scripts/error-codes/__tests__/invertObject-test.js +++ b/scripts/error-codes/__tests__/invertObject-test.js @@ -38,7 +38,7 @@ describe('invertObject', () => { }); }); - it('should perserve the original order', () => { + it('should preserve the original order', () => { expect(Object.keys(invertObject({ a: '3', b: '4', diff --git a/scripts/fiber/tests-passing.txt b/scripts/fiber/tests-passing.txt index fa094df4a3..31a56f4890 100644 --- a/scripts/fiber/tests-passing.txt +++ b/scripts/fiber/tests-passing.txt @@ -32,7 +32,7 @@ scripts/error-codes/__tests__/invertObject-test.js * should return an empty object for an empty input * should invert key-values * should take the last value when there're duplications in vals -* should perserve the original order +* should preserve the original order src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js * provides a default shouldComponentUpdate implementation diff --git a/src/renderers/dom/fiber/ReactDOMFiberComponent.js b/src/renderers/dom/fiber/ReactDOMFiberComponent.js index 3dd082083c..a3384446f4 100644 --- a/src/renderers/dom/fiber/ReactDOMFiberComponent.js +++ b/src/renderers/dom/fiber/ReactDOMFiberComponent.js @@ -479,7 +479,7 @@ var ReactDOMFiberComponent = { } else if (props.is) { domElement = ownerDocument.createElement(type, props.is); } else { - // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. // See discussion in https://github.com/facebook/react/pull/6896 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 domElement = ownerDocument.createElement(type); diff --git a/src/renderers/dom/stack/client/ReactDOMComponent.js b/src/renderers/dom/stack/client/ReactDOMComponent.js index 26a574851a..ccf746daee 100644 --- a/src/renderers/dom/stack/client/ReactDOMComponent.js +++ b/src/renderers/dom/stack/client/ReactDOMComponent.js @@ -578,7 +578,7 @@ ReactDOMComponent.Mixin = { } else if (props.is) { el = ownerDocument.createElement(type, props.is); } else { - // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. // See discussion in https://github.com/facebook/react/pull/6896 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 el = ownerDocument.createElement(type); diff --git a/src/renderers/native/ReactNativeAttributePayload.js b/src/renderers/native/ReactNativeAttributePayload.js index 6c6e4f9da2..c84d7284ab 100644 --- a/src/renderers/native/ReactNativeAttributePayload.js +++ b/src/renderers/native/ReactNativeAttributePayload.js @@ -332,7 +332,7 @@ function diffProperties( } // An explicit value of undefined is treated as a null because it overrides - // any other preceeding value. + // any other preceding value. if (typeof nextProp === 'undefined') { nextProp = (null : any); if (typeof prevProp === 'undefined') { diff --git a/src/renderers/native/ReactNativeEventEmitter.js b/src/renderers/native/ReactNativeEventEmitter.js index 6100bee894..72ff28d6ab 100644 --- a/src/renderers/native/ReactNativeEventEmitter.js +++ b/src/renderers/native/ReactNativeEventEmitter.js @@ -189,7 +189,7 @@ var ReactNativeEventEmitter = { if (__DEV__) { warning( false, - 'A view is reporting that a touch occured on tag zero.' + 'A view is reporting that a touch occurred on tag zero.' ); } } else { diff --git a/src/renderers/shared/fiber/ReactFiberScheduler.js b/src/renderers/shared/fiber/ReactFiberScheduler.js index e88126f696..f3040a58df 100644 --- a/src/renderers/shared/fiber/ReactFiberScheduler.js +++ b/src/renderers/shared/fiber/ReactFiberScheduler.js @@ -231,7 +231,7 @@ module.exports = function(config : HostConfig(config : HostConfig(config : HostConfig(config : HostConfig { ops = []; - // Interupt the rendering with a quick update. This should not touch the + // Interrupt the rendering with a quick update. This should not touch the // middle content. ReactNoop.render(); ReactNoop.flush(); @@ -528,7 +528,7 @@ describe('ReactIncremental', () => { ops = []; - // but we'll interupt it to render some higher priority work. + // but we'll interrupt it to render some higher priority work. // The middle content will bailout so it remains untouched. ReactNoop.render(); ReactNoop.flushDeferredPri(30); @@ -694,7 +694,7 @@ describe('ReactIncremental', () => { ops = []; - // but we'll interupt it to render some higher priority work. + // but we'll interrupt it to render some higher priority work. // The middle content will bailout so it remains untouched. ReactNoop.render(); ReactNoop.flushDeferredPri(30); diff --git a/src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js b/src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js index 3a128b6065..b6c24ccbe6 100644 --- a/src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js +++ b/src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js @@ -406,7 +406,7 @@ describe('ReactIncrementalSideEffects', () => { div(div(span('Hi'), span('foo'))), ]); - // The first Bar has already completed its update but we'll interupt it to + // The first Bar has already completed its update but we'll interrupt it to // render some higher priority work. The middle content will bailout so // it remains untouched which means that it should reuse it next time. ReactNoop.render(); @@ -472,7 +472,7 @@ describe('ReactIncrementalSideEffects', () => { div(div(span('Hi'), span('foo'))), ]); - // The first Bar has already completed its update but we'll interupt it to + // The first Bar has already completed its update but we'll interrupt it to // render some higher priority work. The middle content will bailout so // it remains untouched which means that it should reuse it next time. ReactNoop.render();