From d162ca65c3e18932040e665d11f3afa58f0ecead Mon Sep 17 00:00:00 2001 From: Harshit Date: Wed, 19 Nov 2025 00:35:10 +0530 Subject: [PATCH] Fix typos in codebase - Fix typo: ACCESIBILITY_ROLE_VALUES -> ACCESSIBILITY_ROLE_VALUES - Fix typo: accessiblitywise -> accessibility-wise (2 occurrences) - Fix duplicate words: 'the the' -> 'the' (4 occurrences) - Fix duplicate words: 'an an' -> 'an' (1 occurrence) These fixes improve code readability and documentation quality. --- .../Mounting/ComponentViews/View/RCTViewComponentView.h | 2 +- packages/react-native/React/Views/UIView+React.h | 2 +- .../src/main/java/com/facebook/react/bridge/PromiseImpl.kt | 2 +- .../java/com/facebook/react/internal/interop/InteropEvent.kt | 2 +- .../facebook/react/views/virtual/VirtualViewRenderState.kt | 2 +- packages/react-native/ReactCommon/cxxreact/MoveWrapper.h | 2 +- packages/react-native/flow/dom.js.flow | 2 +- .../private/__tests__/utilities/accessibilityPropsSuite.js | 4 ++-- scripts/releases/upload-release-assets-for-dotslash.js | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index a3c58cb16f577e..69b051b317fe92 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN * Returns the object - usually (sub)view - which represents this * component view in terms of accessibility. * All accessibility properties will be applied to this object. - * May be overridden in subclass which needs to be accessiblitywise + * May be overridden in subclass which needs to be accessibility-wise * transparent in favour of some subview. * Defaults to `self`. */ diff --git a/packages/react-native/React/Views/UIView+React.h b/packages/react-native/React/Views/UIView+React.h index fbc8ca0f94c80d..040388b5a4b4f7 100644 --- a/packages/react-native/React/Views/UIView+React.h +++ b/packages/react-native/React/Views/UIView+React.h @@ -121,7 +121,7 @@ typedef struct { /** * The (sub)view which represents this view in terms of accessibility. * ViewManager will apply all accessibility properties directly to this view. - * May be overridden in view subclass which needs to be accessiblitywise + * May be overridden in view subclass which needs to be accessibility-wise * transparent in favour of some subview. * Defaults to `self`. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.kt index 8ec3b21fac2cb1..66096ec73d8bca 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.kt @@ -182,7 +182,7 @@ constructor(private var resolve: Callback?, private var reject: Callback?) : Pro val stackTrace = throwable.stackTrace val nativeStackAndroid = WritableNativeArray() - // Build an an Array of StackFrames to match JavaScript: + // Build an Array of StackFrames to match JavaScript: // iOS: /Libraries/Core/Devtools/parseErrorStack.js -> StackFrame var i = 0 while (i < stackTrace.size && i < ERROR_STACK_FRAME_LIMIT) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/interop/InteropEvent.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/interop/InteropEvent.kt index b4008e1fe06458..d86a0c9767db4f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/interop/InteropEvent.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/interop/InteropEvent.kt @@ -14,7 +14,7 @@ import com.facebook.react.uimanager.events.Event /** * An [Event] class used by the [InteropEventEmitter]. This class is just holding the event name and - * the data which is received by the `receiveEvent` method and will be passed over the the + * the data which is received by the `receiveEvent` method and will be passed over the * [com.facebook.react.uimanager.events.EventDispatcher] */ @InteropLegacyArchitecture diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewRenderState.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewRenderState.kt index 0b3804a27af249..3d92c299413602 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewRenderState.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewRenderState.kt @@ -8,7 +8,7 @@ package com.facebook.react.views.virtual /** - * Represents the the render state of children in the most recent commit. + * Represents the render state of children in the most recent commit. * * This enables `ReactVirtualView` to know whether a previously emitted `VirtualViewModeChangeEvent` * has been committed, in order to only emit subsequent events that would change it. diff --git a/packages/react-native/ReactCommon/cxxreact/MoveWrapper.h b/packages/react-native/ReactCommon/cxxreact/MoveWrapper.h index 22a9a0f238f467..eadc3b3b068c98 100644 --- a/packages/react-native/ReactCommon/cxxreact/MoveWrapper.h +++ b/packages/react-native/ReactCommon/cxxreact/MoveWrapper.h @@ -13,7 +13,7 @@ namespace facebook::react { /* NOTE: we keep this internal copy of folly/MoveWrapper.h to unblock -the the workstream of dropping the dependency on folly in RN! +the workstream of dropping the dependency on folly in RN! For a technical explanation on why we still need this we defer to the doc in folly/Function.h: diff --git a/packages/react-native/flow/dom.js.flow b/packages/react-native/flow/dom.js.flow index 3054a988c7b358..c1250e8d62ea3c 100644 --- a/packages/react-native/flow/dom.js.flow +++ b/packages/react-native/flow/dom.js.flow @@ -996,7 +996,7 @@ type KeyboardEvent$Init = { metaKey?: boolean, /** * Initializes the `repeat` attribute of the KeyboardEvent object. This - * attribute should be set to true if the the current KeyboardEvent is + * attribute should be set to true if the current KeyboardEvent is * considered part of a repeating sequence of similar events caused by the * long depression of any single key, false otherwise. */ diff --git a/packages/react-native/src/private/__tests__/utilities/accessibilityPropsSuite.js b/packages/react-native/src/private/__tests__/utilities/accessibilityPropsSuite.js index e28d6acf2c8bd7..bd49a11292cf99 100644 --- a/packages/react-native/src/private/__tests__/utilities/accessibilityPropsSuite.js +++ b/packages/react-native/src/private/__tests__/utilities/accessibilityPropsSuite.js @@ -15,7 +15,7 @@ import type {AccessibilityProps} from 'react-native'; import * as Fantom from '@react-native/fantom'; import * as React from 'react'; -const ACCESIBILITY_ROLE_VALUES: $ReadOnlyArray = [ +const ACCESSIBILITY_ROLE_VALUES: $ReadOnlyArray = [ 'none', 'button', 'link', @@ -246,7 +246,7 @@ export default function accessibilityPropsSuite( describe('accessibilityRole', () => { describe(`value propagation`, () => { - ACCESIBILITY_ROLE_VALUES.forEach(role => { + ACCESSIBILITY_ROLE_VALUES.forEach(role => { it(`can be set to ${role}`, () => { expect( getAccessibilityProp( diff --git a/scripts/releases/upload-release-assets-for-dotslash.js b/scripts/releases/upload-release-assets-for-dotslash.js index 3fa0000f250876..3b6dc921a36e75 100644 --- a/scripts/releases/upload-release-assets-for-dotslash.js +++ b/scripts/releases/upload-release-assets-for-dotslash.js @@ -180,7 +180,7 @@ async function uploadReleaseAssetsForDotSlashFile( * Given a description of a DotSlash artifact for a particular platform, * infers the upstream URL ( = where the binary is currently available) and * release asset URL ( = where the binary will be hosted after the release), - * then downloads the asset from the the upstream URL and uploads it to GitHub + * then downloads the asset from the upstream URL and uploads it to GitHub * at the desired URL. */ async function fetchUpstreamAssetAndUploadToRelease(