diff --git a/Libraries/Animated/src/NativeAnimatedHelper.js b/Libraries/Animated/src/NativeAnimatedHelper.js index 92143fec40e..1cff92883fd 100644 --- a/Libraries/Animated/src/NativeAnimatedHelper.js +++ b/Libraries/Animated/src/NativeAnimatedHelper.js @@ -31,7 +31,7 @@ let queueConnections = false; let queue = []; /** - * Simple wrappers around NativeAnimatedModule to provide flow and autocmplete support for + * Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for * the native module methods */ const API = { diff --git a/Libraries/Animated/src/__tests__/bezier-test.js b/Libraries/Animated/src/__tests__/bezier-test.js index e70026dca8d..bab93c372a4 100644 --- a/Libraries/Animated/src/__tests__/bezier-test.js +++ b/Libraries/Animated/src/__tests__/bezier-test.js @@ -115,7 +115,7 @@ describe('bezier', function() { }); }); }); - describe('symetric curves', function() { + describe('symmetric curves', function() { it('should have a central value y~=0.5 at x=0.5', function() { repeat(10)(function() { const a = Math.random(), diff --git a/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js b/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js index 37425cd7652..667799a42f4 100644 --- a/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +++ b/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js @@ -11,7 +11,7 @@ /** * Dummy module that only exists for the sake of proving that the message queue - * correctly dispatches to commonJS modules. The `testHook` is overriden by test + * correctly dispatches to commonJS modules. The `testHook` is overridden by test * cases. */ const MessageQueueTestModule = { diff --git a/Libraries/BatchedBridge/__tests__/MessageQueue-test.js b/Libraries/BatchedBridge/__tests__/MessageQueue-test.js index 0c2db74b526..85c2ca97130 100644 --- a/Libraries/BatchedBridge/__tests__/MessageQueue-test.js +++ b/Libraries/BatchedBridge/__tests__/MessageQueue-test.js @@ -125,7 +125,7 @@ describe('MessageQueue', function() { expect(factory).toHaveBeenCalledTimes(1); }); - it('should check if the global error handler is not overriden by the DebuggerInternal object', () => { + it('should check if the global error handler is not overridden by the DebuggerInternal object', () => { const dummyModule = { dummy: function() {}, }; @@ -137,7 +137,7 @@ describe('MessageQueue', function() { expect(queue.__shouldPauseOnThrow).toHaveBeenCalledTimes(2); }); - it('should check if the global error handler is overriden by the DebuggerInternal object', () => { + it('should check if the global error handler is overridden by the DebuggerInternal object', () => { const dummyModule = { dummy: function() {}, }; diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index afba54f5f2d..a16c4b49d23 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -532,7 +532,7 @@ export type Props = $ReadOnly<{| */ snapToOffsets?: ?$ReadOnlyArray, /** - * Use in conjuction with `snapToOffsets`. By default, the beginning + * Use in conjunction with `snapToOffsets`. By default, the beginning * of the list counts as a snap offset. Set `snapToStart` to false to disable * this behavior and allow the list to scroll freely between its start and * the first `snapToOffsets` offset. @@ -540,7 +540,7 @@ export type Props = $ReadOnly<{| */ snapToStart?: ?boolean, /** - * Use in conjuction with `snapToOffsets`. By default, the end + * Use in conjunction with `snapToOffsets`. By default, the end * of the list counts as a snap offset. Set `snapToEnd` to false to disable * this behavior and allow the list to scroll freely between its end and * the last `snapToOffsets` offset. @@ -561,7 +561,7 @@ export type Props = $ReadOnly<{| * * See [RefreshControl](docs/refreshcontrol.html). */ - // $FlowFixMe - how to handle generic type without existential opereator? + // $FlowFixMe - how to handle generic type without existential operator? refreshControl?: ?React.Element, children?: React.Node, |}>; diff --git a/Libraries/Components/StatusBar/StatusBar.js b/Libraries/Components/StatusBar/StatusBar.js index 7617f77dbc1..42b40fc5e5e 100644 --- a/Libraries/Components/StatusBar/StatusBar.js +++ b/Libraries/Components/StatusBar/StatusBar.js @@ -377,7 +377,7 @@ class StatusBar extends React.Component { // Every time a StatusBar component is mounted, we push it's prop to a stack // and always update the native status bar with the props from the top of then // stack. This allows having multiple StatusBar components and the one that is - // added last or is deeper in the view hierachy will have priority. + // added last or is deeper in the view hierarchy will have priority. this._stackEntry = StatusBar.pushStackEntry(this.props); } diff --git a/Libraries/Components/Touchable/TouchableOpacity.js b/Libraries/Components/Touchable/TouchableOpacity.js index 5c5e96a0f68..8a052616c31 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.js +++ b/Libraries/Components/Touchable/TouchableOpacity.js @@ -52,7 +52,7 @@ type Props = $ReadOnly<{| * On press down, the opacity of the wrapped view is decreased, dimming it. * * Opacity is controlled by wrapping the children in an Animated.View, which is - * added to the view hiearchy. Be aware that this can affect layout. + * added to the view hierarchy. Be aware that this can affect layout. * * Example: * diff --git a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js b/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js index ed0622ab428..f44691bb7bc 100644 --- a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +++ b/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js @@ -20,6 +20,6 @@ type NativeProps = $ReadOnly<{| name?: WithDefault, |}>; -// NOTE: This compoenent is not implemented in paper +// NOTE: This component is not implemented in paper // Do not require this file in paper builds export default codegenNativeComponent('UnimplementedNativeView'); diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index fd7af713bce..5684752ac5b 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -151,7 +151,7 @@ type State = { }; class WindowedListView extends React.Component { /** - * Recomputing which rows to render is batched up and run asynchronously to avoid wastful updates, + * Recomputing which rows to render is batched up and run asynchronously to avoid wasteful updates, * e.g. from multiple layout updates in rapid succession. */ _computeRowsToRenderBatcher: Batchinator; @@ -390,7 +390,7 @@ class WindowedListView extends React.Component { } this._updateVisibleRows(firstVisible, lastVisible); - // Unfortuantely, we can't use to simplify our increment logic in this function + // Unfortunately, we can't use to simplify our increment logic in this function // because we need to make sure that cells are rendered in the right order one at a time when // scrolling back up. @@ -646,7 +646,7 @@ type CellProps = { * after offscreen rendering has completed, includeInLayout will be set true and the finished cell * can be dropped into place. * - * This is coordinated outside this component so the parent can syncronize this re-render with + * This is coordinated outside this component so the parent can synchronize this re-render with * managing the placeholder sizing. */ includeInLayout: boolean, @@ -656,7 +656,7 @@ type CellProps = { */ onNewLayout: (params: {rowKey: string, layout: Object}) => void, /** - * Used to track when rendering is in progress so the parent can avoid wastedful re-renders that + * Used to track when rendering is in progress so the parent can avoid wasteful re-renders that * are just going to be invalidated once the cell finishes. */ onProgressChange: (progress: {rowKey: string, inProgress: boolean}) => void, diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index 13a485f4122..6b73c03b844 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -136,7 +136,7 @@ RCT_EXPORT_MODULE() - (void)setImageCache:(id)cache { if (_imageCache) { - RCTLogWarn(@"RCTImageCache was already set and has now been overriden."); + RCTLogWarn(@"RCTImageCache was already set and has now been overridden."); } _imageCache = cache; } diff --git a/Libraries/Interaction/__tests__/InteractionManager-test.js b/Libraries/Interaction/__tests__/InteractionManager-test.js index 83e7ca36164..a9abd62f5c6 100644 --- a/Libraries/Interaction/__tests__/InteractionManager-test.js +++ b/Libraries/Interaction/__tests__/InteractionManager-test.js @@ -16,7 +16,7 @@ jest const isWindows = process.platform === 'win32'; function expectToBeCalledOnce(fn) { - // todo fix this test case on widnows + // todo fix this test case on windows if (isWindows) { return; } diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 1a43b19eefb..939aceee6ff 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -1180,7 +1180,7 @@ class VirtualizedList extends React.PureComponent { if (!this._scrollRef) { return; } - // We are asuming that getOutermostParentListRef().getScrollRef() + // We are assuming that getOutermostParentListRef().getScrollRef() // is a non-null reference to a ScrollView this._scrollRef.measureLayout( this.context.virtualizedList diff --git a/Libraries/Lists/__tests__/VirtualizeUtils-test.js b/Libraries/Lists/__tests__/VirtualizeUtils-test.js index fe67ef79fff..86125a3a29b 100644 --- a/Libraries/Lists/__tests__/VirtualizeUtils-test.js +++ b/Libraries/Lists/__tests__/VirtualizeUtils-test.js @@ -34,7 +34,7 @@ describe('newRangeCount', function() { it('handles front extension', function() { expect(newRangeCount({first: 1, last: 4}, {first: 0, last: 4})).toBe(1); }); - it('handles forward insersect', function() { + it('handles forward intersect', function() { expect(newRangeCount({first: 1, last: 4}, {first: 3, last: 6})).toBe(2); }); it('handles reverse intersect', function() { diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index 46466eb4b2a..726255b131f 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -169,7 +169,7 @@ class Modal extends React.Component { getChildContext() { // Reset the context so VirtualizedList doesn't get confused by nesting - // in the React tree that doesn't reflect the native component heirarchy. + // in the React tree that doesn't reflect the native component hierarchy. return { virtualizedList: null, }; diff --git a/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h b/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h index 376f9e60268..b6ad4c1d73d 100644 --- a/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h +++ b/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h @@ -31,7 +31,7 @@ - (void)setNeedsUpdate NS_REQUIRES_SUPER; /** - * The node will update its value if necesarry and only after its parents have updated. + * The node will update its value if necessary and only after its parents have updated. */ - (void)updateNodeIfNecessary NS_REQUIRES_SUPER; diff --git a/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m b/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m index 6f61e084a47..f8582a86452 100644 --- a/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m +++ b/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m @@ -110,7 +110,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) - (void)performUpdate { _needsUpdate = NO; - // To be overidden by subclasses + // To be overridden by subclasses // This method is called on a node only if it has been marked for update // during the current update loop } diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedModule.m b/Libraries/NativeAnimation/RCTNativeAnimatedModule.m index cbaa41509b8..048ae22c223 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedModule.m +++ b/Libraries/NativeAnimation/RCTNativeAnimatedModule.m @@ -14,7 +14,7 @@ typedef void (^AnimatedOperation)(RCTNativeAnimatedNodesManager *nodesManager); { RCTNativeAnimatedNodesManager *_nodesManager; - // Oparations called after views have been updated. + // Operations called after views have been updated. NSMutableArray *_operations; // Operations called before views have been updated. NSMutableArray *_preOperations; diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index fe7c273e59e..4f152f78777 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -9975,7 +9975,7 @@ function updateReducer(reducer, initialArg, init) { } hook.memoizedState = newState; - // Don't persist the state accumlated from the render phase updates to + // Don't persist the state accumulated from the render phase updates to // the base state unless the queue is empty. // TODO: Not sure if this is the desired semantics, but it's what we // do for gDSFP. I can't remember why. @@ -14233,7 +14233,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { } if (nextDidTimeout && !prevDidTimeout) { - // If this subtreee is running in concurrent mode we can suspend, + // If this subtree is running in concurrent mode we can suspend, // otherwise we won't suspend. // TODO: This will still suspend a synchronous tree if anything // in the concurrent tree already suspended during this render. @@ -14247,7 +14247,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if not prevDidTimeout. if (nextDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. workInProgress.effectTag |= Update; } @@ -14256,7 +14256,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if these values are non equal, i.e. it changed. if (nextDidTimeout || prevDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. In mutation mode, we also need the flag to // *unhide* children that were previously hidden, so check if the // is currently timed out, too. @@ -15901,7 +15901,7 @@ function throwException( sourceFiber.tag = IncompleteClassComponent; } else { // When we try rendering again, we should not reuse the current fiber, - // since it's known to be in an inconsistent state. Use a force updte to + // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. var update = createUpdate(Sync); update.tag = ForceUpdate; @@ -16291,7 +16291,7 @@ function scheduleUpdateOnFiber(fiber, expirationTime) { // Flush the synchronous work now, wnless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of // scheduleCallbackForFiber to preserve the ability to schedule a callback - // without immediately flushing it. We only do this for user-initated + // without immediately flushing it. We only do this for user-initiated // updates, to preserve historical behavior of sync mode. flushImmediateQueue(); } @@ -16758,7 +16758,7 @@ function renderRoot(root, expirationTime, isSync) { if (!isSync) { // If we're rendering asynchronously, it's possible the error was // caused by tearing due to a mutation during an event. Try rendering - // one more time without yiedling to events. + // one more time without yielding to events. prepareFreshStack(root, expirationTime); scheduleCallback( ImmediatePriority, diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.js b/Libraries/Renderer/implementations/ReactFabric-dev.js index e80eac23729..bf5bf2e2634 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.js @@ -9971,7 +9971,7 @@ function updateReducer(reducer, initialArg, init) { } hook.memoizedState = newState; - // Don't persist the state accumlated from the render phase updates to + // Don't persist the state accumulated from the render phase updates to // the base state unless the queue is empty. // TODO: Not sure if this is the desired semantics, but it's what we // do for gDSFP. I can't remember why. @@ -14229,7 +14229,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { } if (nextDidTimeout && !prevDidTimeout) { - // If this subtreee is running in concurrent mode we can suspend, + // If this subtree is running in concurrent mode we can suspend, // otherwise we won't suspend. // TODO: This will still suspend a synchronous tree if anything // in the concurrent tree already suspended during this render. @@ -14243,7 +14243,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if not prevDidTimeout. if (nextDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. workInProgress.effectTag |= Update; } @@ -14252,7 +14252,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if these values are non equal, i.e. it changed. if (nextDidTimeout || prevDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. In mutation mode, we also need the flag to // *unhide* children that were previously hidden, so check if the // is currently timed out, too. @@ -15897,7 +15897,7 @@ function throwException( sourceFiber.tag = IncompleteClassComponent; } else { // When we try rendering again, we should not reuse the current fiber, - // since it's known to be in an inconsistent state. Use a force updte to + // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. var update = createUpdate(Sync); update.tag = ForceUpdate; @@ -16287,7 +16287,7 @@ function scheduleUpdateOnFiber(fiber, expirationTime) { // Flush the synchronous work now, wnless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of // scheduleCallbackForFiber to preserve the ability to schedule a callback - // without immediately flushing it. We only do this for user-initated + // without immediately flushing it. We only do this for user-initiated // updates, to preserve historical behavior of sync mode. flushImmediateQueue(); } @@ -16754,7 +16754,7 @@ function renderRoot(root, expirationTime, isSync) { if (!isSync) { // If we're rendering asynchronously, it's possible the error was // caused by tearing due to a mutation during an event. Try rendering - // one more time without yiedling to events. + // one more time without yielding to events. prepareFreshStack(root, expirationTime); scheduleCallback( ImmediatePriority, diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 39549939d1f..1e808ddf484 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -10290,7 +10290,7 @@ function updateReducer(reducer, initialArg, init) { } hook.memoizedState = newState; - // Don't persist the state accumlated from the render phase updates to + // Don't persist the state accumulated from the render phase updates to // the base state unless the queue is empty. // TODO: Not sure if this is the desired semantics, but it's what we // do for gDSFP. I can't remember why. @@ -14548,7 +14548,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { } if (nextDidTimeout && !prevDidTimeout) { - // If this subtreee is running in concurrent mode we can suspend, + // If this subtree is running in concurrent mode we can suspend, // otherwise we won't suspend. // TODO: This will still suspend a synchronous tree if anything // in the concurrent tree already suspended during this render. @@ -14562,7 +14562,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if not prevDidTimeout. if (nextDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. workInProgress.effectTag |= Update; } @@ -14571,7 +14571,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if these values are non equal, i.e. it changed. if (nextDidTimeout || prevDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. In mutation mode, we also need the flag to // *unhide* children that were previously hidden, so check if the // is currently timed out, too. @@ -16215,7 +16215,7 @@ function throwException( sourceFiber.tag = IncompleteClassComponent; } else { // When we try rendering again, we should not reuse the current fiber, - // since it's known to be in an inconsistent state. Use a force updte to + // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. var update = createUpdate(Sync); update.tag = ForceUpdate; @@ -16605,7 +16605,7 @@ function scheduleUpdateOnFiber(fiber, expirationTime) { // Flush the synchronous work now, wnless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of // scheduleCallbackForFiber to preserve the ability to schedule a callback - // without immediately flushing it. We only do this for user-initated + // without immediately flushing it. We only do this for user-initiated // updates, to preserve historical behavior of sync mode. flushImmediateQueue(); } @@ -17072,7 +17072,7 @@ function renderRoot(root, expirationTime, isSync) { if (!isSync) { // If we're rendering asynchronously, it's possible the error was // caused by tearing due to a mutation during an event. Try rendering - // one more time without yiedling to events. + // one more time without yielding to events. prepareFreshStack(root, expirationTime); scheduleCallback( ImmediatePriority, diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js index 80543677439..18c851787d1 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js @@ -10286,7 +10286,7 @@ function updateReducer(reducer, initialArg, init) { } hook.memoizedState = newState; - // Don't persist the state accumlated from the render phase updates to + // Don't persist the state accumulated from the render phase updates to // the base state unless the queue is empty. // TODO: Not sure if this is the desired semantics, but it's what we // do for gDSFP. I can't remember why. @@ -14544,7 +14544,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { } if (nextDidTimeout && !prevDidTimeout) { - // If this subtreee is running in concurrent mode we can suspend, + // If this subtree is running in concurrent mode we can suspend, // otherwise we won't suspend. // TODO: This will still suspend a synchronous tree if anything // in the concurrent tree already suspended during this render. @@ -14558,7 +14558,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if not prevDidTimeout. if (nextDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. workInProgress.effectTag |= Update; } @@ -14567,7 +14567,7 @@ function completeWork(current, workInProgress, renderExpirationTime) { // TODO: Only schedule updates if these values are non equal, i.e. it changed. if (nextDidTimeout || prevDidTimeout) { // If this boundary just timed out, schedule an effect to attach a - // retry listener to the proimse. This flag is also used to hide the + // retry listener to the promise. This flag is also used to hide the // primary children. In mutation mode, we also need the flag to // *unhide* children that were previously hidden, so check if the // is currently timed out, too. @@ -16211,7 +16211,7 @@ function throwException( sourceFiber.tag = IncompleteClassComponent; } else { // When we try rendering again, we should not reuse the current fiber, - // since it's known to be in an inconsistent state. Use a force updte to + // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. var update = createUpdate(Sync); update.tag = ForceUpdate; @@ -16601,7 +16601,7 @@ function scheduleUpdateOnFiber(fiber, expirationTime) { // Flush the synchronous work now, wnless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of // scheduleCallbackForFiber to preserve the ability to schedule a callback - // without immediately flushing it. We only do this for user-initated + // without immediately flushing it. We only do this for user-initiated // updates, to preserve historical behavior of sync mode. flushImmediateQueue(); } @@ -17068,7 +17068,7 @@ function renderRoot(root, expirationTime, isSync) { if (!isSync) { // If we're rendering asynchronously, it's possible the error was // caused by tearing due to a mutation during an event. Try rendering - // one more time without yiedling to events. + // one more time without yielding to events. prepareFreshStack(root, expirationTime); scheduleCallback( ImmediatePriority, diff --git a/Libraries/StyleSheet/StyleSheet.js b/Libraries/StyleSheet/StyleSheet.js index 2692dd5892e..3c3352e37df 100644 --- a/Libraries/StyleSheet/StyleSheet.js +++ b/Libraries/StyleSheet/StyleSheet.js @@ -279,7 +279,7 @@ module.exports = { * > **NOTE**: Exercise caution as abusing this can tax you in terms of * > optimizations. * > - * > IDs enable optimizations through the bridge and memory in general. Refering + * > IDs enable optimizations through the bridge and memory in general. Referring * > to style objects directly will deprive you of these optimizations. * * Example: diff --git a/Libraries/StyleSheet/__tests__/normalizeColor-test.js b/Libraries/StyleSheet/__tests__/normalizeColor-test.js index 974fa5ef995..094bd0a812c 100644 --- a/Libraries/StyleSheet/__tests__/normalizeColor-test.js +++ b/Libraries/StyleSheet/__tests__/normalizeColor-test.js @@ -28,7 +28,7 @@ describe('normalizeColor', function() { expect(normalizeColor(0xffffffff + 1)).toBe(null); }); - it('should temporarly accept floating point values for rgb', function() { + it('should temporarily accept floating point values for rgb', function() { expect(normalizeColor('rgb(1.1, 2.1, 3.1)')).toBe(0x010203ff); expect(normalizeColor('rgba(1.1, 2.1, 3.1, 1.0)')).toBe(0x010203ff); }); diff --git a/Libraries/Text/RCTTextAttributes.m b/Libraries/Text/RCTTextAttributes.m index ceefb2e49df..fe815c393f1 100644 --- a/Libraries/Text/RCTTextAttributes.m +++ b/Libraries/Text/RCTTextAttributes.m @@ -37,7 +37,7 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib - (void)applyTextAttributes:(RCTTextAttributes *)textAttributes { - // Note: All lines marked with `*` does not use explicit/correct rules to compare old and new values becuase + // Note: All lines marked with `*` does not use explicit/correct rules to compare old and new values because // their types do not have special designated value representing undefined/unspecified/inherit meaning. // We will address this in the future. diff --git a/Libraries/Text/Text/RCTTextShadowView.m b/Libraries/Text/Text/RCTTextShadowView.m index a1243e3243c..50007186bd4 100644 --- a/Libraries/Text/Text/RCTTextShadowView.m +++ b/Libraries/Text/Text/RCTTextShadowView.m @@ -116,7 +116,7 @@ [descendantViews addObject:descendantView]; }]; - // Removing all references to Shadow Views to avoid unnececery retainning. + // Removing all references to Shadow Views to avoid unnecessary retaining. [textStorage removeAttribute:RCTBaseTextShadowViewEmbeddedShadowViewAttributeName range:NSMakeRange(0, textStorage.length)]; [textView setTextStorage:textStorage diff --git a/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m b/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m index c6cc08bb8bf..65ff83dd9fb 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m @@ -137,7 +137,7 @@ NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTextWithBaseTextAttributes:nil]]; - // Removing all references to Shadow Views and tags to avoid unnececery retainning + // Removing all references to Shadow Views and tags to avoid unnecessary retaining // and problems with comparing the strings. [attributedText removeAttribute:RCTBaseTextShadowViewEmbeddedShadowViewAttributeName range:NSMakeRange(0, attributedText.length)]; @@ -195,7 +195,7 @@ if (attributedText.length == 0) { // It's impossible to measure empty attributed string because all attributes are - // assosiated with some characters, so no characters means no data. + // associated with some characters, so no characters means no data. // Placeholder also can represent the intrinsic size when it is visible. NSString *text = self.placeholder; diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index c82c7b8142e..9fb8fab726f 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -93,13 +93,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) } - (BOOL)textOf:(NSAttributedString*)newText equals:(NSAttributedString*)oldText{ - // When the dictation is running we can't update the attibuted text on the backed up text view + // When the dictation is running we can't update the attributed text on the backed up text view // because setting the attributed string will kill the dictation. This means that we can't impose // the settings on a dictation. // Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the // text that we should disregard. See https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc // for more info. - // If the user added an emoji, the sytem adds a font attribute for the emoji and stores the original font in NSOriginalFont. + // If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in NSOriginalFont. // Lastly, when entering a password, etc., there will be additional styling on the field as the native text view // handles showing the last character for a split second. __block BOOL fontHasBeenUpdatedBySystem = false; diff --git a/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js b/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js index 2895c46ef34..ef5cc10d42d 100644 --- a/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js +++ b/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js @@ -187,7 +187,7 @@ describe('buildStyleInterpolator', function() { }); }); }); - it('should detect chnages correctly', function() { + it('should detect changes correctly', function() { const testAnim = { opacity: { from: 0, diff --git a/Libraries/Utilities/createPerformanceLogger.js b/Libraries/Utilities/createPerformanceLogger.js index 589998241d2..0e27a9c0e73 100644 --- a/Libraries/Utilities/createPerformanceLogger.js +++ b/Libraries/Utilities/createPerformanceLogger.js @@ -51,7 +51,7 @@ const _cookies: {[key: string]: number} = {}; const PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally committing `true`; /** - * This function creates peformance loggers that can be used to collect and log + * This function creates performance loggers that can be used to collect and log * various performance data such as timespans, points and extras. * The loggers need to have minimal overhead since they're used in production. */ diff --git a/Libraries/Wrapper/RCTWrapperView.m b/Libraries/Wrapper/RCTWrapperView.m index af24bb6e95f..6fc328d0eba 100644 --- a/Libraries/Wrapper/RCTWrapperView.m +++ b/Libraries/Wrapper/RCTWrapperView.m @@ -74,7 +74,7 @@ [super invalidateIntrinsicContentSize]; // Setting `intrinsicContentSize` dirties the Yoga node and - // enfoce Yoga to call `measure` function (backed to `measureBlock`). + // enforce Yoga to call `measure` function (backed to `measureBlock`). [_bridge.uiManager setIntrinsicContentSize:self.intrinsicContentSize forView:self]; } diff --git a/Libraries/YellowBox/Data/__tests__/YellowBoxRegistry-test.js b/Libraries/YellowBox/Data/__tests__/YellowBoxRegistry-test.js index 35a6dc9b8cf..fb154371730 100644 --- a/Libraries/YellowBox/Data/__tests__/YellowBoxRegistry-test.js +++ b/Libraries/YellowBox/Data/__tests__/YellowBoxRegistry-test.js @@ -185,7 +185,7 @@ describe('YellowBoxRegistry', () => { expect(observer.mock.calls[0][0]).toBe(registry()); }); - it('sends batched updates asynchoronously', () => { + it('sends batched updates asynchronously', () => { const {observer} = observe(); expect(observer.mock.calls.length).toBe(1); diff --git a/RNTester/RCTTest/FBSnapshotTestCase/FBSnapshotTestController.h b/RNTester/RCTTest/FBSnapshotTestCase/FBSnapshotTestController.h index 501d5b64590..84963de46d1 100644 --- a/RNTester/RCTTest/FBSnapshotTestCase/FBSnapshotTestController.h +++ b/RNTester/RCTTest/FBSnapshotTestCase/FBSnapshotTestController.h @@ -55,7 +55,7 @@ extern NSString *const FBReferenceImageFilePathKey; Performs the comparison of the view. @param view The view to snapshot. @param selector selector - @param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method. + @param identifier An optional identifier, used is there are multiple snapshot tests in a given -test method. @param errorPtr An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc). @returns YES if the comparison (or saving of the reference image) succeeded. */ diff --git a/RNTester/RNTesterUnitTests/RCTAllocationTests.m b/RNTester/RNTesterUnitTests/RCTAllocationTests.m index ffff8cfdda6..df95cfaff05 100644 --- a/RNTester/RNTesterUnitTests/RCTAllocationTests.m +++ b/RNTester/RNTesterUnitTests/RCTAllocationTests.m @@ -176,7 +176,7 @@ RCT_EXPORT_METHOD(test:(__unused NSString *)a /** * T42930872: * - * Both bridge invalidation and bridge setUp occurr execute concurrently. + * Both bridge invalidation and bridge setUp occur execute concurrently. * Therefore, it's not safe for us to create a bridge, and immediately reload on * it. It's also unsafe to just reload the bridge, because that calls invalidate * and then setUp. Because of these race conditions, this test may randomly diff --git a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m index 223dc13b811..3b1155e25da 100644 --- a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m +++ b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m @@ -1031,7 +1031,7 @@ static id RCTPropChecker(NSString *prop, NSNumber *value) */ - (void) testSpringTrackingRetainsSpeed { - // this spring config correspomds to tension 20 and friction 0.5 which makes the spring settle + // this spring config corresponds to tension 20 and friction 0.5 which makes the spring settle // very slowly NSDictionary *springConfig = @{@"type": @"spring", @"restSpeedThreshold": @0.001, diff --git a/RNTester/js/examples/Animated/AnimatedGratuitousApp/AnExTilt.js b/RNTester/js/examples/Animated/AnimatedGratuitousApp/AnExTilt.js index 95f5117771f..005177a8196 100644 --- a/RNTester/js/examples/Animated/AnimatedGratuitousApp/AnExTilt.js +++ b/RNTester/js/examples/Animated/AnimatedGratuitousApp/AnExTilt.js @@ -67,7 +67,7 @@ class AnExTilt extends React.Component { _startBurnsZoom() { this.state.burns.setValue(1); // reset to beginning Animated.decay(this.state.burns, { - velocity: 1, // sublte zoom + velocity: 1, // subtle zoom deceleration: 0.9999, // slow decay }).start(); } diff --git a/RNTester/js/examples/Timer/TimerExample.js b/RNTester/js/examples/Timer/TimerExample.js index 59a792b6b46..b0a0ce8223f 100644 --- a/RNTester/js/examples/Timer/TimerExample.js +++ b/RNTester/js/examples/Timer/TimerExample.js @@ -208,7 +208,7 @@ class TimerTester extends React.Component { this._immediateId = setImmediate(this._run); }; } else if (this.props.type === 'setInterval') { - this._iters = 30; // Only used for forceUpdate periodicidy + this._iters = 30; // Only used for forceUpdate periodicity this._timerFn = null; this._intervalId = setInterval(this._run, this.props.dt); } diff --git a/React/Base/RCTBridge.h b/React/Base/RCTBridge.h index a58ecb8113f..969035b5a94 100644 --- a/React/Base/RCTBridge.h +++ b/React/Base/RCTBridge.h @@ -112,7 +112,7 @@ RCT_EXTERN NSString *const RCTBridgeDidDownloadScriptNotificationBridgeDescripti /** * This block can be used to instantiate modules that require additional * init parameters, or additional configuration prior to being used. - * The bridge will call this block to instatiate the modules, and will + * The bridge will call this block to instantiate the modules, and will * be responsible for invalidating/releasing them when the bridge is destroyed. * For this reason, the block should always return new module instances, and * module instances should not be shared between bridges. @@ -180,7 +180,7 @@ RCT_EXTERN void RCTEnableTurboModule(BOOL enabled); /** * Retrieve a bridge module instance by name or class. Note that modules are * lazily instantiated, so calling these methods for the first time with a given - * module name/class may cause the class to be sychronously instantiated, + * module name/class may cause the class to be synchronously instantiated, * potentially blocking both the calling thread and main thread for a short time. * * Note: This method does NOT lazily load the particular module if it's not yet loaded. @@ -198,7 +198,7 @@ RCT_EXTERN void RCTEnableTurboModule(BOOL enabled); /** * Convenience method for retrieving all modules conforming to a given protocol. - * Modules will be sychronously instantiated if they haven't already been, + * Modules will be synchronously instantiated if they haven't already been, * potentially blocking both the calling thread and main thread for a short time. */ - (NSArray *)modulesConformingToProtocol:(Protocol *)protocol; diff --git a/React/Base/RCTBridgeModule.h b/React/Base/RCTBridgeModule.h index 54a27802cbd..8d95f4d9110 100644 --- a/React/Base/RCTBridgeModule.h +++ b/React/Base/RCTBridgeModule.h @@ -291,7 +291,7 @@ RCT_CONCAT(initialize_, objc_name)() { RCTRegisterModule([objc_name class]); } * Most modules can be used from any thread. All of the modules exported non-sync method will be called on its * methodQueue, and the module will be constructed lazily when its first invoked. Some modules have main need to access * information that's main queue only (e.g. most UIKit classes). Since we don't want to dispatch synchronously to the - * main thread to this safely, we construct these moduels and export their constants ahead-of-time. + * main thread to this safely, we construct these modules and export their constants ahead-of-time. * * Note that when set to false, the module constructor will be called from any thread. * diff --git a/React/Base/RCTComponentEvent.h b/React/Base/RCTComponentEvent.h index 28c94074c57..443fadca038 100644 --- a/React/Base/RCTComponentEvent.h +++ b/React/Base/RCTComponentEvent.h @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affilities. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/React/Base/RCTComponentEvent.m b/React/Base/RCTComponentEvent.m index 0708bac857e..74c344575e6 100644 --- a/React/Base/RCTComponentEvent.m +++ b/React/Base/RCTComponentEvent.m @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affilities. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/React/Base/RCTModuleData.mm b/React/Base/RCTModuleData.mm index f52d3ae107b..024e7a3cd42 100644 --- a/React/Base/RCTModuleData.mm +++ b/React/Base/RCTModuleData.mm @@ -124,7 +124,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init); _instance = _moduleProvider ? _moduleProvider() : nil; RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @""); if (!_instance) { - // Module init returned nil, probably because automatic instantatiation + // Module init returned nil, probably because automatic instantiation // of the module is not supported, and it is supposed to be passed in to // the bridge constructor. Mark setup complete to avoid doing more work. _setupComplete = YES; diff --git a/React/Base/RCTModuleMethod.mm b/React/Base/RCTModuleMethod.mm index 12a5b197ce2..d6fc7d5344e 100644 --- a/React/Base/RCTModuleMethod.mm +++ b/React/Base/RCTModuleMethod.mm @@ -429,7 +429,7 @@ RCT_EXTERN_C_END } if (isNullableType) { // Check converted value wasn't null either, as method probably - // won't gracefully handle a nil vallue for a nonull argument + // won't gracefully handle a nil value for a nonull argument void *value; [invocation getArgument:&value atIndex:index + 2]; if (value == NULL) { diff --git a/React/Base/RCTRootView.h b/React/Base/RCTRootView.h index 7ef03775aab..920cf6a2f5e 100644 --- a/React/Base/RCTRootView.h +++ b/React/Base/RCTRootView.h @@ -144,7 +144,7 @@ NSString *const RCTContentDidAppearNotification; * The intrinsic size of the root view's content. This is set right before the * `rootViewDidChangeIntrinsicSize` method of `RCTRootViewDelegate` is called. * This property is deprecated and will be removed in next releases. - * Use UIKit `intrinsicContentSize` propery instead. + * Use UIKit `intrinsicContentSize` property instead. */ @property (readonly, nonatomic, assign) CGSize intrinsicSize __deprecated_msg("Use `intrinsicContentSize` instead."); diff --git a/React/Base/RCTRootViewDelegate.h b/React/Base/RCTRootViewDelegate.h index bd3a4f9ac0c..9bd24fa0716 100644 --- a/React/Base/RCTRootViewDelegate.h +++ b/React/Base/RCTRootViewDelegate.h @@ -23,7 +23,7 @@ * `setNeedsLayout` for its superview which in its turn will trigger relayout. * * The new intrinsic content size is available via the `intrinsicContentSize` - * propery of the root view. The view will not resize itself. + * property of the root view. The view will not resize itself. */ - (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView; diff --git a/React/Base/RCTTouchHandler.m b/React/Base/RCTTouchHandler.m index dee8526e174..ceca86bbaf3 100644 --- a/React/Base/RCTTouchHandler.m +++ b/React/Base/RCTTouchHandler.m @@ -234,11 +234,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithTarget:(id)target action:(SEL)action } /*** - * To ensure compatibilty when using UIManager.measure and RCTTouchHandler, we have to adopt + * To ensure compatibility when using UIManager.measure and RCTTouchHandler, we have to adopt * UIManager.measure's behavior in finding a "root view". * Usually RCTTouchHandler is already attached to a root view but in some cases (e.g. Modal), * we are instead attached to some RCTView subtree. This is also the case when embedding some RN - * views inside a seperate ViewController not controlled by RN. + * views inside a separate ViewController not controlled by RN. * This logic will either find the nearest rootView, or go all the way to the UIWindow. * While this is not optimal, it is exactly what UIManager.measure does, and what Touchable.js * relies on. diff --git a/React/Base/Surface/RCTSurface.mm b/React/Base/Surface/RCTSurface.mm index 739caaf91a0..21f42671670 100644 --- a/React/Base/Surface/RCTSurface.mm +++ b/React/Base/Surface/RCTSurface.mm @@ -109,7 +109,7 @@ [[NSNotificationCenter defaultCenter] removeObserver:self]; } -#pragma mark - Immutable Properties (no need to enforce synchonization) +#pragma mark - Immutable Properties (no need to enforce synchronization) - (RCTBridge *)bridge { @@ -126,7 +126,7 @@ return _rootViewTag; } -#pragma mark - Convinience Internal Thread-Safe Properties +#pragma mark - Convenience Internal Thread-Safe Properties - (RCTBridge *)_batchedBridge { @@ -173,7 +173,7 @@ } RCTAssert([rootView isKindOfClass:[RCTSurfaceRootView class]], - @"Received root view is not an instanse of `RCTSurfaceRootView`."); + @"Received root view is not an instance of `RCTSurfaceRootView`."); if (rootView.superview != view) { view.rootView = rootView; @@ -339,7 +339,7 @@ RCTSurfaceRootShadowView *rootShadowView = (RCTSurfaceRootShadowView *)[uiManager shadowViewForReactTag:self->_rootViewTag]; RCTAssert([rootShadowView isKindOfClass:[RCTSurfaceRootShadowView class]], - @"Received shadow view is not an instanse of `RCTSurfaceRootShadowView`."); + @"Received shadow view is not an instance of `RCTSurfaceRootShadowView`."); [rootShadowView setMinimumSize:minimumSize maximumSize:maximumSize]; @@ -360,7 +360,7 @@ (RCTSurfaceRootShadowView *)[uiManager shadowViewForReactTag:self->_rootViewTag]; RCTAssert([rootShadowView isKindOfClass:[RCTSurfaceRootShadowView class]], - @"Received shadow view is not an instanse of `RCTSurfaceRootShadowView`."); + @"Received shadow view is not an instance of `RCTSurfaceRootShadowView`."); fittingSize = [rootShadowView sizeThatFitsMinimumSize:minimumSize maximumSize:maximumSize]; @@ -396,7 +396,7 @@ RCTSurfaceRootShadowView *rootShadowView = (RCTSurfaceRootShadowView *)[uiManager shadowViewForReactTag:self->_rootViewTag]; RCTAssert([rootShadowView isKindOfClass:[RCTSurfaceRootShadowView class]], - @"Received shadow view is not an instanse of `RCTSurfaceRootShadowView`."); + @"Received shadow view is not an instance of `RCTSurfaceRootShadowView`."); [rootShadowView setMinimumSize:minimumSize maximumSize:maximumSize]; [uiManager setNeedsLayout]; @@ -452,7 +452,7 @@ if (RCTIsMainQueue() && (stage & RCTSurfaceStageSurfaceDidInitialMounting)) { // All main-threaded execution (especially mounting process) has to be - // intercepted, captured and performed synchnously at the end of this method + // intercepted, captured and performed synchronously at the end of this method // right after the semaphore signals. // Atomic variant of `_waitingForMountingStageOnMainQueue = YES;` diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index bd93cf804a2..bd48f44f3f5 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -865,7 +865,7 @@ struct RCTInstanceCallback : public InstanceCallback { if (initializeImmediately && RCTIsMainQueue()) { block(); } else { - // We've already checked that dispatchGroup is non-null, but this satisifies the + // We've already checked that dispatchGroup is non-null, but this satisfies the // Xcode analyzer if (dispatchGroup) { dispatch_group_async(dispatchGroup, dispatch_get_main_queue(), block); @@ -1153,7 +1153,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR // work to the JS queue directly. if (self.loading || _pendingCount > 0) { - // From the callers' perspecive: + // From the callers' perspective: // Phase 1: jsQueueBlocks are added to the queue; _pendingCount is // incremented for each. If the first block is created after self.loading is diff --git a/React/CxxModule/RCTCxxMethod.mm b/React/CxxModule/RCTCxxMethod.mm index 2559a9ccac9..fcda4e57f9c 100644 --- a/React/CxxModule/RCTCxxMethod.mm +++ b/React/CxxModule/RCTCxxMethod.mm @@ -57,7 +57,7 @@ using namespace facebook::react; // is also baked into _method. // the last N arguments are callbacks, according to the Method data. The - // preceding arguments are values whic have already been parsed from JS: they + // preceding arguments are values which have already been parsed from JS: they // may be NSNumber (bool, int, double), NSString, NSArray, or NSObject. CxxModule::Callback first; diff --git a/React/DevSupport/RCTPackagerClient.h b/React/DevSupport/RCTPackagerClient.h index e0877bbbc0b..3181d43d004 100644 --- a/React/DevSupport/RCTPackagerClient.h +++ b/React/DevSupport/RCTPackagerClient.h @@ -29,7 +29,7 @@ extern const int RCT_PACKAGER_CLIENT_PROTOCOL_VERSION; @optional -/** By default object will receive its methods on the main queue, unless this method is overriden. */ +/** By default object will receive its methods on the main queue, unless this method is overridden. */ - (dispatch_queue_t)methodQueue; @end diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h index 8416d2b902d..d58465de681 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN /** * `UIScrollView` subclass which has some improvements and tweaks - * wich are not directly related to React. + * which are not directly related to React. */ @interface RCTEnhancedScrollView : UIScrollView diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index 2b989fcffe7..a3d55f0fd07 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN * and `padding`) of the component. * This view must not be a component view; it's just a convenient way * to embed/bridge pure native views as component views. - * Defaults to `nil`. Assing `nil` to remove view as subview. + * Defaults to `nil`. Assign `nil` to remove view as subview. */ @property (nonatomic, strong, nullable) UIView *contentView; diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index c90da107117..8c67f8f0457 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -459,7 +459,7 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle) CGFloat cornerRadius = 0; if (self.clipsToBounds) { if (borderMetrics.borderRadii.isUniform()) { - // In this case we can simply use `cornerRadius` exclusivly. + // In this case we can simply use `cornerRadius` exclusively. cornerRadius = borderMetrics.borderRadii.topLeft; } else { // In this case we have to generate masking layer manually. diff --git a/React/Fabric/Mounting/RCTComponentViewRegistry.h b/React/Fabric/Mounting/RCTComponentViewRegistry.h index a85308002f6..d86b021e725 100644 --- a/React/Fabric/Mounting/RCTComponentViewRegistry.h +++ b/React/Fabric/Mounting/RCTComponentViewRegistry.h @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN - (UIView *)componentViewByTag:(ReactTag)tag; /** - * Returns `tag` assosiated with given `componentView`. + * Returns `tag` associated with given `componentView`. */ - (ReactTag)tagByComponentView:(UIView *)componentView; diff --git a/React/Fabric/Surface/RCTFabricSurface.mm b/React/Fabric/Surface/RCTFabricSurface.mm index 044139fbe85..77ae024a4c1 100644 --- a/React/Fabric/Surface/RCTFabricSurface.mm +++ b/React/Fabric/Surface/RCTFabricSurface.mm @@ -88,7 +88,7 @@ [self stop]; } -#pragma mark - Immutable Properties (no need to enforce synchonization) +#pragma mark - Immutable Properties (no need to enforce synchronization) - (NSString *)moduleName { diff --git a/React/Inspector/RCTInspectorPackagerConnection.m b/React/Inspector/RCTInspectorPackagerConnection.m index 905e5871196..aa1289c3546 100644 --- a/React/Inspector/RCTInspectorPackagerConnection.m +++ b/React/Inspector/RCTInspectorPackagerConnection.m @@ -246,7 +246,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) return; } - // The corresopnding android code has a lot of custom config options for + // The corresponding android code has a lot of custom config options for // timeouts, but it appears the iOS RCTSRWebSocket API doesn't have the same // implemented options. _webSocket = [[RCTSRWebSocket alloc] initWithURL:_url]; diff --git a/React/Modules/RCTAccessibilityManager.m b/React/Modules/RCTAccessibilityManager.m index 7283947731e..cf41839935b 100644 --- a/React/Modules/RCTAccessibilityManager.m +++ b/React/Modules/RCTAccessibilityManager.m @@ -232,7 +232,7 @@ RCT_EXPORT_MODULE() { NSNumber *m = self.multipliers[category]; if (m.doubleValue <= 0.0) { - RCTLogError(@"Can't determinte multiplier for category %@. Using 1.0.", category); + RCTLogError(@"Can't determine multiplier for category %@. Using 1.0.", category); m = @1.0; } return m.doubleValue; diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index e41801b35dd..840b4501805 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -279,7 +279,7 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation) @"Attempt to register rootTag (%@) which is not actually root tag.", rootTag); RCTAssert(![_rootViewTags containsObject:rootTag], - @"Attempt to register rootTag (%@) which was already registred.", rootTag); + @"Attempt to register rootTag (%@) which was already registered.", rootTag); [_rootViewTags addObject:rootTag]; @@ -1203,7 +1203,7 @@ RCT_EXPORT_METHOD(dispatchViewManagerCommand:(nonnull NSNumber *)reactTag // so we have to maintain this collection properly. NSArray *previousProps; if ((previousProps = [_shadowViewsWithUpdatedProps objectForKey:shadowView])) { - // Merging already registred changed props and new ones. + // Merging already registered changed props and new ones. NSMutableSet *set = [NSMutableSet setWithArray:previousProps]; [set addObjectsFromArray:props]; props = [set allObjects]; @@ -1324,7 +1324,7 @@ RCT_EXPORT_METHOD(measureInWindow:(nonnull NSNumber *)reactTag } /** - * Returs if the shadow view provided has the `ancestor` shadow view as + * Returns if the shadow view provided has the `ancestor` shadow view as * an actual ancestor. */ RCT_EXPORT_METHOD(viewIsDescendantOf:(nonnull NSNumber *)reactTag diff --git a/React/Modules/RCTUIManagerUtils.h b/React/Modules/RCTUIManagerUtils.h index 9edbe4b1cf1..895399c06e0 100644 --- a/React/Modules/RCTUIManagerUtils.h +++ b/React/Modules/RCTUIManagerUtils.h @@ -85,7 +85,7 @@ RCT_EXTERN BOOL RCTIsPseudoUIManagerQueue(void); RCT_EXTERN void RCTExecuteOnUIManagerQueue(dispatch_block_t block); /** - * *Synchorously* executes the specified block on the UIManager queue. + * *Synchronously* executes the specified block on the UIManager queue. * Unlike `dispatch_sync()` this will execute the block immediately * if we're already on the UIManager queue. * Please do not use this unless you really know what you're doing. diff --git a/React/Views/RCTBorderDrawing.m b/React/Views/RCTBorderDrawing.m index a92db477910..540245c1922 100644 --- a/React/Views/RCTBorderDrawing.m +++ b/React/Views/RCTBorderDrawing.m @@ -456,7 +456,7 @@ static UIImage *RCTGetSolidBorderImage(RCTCornerRadii cornerRadii, // +------------------+ // // -// Note that this approach will produce discontinous colour changes at the edge +// Note that this approach will produce discontinuous colour changes at the edge // (which is okay). The reason is that Quartz does not currently support drawing // of gradients _along_ a path (NB: clipping a path and drawing a linear gradient // is _not_ equivalent). diff --git a/React/Views/RCTShadowView+Layout.h b/React/Views/RCTShadowView+Layout.h index e99d60da647..9d68015030d 100644 --- a/React/Views/RCTShadowView+Layout.h +++ b/React/Views/RCTShadowView+Layout.h @@ -25,14 +25,14 @@ * Designated method to control dirty propagation mechanism. * Dirties the shadow view (and all affected shadow views, usually a superview) * in terms of layout. - * The default implementaion does nothing. + * The default implementation does nothing. */ - (void)dirtyLayout; /** * Designated method to control dirty propagation mechanism. * Clears (makes not dirty) the shadow view. - * The default implementaion does nothing. + * The default implementation does nothing. */ - (void)clearLayout; diff --git a/React/Views/RCTShadowView+Layout.m b/React/Views/RCTShadowView+Layout.m index a4c39f208b7..da110cc740b 100644 --- a/React/Views/RCTShadowView+Layout.m +++ b/React/Views/RCTShadowView+Layout.m @@ -64,12 +64,12 @@ - (void)dirtyLayout { - // The default implementaion does nothing. + // The default implementation does nothing. } - (void)clearLayout { - // The default implementaion does nothing. + // The default implementation does nothing. } @end diff --git a/React/Views/RCTViewManager.m b/React/Views/RCTViewManager.m index bdc9ecccd84..fcc7fa0271b 100644 --- a/React/Views/RCTViewManager.m +++ b/React/Views/RCTViewManager.m @@ -121,7 +121,7 @@ RCT_EXPORT_VIEW_PROPERTY(hasTVPreferredFocus, BOOL) RCT_EXPORT_VIEW_PROPERTY(tvParallaxProperties, NSDictionary) #endif -// Acessibility related properties +// Accessibility related properties RCT_REMAP_VIEW_PROPERTY(accessible, reactAccessibilityElement.isAccessibilityElement, BOOL) RCT_REMAP_VIEW_PROPERTY(accessibilityActions, reactAccessibilityElement.accessibilityActions, NSDictionaryArray) RCT_REMAP_VIEW_PROPERTY(accessibilityLabel, reactAccessibilityElement.accessibilityLabel, NSString) diff --git a/React/Views/ScrollView/RCTScrollContentShadowView.m b/React/Views/ScrollView/RCTScrollContentShadowView.m index 7d4e2f78f81..16bf6147c0f 100644 --- a/React/Views/ScrollView/RCTScrollContentShadowView.m +++ b/React/Views/ScrollView/RCTScrollContentShadowView.m @@ -18,7 +18,7 @@ { if (layoutMetrics.layoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) { // Motivation: - // Yoga place `contentView` on the right side of `scrollView` when RTL layout is enfoced. + // Yoga place `contentView` on the right side of `scrollView` when RTL layout is enforced. // That breaks everything; it is completely pointless to (re)position `contentView` // because it is `contentView`'s job. So, we work around it here. diff --git a/React/Views/ScrollView/RCTScrollView.m b/React/Views/ScrollView/RCTScrollView.m index 0e0b882a02c..b028f020ceb 100644 --- a/React/Views/ScrollView/RCTScrollView.m +++ b/React/Views/ScrollView/RCTScrollView.m @@ -170,7 +170,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) [self.panGestureRecognizer addTarget:self action:@selector(handleCustomPan:)]; if ([self respondsToSelector:@selector(setSemanticContentAttribute:)]) { - // We intentionaly force `UIScrollView`s `semanticContentAttribute` to `LTR` here + // We intentionally force `UIScrollView`s `semanticContentAttribute` to `LTR` here // because this attribute affects a position of vertical scrollbar; we don't want this // scrollbar flip because we also flip it with whole `UIScrollView` flip. self.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; @@ -367,7 +367,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) { [super didMoveToWindow]; // ScrollView enables pinch gesture late in its lifecycle. So simply setting it - // in the setter gets overriden when the view loads. + // in the setter gets overridden when the view loads. self.pinchGestureRecognizer.enabled = _pinchGestureEnabled; } #endif //TARGET_OS_TV diff --git a/React/Views/UIView+React.h b/React/Views/UIView+React.h index d79a46f7ccc..501ab2eafdf 100644 --- a/React/Views/UIView+React.h +++ b/React/Views/UIView+React.h @@ -72,7 +72,7 @@ /** * Used by the UIIManager to set the view frame. - * May be overriden to disable animation, etc. + * May be overridden to disable animation, etc. */ - (void)reactSetFrame:(CGRect)frame; @@ -107,7 +107,7 @@ /** * The (sub)view which represents this view in terms of accessibility. * ViewManager will apply all accessibility properties directly to this view. - * May be overriten in view subclass which needs to be accessiblitywise + * May be overridden in view subclass which needs to be accessiblitywise * transparent in favour of some subview. * Defaults to `self`. */ diff --git a/React/Views/UIView+React.m b/React/Views/UIView+React.m index a14707137cf..f5bae6b656e 100644 --- a/React/Views/UIView+React.m +++ b/React/Views/UIView+React.m @@ -290,7 +290,7 @@ return UIEdgeInsetsInsetRect(self.bounds, self.reactCompoundInsets); } -#pragma mark - Accessiblity +#pragma mark - Accessibility - (UIView *)reactAccessibilityElement { diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSCHeapCapture.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSCHeapCapture.java index 350acef7769..41c50998bdf 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSCHeapCapture.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSCHeapCapture.java @@ -15,7 +15,7 @@ import com.facebook.react.module.annotations.ReactModule; import java.io.File; // This module is being called only by Java via the static method "captureHeap" that -// requires it to alreay be initialized, thus we eagerly initialize this module +// requires it to already be initialized, thus we eagerly initialize this module @ReactModule(name = "JSCHeapCapture", needsEagerInit = true) public class JSCHeapCapture extends ReactContextBaseJavaModule { public interface HeapCapture extends JavaScriptModule { diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageEditingManager.java b/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageEditingManager.java index 5d0ef6e77a9..0018e4b7bff 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageEditingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageEditingManager.java @@ -294,7 +294,7 @@ public class ImageEditingManager extends ReactContextBaseJavaModule { */ private Bitmap crop(BitmapFactory.Options outOptions) throws IOException { InputStream inputStream = openBitmapInputStream(); - // Effeciently crops image without loading full resolution into memory + // Efficiently crops image without loading full resolution into memory // https://developer.android.com/reference/android/graphics/BitmapRegionDecoder.html BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(inputStream, false); try { diff --git a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/JSCallInvokerHolderImpl.java b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/JSCallInvokerHolderImpl.java index cf26f53cb1c..e2ffda1ed23 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/JSCallInvokerHolderImpl.java +++ b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/JSCallInvokerHolderImpl.java @@ -13,7 +13,7 @@ import com.facebook.soloader.SoLoader; /** * JSCallInvoker is created at a different time/place (i.e: in CatalystInstance) than * TurboModuleManager. Therefore, we need to wrap JSCallInvoker within a hybrid class so that we may - * pass it from CatalystInstance, through Java, to TurboMoudleManager::initHybrid. + * pass it from CatalystInstance, through Java, to TurboModuleManager::initHybrid. */ public class JSCallInvokerHolderImpl implements JSCallInvokerHolder { static { diff --git a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModuleRegistry.java b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModuleRegistry.java index d0e8d7c1058..e6b72354f68 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModuleRegistry.java +++ b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModuleRegistry.java @@ -9,7 +9,7 @@ package com.facebook.react.turbomodule.core.interfaces; import androidx.annotation.Nullable; import java.util.Collection; -/** Interface to allow for creating and retrieving TurboModuels. */ +/** Interface to allow for creating and retrieving TurboModules. */ public interface TurboModuleRegistry { /** diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java index e57ef122730..640d6d0859f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java @@ -159,7 +159,7 @@ public class ReactAccessibilityDelegate extends AccessibilityDelegateCompat { setRole(info, accessibilityRole, host.getContext()); } - // states are changable. + // states are changeable. final ReadableArray accessibilityStates = (ReadableArray) host.getTag(R.id.accessibility_states); final ReadableMap accessibilityState = (ReadableMap) host.getTag(R.id.accessibility_state); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java index 63a2172a6ef..1fdc329d431 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java @@ -47,7 +47,7 @@ public class CustomLineHeightSpan implements LineHeightSpan, ReactSpan { // Show proportionally additional ascent / top & descent / bottom final int additional = mHeight - (-fm.top + fm.bottom); - // Round up for the negative values and down for the positive values (arbritary choice) + // Round up for the negative values and down for the positive values (arbitrary choice) // So that bottom - top equals additional even if it's an odd number. fm.top -= Math.ceil(additional / 2.0f); fm.bottom += Math.floor(additional / 2.0f); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java index 308cedb2af4..361426cdd19 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java @@ -36,7 +36,7 @@ import java.util.Map; /** * {@link ReactShadowNode} abstract class for spannable text nodes. * - *

This class handles all text attributes assosiated with {@code }-ish node. A concrete + *

This class handles all text attributes associated with {@code }-ish node. A concrete * node can be an anchor {@code } node, an anchor {@code } node or virtual {@code * } node inside {@code } or {@code } node. Or even something else. * @@ -241,7 +241,7 @@ public abstract class ReactBaseTextShadowNode extends LayoutShadowNode { // TODO(5837930): Investigate whether it's worth optimizing this part and do it if so // The {@link SpannableStringBuilder} implementation require setSpan operation to be called - // up-to-bottom, otherwise all the spannables that are withing the region for which one may set + // up-to-bottom, otherwise all the spannables that are within the region for which one may set // a new spannable will be wiped out List ops = new ArrayList<>(); Map inlineViews = diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java index 89d1b39c521..6cfe6bab01b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java @@ -149,7 +149,7 @@ public class TextLayoutManager { SpannableStringBuilder sb = new SpannableStringBuilder(); // The {@link SpannableStringBuilder} implementation require setSpan operation to be called - // up-to-bottom, otherwise all the spannables that are withing the region for which one may set + // up-to-bottom, otherwise all the spannables that are within the region for which one may set // a new spannable will be wiped out List ops = new ArrayList<>(); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java index c1a88cdb24b..1e9fea92381 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java @@ -263,7 +263,7 @@ public class ReactViewManager extends ViewGroupManager { view.setOnClickListener(null); view.setClickable(false); // Don't set view.setFocusable(false) because we might still want it to be focusable for - // accessibiliy reasons + // accessibility reasons } } diff --git a/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/CoreClasses.h b/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/CoreClasses.h index 5960d4774de..7ff8bceb482 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/CoreClasses.h +++ b/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/CoreClasses.h @@ -10,7 +10,7 @@ /** @file CoreClasses.h * * In CoreClasses.h wrappers for the core classes (jobject, jclass, and jstring) is defined - * to provide access to corresponding JNI functions + some conveniance. + * to provide access to corresponding JNI functions + some convenience. */ #include "References-forward.h" diff --git a/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/Iterator.h b/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/Iterator.h index 1fae26fb21e..606e6a5ed3a 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/Iterator.h +++ b/ReactAndroid/src/main/jni/first-party/fb/include/fb/fbjni/Iterator.h @@ -77,7 +77,7 @@ struct JIterable : JavaClass> { /** * JavaClass types which represent Collection, List, and Set are also provided. - * These preserve the Java class heirarchy. + * These preserve the Java class hierarchy. */ template struct JCollection : JavaClass, JIterable> { diff --git a/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java b/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java index 1ba4a368f6b..70bb5ae04c4 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java +++ b/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java @@ -1139,7 +1139,7 @@ public class NativeAnimatedNodeTraversalTest { */ @Test public void testSpringTrackingRetainsSpeed() { - // this spring config correspomds to tension 20 and friction 0.5 which makes the spring settle + // this spring config corresponds to tension 20 and friction 0.5 which makes the spring settle // very slowly JavaOnlyMap springConfig = JavaOnlyMap.of( diff --git a/ReactCommon/cxxreact/JSBigString.cpp b/ReactCommon/cxxreact/JSBigString.cpp index d841295e323..325ac35325b 100644 --- a/ReactCommon/cxxreact/JSBigString.cpp +++ b/ReactCommon/cxxreact/JSBigString.cpp @@ -24,7 +24,7 @@ JSBigFileString::JSBigFileString(int fd, size_t size, off_t offset /*= 0*/) folly::checkUnixError(m_fd = dup(fd), "Could not duplicate file descriptor"); - // Offsets given to mmap must be page aligend. We abstract away that + // Offsets given to mmap must be page aligned. We abstract away that // restriction by sending a page aligned offset to mmap, and keeping track // of the offset within the page that we must alter the mmap pointer by to // get the final desired offset. diff --git a/ReactCommon/cxxreact/MethodCall.cpp b/ReactCommon/cxxreact/MethodCall.cpp index 7141513d174..4657914caef 100644 --- a/ReactCommon/cxxreact/MethodCall.cpp +++ b/ReactCommon/cxxreact/MethodCall.cpp @@ -69,7 +69,7 @@ std::vector parseMethodCalls(folly::dynamic&& jsonData) { std::move(params[i]), callId); - // only incremement callid if contains valid callid as callid is optional + // only increment callid if contains valid callid as callid is optional callId += (callId != -1) ? 1 : 0; } diff --git a/ReactCommon/cxxreact/NativeToJsBridge.cpp b/ReactCommon/cxxreact/NativeToJsBridge.cpp index 2c3893e87e6..315ef714836 100644 --- a/ReactCommon/cxxreact/NativeToJsBridge.cpp +++ b/ReactCommon/cxxreact/NativeToJsBridge.cpp @@ -58,7 +58,7 @@ public: if (isEndOfBatch) { // onBatchComplete will be called on the native (module) queue, but // decrementPendingJSCalls will be called sync. Be aware that the bridge may still - // be processing native calls when the birdge idle signaler fires. + // be processing native calls when the bridge idle signaler fires. if (m_batchHadNativeModuleCalls) { m_callback->onBatchComplete(); m_batchHadNativeModuleCalls = false; diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index 52c70153215..62f9596ffc9 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -225,7 +225,7 @@ YGNode *YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector( int childIndex) { SystraceSection s("YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector"); - // At this point it is garanteed that all shadow nodes associated with yoga + // At this point it is guaranteed that all shadow nodes associated with yoga // nodes are `YogaLayoutableShadowNode` subclasses. auto parentNode = static_cast(parentYogaNode->getContext()); diff --git a/ReactCommon/fabric/core/events/EventBeat.h b/ReactCommon/fabric/core/events/EventBeat.h index 448da6dee2a..664a7292f9f 100644 --- a/ReactCommon/fabric/core/events/EventBeat.h +++ b/ReactCommon/fabric/core/events/EventBeat.h @@ -17,7 +17,7 @@ namespace react { /* * Event Beat serves two interleaving purposes: synchronization of event queues - * and ensuring that event dispatching happens on propper threads. + * and ensuring that event dispatching happens on proper threads. */ class EventBeat { public: diff --git a/ReactCommon/fabric/core/events/EventEmitter.h b/ReactCommon/fabric/core/events/EventEmitter.h index f819e56b024..def04274ea6 100644 --- a/ReactCommon/fabric/core/events/EventEmitter.h +++ b/ReactCommon/fabric/core/events/EventEmitter.h @@ -68,7 +68,7 @@ class EventEmitter { #endif /* - * Initates an event delivery process. + * Initiates an event delivery process. * Is used by particular subclasses only. */ void dispatchEvent( diff --git a/ReactCommon/fabric/core/layout/LayoutMetrics.h b/ReactCommon/fabric/core/layout/LayoutMetrics.h index cf85510b124..0c1d473112b 100644 --- a/ReactCommon/fabric/core/layout/LayoutMetrics.h +++ b/ReactCommon/fabric/core/layout/LayoutMetrics.h @@ -14,7 +14,7 @@ namespace facebook { namespace react { /* - * Describes results of layout process for partucular shadow node. + * Describes results of layout process for particular shadow node. */ struct LayoutMetrics { Rect frame; diff --git a/ReactCommon/fabric/core/layout/LayoutPrimitives.h b/ReactCommon/fabric/core/layout/LayoutPrimitives.h index 6c6f524aec1..86582e0e3b6 100644 --- a/ReactCommon/fabric/core/layout/LayoutPrimitives.h +++ b/ReactCommon/fabric/core/layout/LayoutPrimitives.h @@ -14,7 +14,7 @@ namespace facebook { namespace react { /* - * Defines visibility of the shadow node and partucular layout + * Defines visibility of the shadow node and particular layout * engine which should be used for laying out the node. */ enum class DisplayType { diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h index d28561cceb8..427f443e21d 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h @@ -37,14 +37,14 @@ class LayoutableShadowNode : public virtual Sealable { virtual ~LayoutableShadowNode() noexcept = default; /* - * Measures the node (and node content, propbably recursivly) with + * Measures the node (and node content, probably recursively) with * given constrains and relying on possible layout. * Default implementation returns zero size. */ virtual Size measure(LayoutConstraints layoutConstraints) const; /* - * Computes layout recusively. + * Computes layout recursively. * Additional environmental constraints might be provided via `layoutContext` * argument. * Default implementation basically calls `layoutChildren()` and then @@ -98,7 +98,7 @@ class LayoutableShadowNode : public virtual Sealable { /* * Applies layout for all children; - * does not call anything in recusive manner *by desing*. + * does not call anything in recursive manner *by desing*. */ virtual void layoutChildren(LayoutContext layoutContext); diff --git a/ReactCommon/fabric/core/primitives/Sealable.cpp b/ReactCommon/fabric/core/primitives/Sealable.cpp index 730e926540c..0fefa8c7572 100644 --- a/ReactCommon/fabric/core/primitives/Sealable.cpp +++ b/ReactCommon/fabric/core/primitives/Sealable.cpp @@ -14,7 +14,7 @@ namespace react { /* * Note: - * We must explictly implement all *the rule of five* methods because: + * We must explicitly implement all *the rule of five* methods because: * 1. Using `std::atomic` behind `sealed_` implicitly deletes default * constructors; * 2. We have to establish behaviour where any new cloned or moved instances diff --git a/ReactCommon/fabric/core/shadownode/LocalData.h b/ReactCommon/fabric/core/shadownode/LocalData.h index 83680c3853b..2e4332fcb2b 100644 --- a/ReactCommon/fabric/core/shadownode/LocalData.h +++ b/ReactCommon/fabric/core/shadownode/LocalData.h @@ -21,7 +21,7 @@ using SharedLocalData = std::shared_ptr; /* * Abstract class for any kind of concrete pieces of local data specific for * some kinds of `ShadowNode`s. - * LocalData might be used to communicate some infomation between `ShadowNode`s + * LocalData might be used to communicate some information between `ShadowNode`s * and native component views. * All `LocalData` objects *must* be immutable (sealed) when they became * a part of the shadow tree. diff --git a/ReactCommon/fabric/core/shadownode/ShadowNode.h b/ReactCommon/fabric/core/shadownode/ShadowNode.h index 3df5efe0a77..1cf57f9ceec 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNode.h +++ b/ReactCommon/fabric/core/shadownode/ShadowNode.h @@ -139,7 +139,7 @@ class ShadowNode : public virtual Sealable, int suggestedIndex = -1); /* - * Sets local data assosiated with the node. + * Sets local data associated with the node. * The node must be unsealed at this point. */ void setLocalData(const SharedLocalData &localData); diff --git a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h index 5e5a55b4a4a..6edea067622 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h +++ b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h @@ -34,8 +34,8 @@ class ShadowNodeFamily { /* * Sets the parent. - * This is not techically thread-safe, but practically it mutates the object - * only once (and the model enforces that this first call is not concurent). + * This is not technically thread-safe, but practically it mutates the object + * only once (and the model enforces that this first call is not concurrent). */ void setParent(ShadowNodeFamily::Shared const &parent) const; diff --git a/ReactCommon/fabric/debug/DebugStringConvertible.h b/ReactCommon/fabric/debug/DebugStringConvertible.h index d3e96a3ea88..ccc8aeeb1b6 100644 --- a/ReactCommon/fabric/debug/DebugStringConvertible.h +++ b/ReactCommon/fabric/debug/DebugStringConvertible.h @@ -53,7 +53,7 @@ class DebugStringConvertible { // Default implementation returns "Node". virtual std::string getDebugName() const; - // Returns a value assosiate with the object. + // Returns a value associate with the object. // Default implementation returns an empty string. virtual std::string getDebugValue() const; @@ -111,7 +111,7 @@ std::string toString(void const *value); * - `getDebugName`: Returns a name of the object. Default implementation * returns "Node". * - * - `getDebugValue`: Returns a value assosiate with the object. Default + * - `getDebugValue`: Returns a value associate with the object. Default * implementation returns an empty string. * * - `getDebugChildren`: Returns a list of `DebugStringConvertible`-compatible diff --git a/ReactCommon/fabric/graphics/Transform.h b/ReactCommon/fabric/graphics/Transform.h index 71c9c6b5821..1f83b369389 100644 --- a/ReactCommon/fabric/graphics/Transform.h +++ b/ReactCommon/fabric/graphics/Transform.h @@ -22,7 +22,7 @@ struct Transform { {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}}; /* - * Returs the identity transform (`[1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]`). + * Returns the identity transform (`[1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]`). */ static Transform Identity(); diff --git a/ReactCommon/fabric/imagemanager/ImageRequest.h b/ReactCommon/fabric/imagemanager/ImageRequest.h index d955ce70cf7..a3ae8c57258 100644 --- a/ReactCommon/fabric/imagemanager/ImageRequest.h +++ b/ReactCommon/fabric/imagemanager/ImageRequest.h @@ -63,7 +63,7 @@ class ImageRequest final { private: /* - * Image source assosiated with the request. + * Image source associated with the request. */ ImageSource imageSource_; diff --git a/ReactCommon/fabric/imagemanager/ImageResponse.h b/ReactCommon/fabric/imagemanager/ImageResponse.h index 3aef630db19..f1f5e3f7c84 100644 --- a/ReactCommon/fabric/imagemanager/ImageResponse.h +++ b/ReactCommon/fabric/imagemanager/ImageResponse.h @@ -13,7 +13,7 @@ namespace facebook { namespace react { /* - * Represents retrieved image bitmap and any assotiated platform-specific info. + * Represents retrieved image bitmap and any associated platform-specific info. */ class ImageResponse final { public: diff --git a/ReactCommon/fabric/mapbuffer/MapBuffer.h b/ReactCommon/fabric/mapbuffer/MapBuffer.h index e92a6f40635..30b1956f66e 100644 --- a/ReactCommon/fabric/mapbuffer/MapBuffer.h +++ b/ReactCommon/fabric/mapbuffer/MapBuffer.h @@ -14,7 +14,7 @@ namespace react { /** * MapBuffer is an optimized map format for transferring data like props between - * C++ and other platforms The implemenation of this map is optimized to: + * C++ and other platforms The implementation of this map is optimized to: * - be compact to optimize space when sparse (sparse is the common case). * - be accessible through JNI with zero/minimal copying via ByteBuffer. * - be Have excellent C++ single-write and many-read performance by maximizing diff --git a/ReactCommon/fabric/mounting/Differentiator.cpp b/ReactCommon/fabric/mounting/Differentiator.cpp index 7cd23a0309a..41630e30911 100644 --- a/ReactCommon/fabric/mounting/Differentiator.cpp +++ b/ReactCommon/fabric/mounting/Differentiator.cpp @@ -143,7 +143,7 @@ static void calculateShadowViewMutations( ShadowView const &parentShadowView, ShadowViewNodePair::List const &oldChildPairs, ShadowViewNodePair::List const &newChildPairs) { - // The current version of the algorithm is otimized for simplicity, + // The current version of the algorithm is optimized for simplicity, // not for performance or optimal result. if (oldChildPairs == newChildPairs) { diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp b/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp index 1b6033487fa..fbb8420b7a8 100644 --- a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp +++ b/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp @@ -101,7 +101,7 @@ static std::string componentNameByReactViewName(std::string viewName) { return "ActivityIndicatorView"; } - // We need this temporarly for testing purposes until we have proper + // We need this temporarily for testing purposes until we have proper // implementation of core components. if (viewName == "SinglelineTextInputView" || viewName == "MultilineTextInputView" || viewName == "AndroidTextInput" || diff --git a/ReactCommon/fabric/uimanager/UIManagerBinding.h b/ReactCommon/fabric/uimanager/UIManagerBinding.h index 1c95c6e1c09..40c5fccf3bf 100644 --- a/ReactCommon/fabric/uimanager/UIManagerBinding.h +++ b/ReactCommon/fabric/uimanager/UIManagerBinding.h @@ -16,7 +16,7 @@ namespace react { class UIManagerBinding : public jsi::HostObject { public: /* - * Installs UIManagerBinding into JavaSctipt runtime. + * Installs UIManagerBinding into JavaScript runtime. * Thread synchronization must be enforced externally. */ static void install( diff --git a/ReactCommon/jsi/JSCRuntime.cpp b/ReactCommon/jsi/JSCRuntime.cpp index 2b5341c3f9a..a0457397bf2 100644 --- a/ReactCommon/jsi/JSCRuntime.cpp +++ b/ReactCommon/jsi/JSCRuntime.cpp @@ -789,7 +789,7 @@ jsi::Object JSCRuntime::createObject(std::shared_ptr ho) { std::shared_ptr JSCRuntime::getHostObject( const jsi::Object& obj) { - // We are guarenteed at this point to have isHostObject(obj) == true + // We are guaranteed at this point to have isHostObject(obj) == true // so the private data should be HostObjectMetadata JSObjectRef object = objectRef(obj); auto metadata = diff --git a/ReactCommon/jsi/jsi/jsi.h b/ReactCommon/jsi/jsi/jsi.h index c05c5ae369b..7925be7bed8 100644 --- a/ReactCommon/jsi/jsi/jsi.h +++ b/ReactCommon/jsi/jsi/jsi.h @@ -51,7 +51,7 @@ class StringBuffer : public Buffer { std::string s_; }; -/// PreparedJavaScript is a base class repesenting JavaScript which is in a form +/// PreparedJavaScript is a base class representing JavaScript which is in a form /// optimized for execution, in a runtime-specific way. Construct one via /// jsi::Runtime::prepareJavaScript(). /// ** This is an experimental API that is subject to change. ** @@ -150,7 +150,7 @@ class Runtime { /// Evaluates the given JavaScript \c buffer. \c sourceURL is used /// to annotate the stack trace if there is an exception. The - /// contents may be utf8-encoded JS source code, or binary bytcode + /// contents may be utf8-encoded JS source code, or binary bytecode /// whose format is specific to the implementation. If the input /// format is unknown, or evaluation causes an error, a JSIException /// will be thrown. @@ -745,7 +745,7 @@ class Array : public Object { template static Array createWithElements(Runtime&, Args&&... args); - /// Creates a new Array instance from intitializer list. + /// Creates a new Array instance from initializer list. static Array createWithElements( Runtime& runtime, std::initializer_list elements); @@ -919,7 +919,7 @@ class Value { std::is_base_of::value || std::is_base_of::value || std::is_base_of::value, - "Value cannot be implictly move-constructed from this type"); + "Value cannot be implicitly move-constructed from this type"); new (&data_.pointer) T(std::move(other)); } diff --git a/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h b/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h index 39c692f979a..a290c409b8d 100644 --- a/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +++ b/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h @@ -28,7 +28,7 @@ namespace react { // error report. Note that the errorMessageProducer will be invoked // asynchronously on a different thread. // -// The timeout behavior does NOT caues the invokee to aborted. If the invokee +// The timeout behavior does NOT cause the invokee to aborted. If the invokee // blocks forever, so will the ScopedTimeoutInvoker (but the soft error may // still be reported). // diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm index c3e9f82d11c..15d52a504e4 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm @@ -49,7 +49,7 @@ static Class getFallbackClassFromName(const char *name) std::unordered_map> _turboModuleCache; /** - * _rctTurboModuleCache can be accessed by muitiple threads at once via + * _rctTurboModuleCache can be accessed by multiple threads at once via * the provideRCTTurboModule method. This can lead to races. Therefore, we * need to protect access to this unordered_map. * diff --git a/ReactCommon/utils/ContextContainer.h b/ReactCommon/utils/ContextContainer.h index 4889a43bc7b..d2ea5c3bc81 100644 --- a/ReactCommon/utils/ContextContainer.h +++ b/ReactCommon/utils/ContextContainer.h @@ -17,7 +17,7 @@ namespace facebook { namespace react { /* - * General purpose dependecy injection container. + * General purpose dependency injection container. * Instance types must be copyable. */ class ContextContainer final { diff --git a/ReactCommon/yoga/yoga/Utils.h b/ReactCommon/yoga/yoga/Utils.h index d6fbc26891f..899e832a6c9 100644 --- a/ReactCommon/yoga/yoga/Utils.h +++ b/ReactCommon/yoga/yoga/Utils.h @@ -30,7 +30,7 @@ // // - endOfLineIndex: Its the end index of the last flex item which was examined // and it may or may not be part of the current line(as it may be absolutely -// positioned or inculding it may have caused to overshoot availableInnerDim) +// positioned or including it may have caused to overshoot availableInnerDim) // // - relativeChildren: Maintain a vector of the child nodes that can shrink // and/or grow. @@ -71,8 +71,8 @@ YGFloatOptional YGFloatOptionalMax( float YGFloatMin(const float a, const float b); -// This custom float comparision function compares the array of float with -// YGFloatsEqual, as the default float comparision operator will not work(Look +// This custom float comparison function compares the array of float with +// YGFloatsEqual, as the default float comparison operator will not work(Look // at the comments of YGFloatsEqual function). template bool YGFloatArrayEqual( diff --git a/ReactCommon/yoga/yoga/Yoga.h b/ReactCommon/yoga/yoga/Yoga.h index 6ec796d84b2..493e556cb59 100644 --- a/ReactCommon/yoga/yoga/Yoga.h +++ b/ReactCommon/yoga/yoga/Yoga.h @@ -330,7 +330,7 @@ WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled( YGConfigRef config, YGExperimentalFeature feature); -// Using the web defaults is the prefered configuration for new projects. Usage +// Using the web defaults is the preferred configuration for new projects. Usage // of non web defaults should be considered as legacy. WIN_EXPORT void YGConfigSetUseWebDefaults(YGConfigRef config, bool enabled); WIN_EXPORT bool YGConfigGetUseWebDefaults(YGConfigRef config); diff --git a/packages/react-native-codegen/src/generators/components/CppHelpers.js b/packages/react-native-codegen/src/generators/components/CppHelpers.js index 2f0a6d00c78..296e00fea42 100644 --- a/packages/react-native-codegen/src/generators/components/CppHelpers.js +++ b/packages/react-native-codegen/src/generators/components/CppHelpers.js @@ -40,7 +40,7 @@ function getCppTypeForAnnotation( return 'Float'; default: (type: empty); - throw new Error(`Receieved invalid typeAnnotation ${type}`); + throw new Error(`Received invalid typeAnnotation ${type}`); } } diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js index 5e7ffbaf6a1..ce967b2adfc 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js @@ -118,7 +118,7 @@ function generateSetters( `.trim(); default: (eventProperty: empty); - throw new Error('Receieved invalid event property type'); + throw new Error('Received invalid event property type'); } }) .join('\n'); diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js index 04eb450c113..653ed415754 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js @@ -102,7 +102,7 @@ function getNativeTypeFromAnnotation( ); default: (type: empty); - throw new Error(`Receieved invalid event property type ${type}`); + throw new Error(`Received invalid event property type ${type}`); } } function generateEnum(structs, componentName, options, nameParts) { @@ -175,7 +175,7 @@ function generateStruct( default: (property: empty); throw new Error( - `Receieved invalid event property type ${property.type}`, + `Received invalid event property type ${property.type}`, ); } }); diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js index 47a5716e153..94e4bf2a97f 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js @@ -155,7 +155,7 @@ function getNativeTypeFromAnnotation(componentName: string, prop): string { return 'Point'; default: (typeAnnotation.name: empty); - throw new Error('Receieved unknown NativePrimitiveTypeAnnotation'); + throw new Error('Received unknown NativePrimitiveTypeAnnotation'); } case 'ArrayTypeAnnotation': { if (typeAnnotation.elementType.type === 'ArrayTypeAnnotation') { @@ -177,7 +177,7 @@ function getNativeTypeFromAnnotation(componentName: string, prop): string { return getEnumName(componentName, prop.name); default: (typeAnnotation: empty); - throw new Error('Receieved invalid typeAnnotation'); + throw new Error('Received invalid typeAnnotation'); } } @@ -208,7 +208,7 @@ function convertDefaultTypeToString(componentName: string, prop): string { return ''; default: (typeAnnotation.name: empty); - throw new Error('Receieved unknown NativePrimitiveTypeAnnotation'); + throw new Error('Received unknown NativePrimitiveTypeAnnotation'); } case 'ArrayTypeAnnotation': { switch (typeAnnotation.elementType.type) { @@ -234,7 +234,7 @@ function convertDefaultTypeToString(componentName: string, prop): string { )}`; default: (typeAnnotation: empty); - throw new Error('Receieved invalid typeAnnotation'); + throw new Error('Received invalid typeAnnotation'); } } diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js index 460c7e42412..fcb226c7c48 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaDelegate.js @@ -59,7 +59,7 @@ function getJavaValueForProp( return '(ReadableMap) value'; default: (typeAnnotation.name: empty); - throw new Error('Receieved unknown NativePrimitiveTypeAnnotation'); + throw new Error('Received unknown NativePrimitiveTypeAnnotation'); } case 'ArrayTypeAnnotation': { return '(ReadableArray) value'; @@ -68,7 +68,7 @@ function getJavaValueForProp( return '(String) value'; default: (typeAnnotation: empty); - throw new Error('Receieved invalid typeAnnotation'); + throw new Error('Received invalid typeAnnotation'); } } diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js index 5350dae282d..f5072771861 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js @@ -56,7 +56,7 @@ function getJavaValueForProp( return 'ReadableMap value'; default: (typeAnnotation.name: empty); - throw new Error('Receieved unknown NativePrimitiveTypeAnnotation'); + throw new Error('Received unknown NativePrimitiveTypeAnnotation'); } case 'ArrayTypeAnnotation': { return 'ReadableArray value'; @@ -65,7 +65,7 @@ function getJavaValueForProp( return 'String value'; default: (typeAnnotation: empty); - throw new Error('Receieved invalid typeAnnotation'); + throw new Error('Received invalid typeAnnotation'); } } diff --git a/packages/react-native-codegen/src/parsers/flow/components/index.js b/packages/react-native-codegen/src/parsers/flow/components/index.js index 32e455d2cf6..c683850ede1 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/index.js +++ b/packages/react-native-codegen/src/parsers/flow/components/index.js @@ -113,7 +113,7 @@ function getCommandProperties(commandTypeName, types) { if (typeAlias.type !== 'InterfaceDeclaration') { throw new Error( - `The type argument for codegenNativeCommands must be an interface, receieved ${ + `The type argument for codegenNativeCommands must be an interface, received ${ typeAlias.type }`, ); diff --git a/scripts/test-manual-e2e.sh b/scripts/test-manual-e2e.sh index bf87f7ee5f7..7a1aab22636 100755 --- a/scripts/test-manual-e2e.sh +++ b/scripts/test-manual-e2e.sh @@ -51,7 +51,7 @@ info "and then press any key." info "" read -n 1 -./gradlew :RNTester:android:app:installDebug || error "Couln't build RNTester Android" +./gradlew :RNTester:android:app:installDebug || error "Couldn't build RNTester Android" info "Press any key to run RNTester in an already running Android emulator/device" info "" diff --git a/scripts/validate-ios-test-env.sh b/scripts/validate-ios-test-env.sh index ee25a3ea2a3..695cf46c9f3 100755 --- a/scripts/validate-ios-test-env.sh +++ b/scripts/validate-ios-test-env.sh @@ -11,7 +11,7 @@ # It also checks that the correct Node version is installed. Node 10 is not fully # supported at the time and Node 6 is no longer supported. -# Function used to compare dot seperated version numbers +# Function used to compare dot separated version numbers function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } # Check that node is installed.