Skip to content

Commit c16ec5d

Browse files
seangranseeaweary
authored andcommitted
fix misspellings in comments and tests (facebook#8946)
* fix misspellings in comments and tests * revert change in docs/js/react-dom.js
1 parent 890d52b commit c16ec5d

File tree

12 files changed

+20
-19
lines changed

12 files changed

+20
-19
lines changed

docs/_css/bourbon/helpers/_linear-positions-parser.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$side: nth($pos, 2);
1212

1313
@if $length == 2 { // eg. to top
14-
// Swap for backwards compatability
14+
// Swap for backwards compatibility
1515
$degree: _position-flipper(nth($pos, 2));
1616
}
1717
@else if $length == 3 { // eg. to top left
@@ -38,7 +38,7 @@
3838
$spec: to $side $corner;
3939
}
4040
@else if $length == 1 {
41-
// Swap for backwards compatability
41+
// Swap for backwards compatibility
4242
@if $type == string {
4343
$degree: $pos;
4444
$spec: to _position-flipper($pos);

fixtures/dom/public/react-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ document.write('<script src="' + REACT_PATH + '"></script>');
3838
if (version === 'local' || parseFloat(version, 10) > 0.13) {
3939
document.write('<script src="' + DOM_PATH + '"></script>');
4040
} else {
41-
// Aliasing React to ReactDOM for compatability.
41+
// Aliasing React to ReactDOM for compatibility.
4242
document.write('<script>ReactDOM = React</script>');
4343
}

scripts/error-codes/__tests__/invertObject-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('invertObject', () => {
3838
});
3939
});
4040

41-
it('should perserve the original order', () => {
41+
it('should preserve the original order', () => {
4242
expect(Object.keys(invertObject({
4343
a: '3',
4444
b: '4',

scripts/fiber/tests-passing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ scripts/error-codes/__tests__/invertObject-test.js
3232
* should return an empty object for an empty input
3333
* should invert key-values
3434
* should take the last value when there're duplications in vals
35-
* should perserve the original order
35+
* should preserve the original order
3636

3737
src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
3838
* provides a default shouldComponentUpdate implementation

src/renderers/dom/fiber/ReactDOMFiberComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ var ReactDOMFiberComponent = {
479479
} else if (props.is) {
480480
domElement = ownerDocument.createElement(type, props.is);
481481
} else {
482-
// Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
482+
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
483483
// See discussion in https://github.com/facebook/react/pull/6896
484484
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
485485
domElement = ownerDocument.createElement(type);

src/renderers/dom/stack/client/ReactDOMComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ ReactDOMComponent.Mixin = {
578578
} else if (props.is) {
579579
el = ownerDocument.createElement(type, props.is);
580580
} else {
581-
// Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
581+
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
582582
// See discussion in https://github.com/facebook/react/pull/6896
583583
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
584584
el = ownerDocument.createElement(type);

src/renderers/native/ReactNativeAttributePayload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ function diffProperties(
332332
}
333333

334334
// An explicit value of undefined is treated as a null because it overrides
335-
// any other preceeding value.
335+
// any other preceding value.
336336
if (typeof nextProp === 'undefined') {
337337
nextProp = (null : any);
338338
if (typeof prevProp === 'undefined') {

src/renderers/native/ReactNativeEventEmitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ var ReactNativeEventEmitter = {
189189
if (__DEV__) {
190190
warning(
191191
false,
192-
'A view is reporting that a touch occured on tag zero.'
192+
'A view is reporting that a touch occurred on tag zero.'
193193
);
194194
}
195195
} else {

src/renderers/shared/fiber/ReactFiberScheduler.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
231231

232232
// Before we start any new work, let's make sure that we have a fresh
233233
// stack to work from.
234-
// TODO: This call is burried a bit too deep. It would be nice to have
234+
// TODO: This call is buried a bit too deep. It would be nice to have
235235
// a single point which happens right before any new work and
236236
// unfortunately this is it.
237237
resetContextStack();
@@ -629,7 +629,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
629629
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
630630
}
631631
if (nextUnitOfWork === null) {
632-
// If performUnitOfWork returns null, that means we just comitted
632+
// If performUnitOfWork returns null, that means we just committed
633633
// a root. Normally we'd need to clear any errors that were scheduled
634634
// during the commit phase. But we're already clearing errors, so
635635
// we can continue.
@@ -696,7 +696,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
696696
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
697697
if (nextUnitOfWork === null) {
698698
nextUnitOfWork = findNextUnitOfWork();
699-
// performUnitOfWork returned null, which means we just comitted a
699+
// performUnitOfWork returned null, which means we just committed a
700700
// root. Clear any errors that were scheduled during the commit phase.
701701
clearErrors();
702702
}
@@ -746,8 +746,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
746746
} catch (error) {
747747
// We caught an error during either the begin or complete phases.
748748
const failedWork = nextUnitOfWork;
749+
749750
if (failedWork !== null) {
750-
// Reset the priority context to its value before reconcilation.
751+
// Reset the priority context to its value before reconciliation.
751752
priorityContext = priorityContextBeforeReconciliation;
752753

753754
// "Capture" the error by finding the nearest boundary. If there is no

src/renderers/shared/fiber/ReactFiberUpdateQueue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function findInsertionPosition(queue, update) : Update | null {
210210
// To solve this, in the case where the incoming update needs to be inserted
211211
// into two different positions, we'll make a clone of the update and insert
212212
// each copy into a separate queue. This forks the list while maintaining a
213-
// persistent stucture, because the update that is added to the work-in-progress
213+
// persistent structure, because the update that is added to the work-in-progress
214214
// is always added to the front of the list.
215215
//
216216
// However, if incoming update is inserted into the same position of both lists,

src/renderers/shared/fiber/__tests__/ReactIncremental-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ describe('ReactIncremental', () => {
502502

503503
ops = [];
504504

505-
// Interupt the rendering with a quick update. This should not touch the
505+
// Interrupt the rendering with a quick update. This should not touch the
506506
// middle content.
507507
ReactNoop.render(<Foo text="foo" text2="bar" step={0} />);
508508
ReactNoop.flush();
@@ -528,7 +528,7 @@ describe('ReactIncremental', () => {
528528

529529
ops = [];
530530

531-
// but we'll interupt it to render some higher priority work.
531+
// but we'll interrupt it to render some higher priority work.
532532
// The middle content will bailout so it remains untouched.
533533
ReactNoop.render(<Foo text="foo" text2="bar" step={1} />);
534534
ReactNoop.flushDeferredPri(30);
@@ -694,7 +694,7 @@ describe('ReactIncremental', () => {
694694

695695
ops = [];
696696

697-
// but we'll interupt it to render some higher priority work.
697+
// but we'll interrupt it to render some higher priority work.
698698
// The middle content will bailout so it remains untouched.
699699
ReactNoop.render(<Foo text="foo" step={1} />);
700700
ReactNoop.flushDeferredPri(30);

src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('ReactIncrementalSideEffects', () => {
406406
div(div(span('Hi'), span('foo'))),
407407
]);
408408

409-
// The first Bar has already completed its update but we'll interupt it to
409+
// The first Bar has already completed its update but we'll interrupt it to
410410
// render some higher priority work. The middle content will bailout so
411411
// it remains untouched which means that it should reuse it next time.
412412
ReactNoop.render(<Foo text="foo" step={1} />);
@@ -472,7 +472,7 @@ describe('ReactIncrementalSideEffects', () => {
472472
div(div(span('Hi'), span('foo'))),
473473
]);
474474

475-
// The first Bar has already completed its update but we'll interupt it to
475+
// The first Bar has already completed its update but we'll interrupt it to
476476
// render some higher priority work. The middle content will bailout so
477477
// it remains untouched which means that it should reuse it next time.
478478
ReactNoop.render(<Foo text="foo" step={1} />);

0 commit comments

Comments
 (0)