From 1d6ed17ac7e22ac4cc97fe6667305011dfc8655e Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Thu, 16 Feb 2023 01:02:45 +0100 Subject: [PATCH] Fix typos via codespell --- BUILDING.md | 4 ++-- CONTRIBUTING.md | 2 +- ts/components/SessionInboxView.tsx | 2 +- .../avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx | 2 +- ts/components/basic/SessionDropdown.tsx | 2 +- ts/components/basic/SessionInput.tsx | 2 +- ts/components/conversation/composition/CompositionBox.tsx | 2 +- ts/components/conversation/message/message-item/Message.tsx | 2 +- ts/components/search/MessageSearchResults.tsx | 2 +- ts/interactions/conversations/unsendingInteractions.ts | 2 +- ts/mains/main_node.ts | 2 +- ts/node/config.ts | 2 +- ts/node/config/user_config.ts | 2 +- ts/node/migration/sessionMigrations.ts | 2 +- ts/node/sql.ts | 2 +- ts/receiver/configMessage.ts | 2 +- ts/receiver/queuedJob.ts | 4 ++-- .../open_group_api/opengroupV2/OpenGroupPollingUtils.ts | 2 +- ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts | 2 +- ts/session/apis/snode_api/SNodeAPI.ts | 2 +- ts/session/apis/snode_api/onions.ts | 2 +- ts/session/onions/onionPath.ts | 4 ++-- ts/session/sending/MessageSentHandler.ts | 2 +- ts/session/utils/AttachmentsDownload.ts | 2 +- ts/session/utils/Promise.ts | 2 +- ts/session/utils/SodiumUtils.ts | 2 +- ts/session/utils/calling/CallManager.ts | 6 +++--- ts/state/ducks/conversations.ts | 4 ++-- ts/test/session/unit/crypto/OpenGroupAuthentication_test.ts | 2 +- ts/test/session/unit/onion/OnionErrors_test.ts | 2 +- ts/test/session/unit/padding/Padding_test.ts | 2 +- ts/test/session/unit/sending/MessageSender_test.ts | 2 +- ts/test/session/unit/sogsv3/MutationCache_test.ts | 4 ++-- ts/test/session/unit/sogsv3/knownBlindedKeys_test.ts | 4 ++-- ts/test/session/unit/utils/JobQueue_test.ts | 2 +- ts/themes/globals.tsx | 2 +- ts/types/Reaction.ts | 2 +- ts/util/blockedNumberController.ts | 2 +- ts/util/expiringMessages.ts | 2 +- ts/util/linkPreviewFetch.ts | 2 +- ts/util/linkPreviews.ts | 2 +- 41 files changed, 49 insertions(+), 49 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index d4bfd9a47..ad7374aaf 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -65,7 +65,7 @@ git lfs install nvm install # install the current node version used in this project nvm use # use the current node version used in this project npm install -g yarn # install yarn globally for this node version -yarn install --frozen-lockfile # install all dependecies of this project +yarn install --frozen-lockfile # install all dependencies of this project yarn build-everything # transpile and assemble files yarn start-prod # start the app on production mode (currently this is the only one supported) ``` @@ -115,7 +115,7 @@ git lfs install # once git lfs is installed, you have to run this command too nvm install # install the current node version used in this project nvm use # use the current node version used in this project npm install -g yarn # install yarn globally for this node version -yarn install --frozen-lockfile # install all dependecies of this project +yarn install --frozen-lockfile # install all dependencies of this project yarn build-everything # transpile and assemble files yarn start-prod # start the app on production mode (currently this is the only one supported) ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c7bd78e4..7965a2d88 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -102,7 +102,7 @@ For example, running: NODE_APP_INSTANCE=alice yarn start-prod ``` -Will run the development environment with the `alice` instance and thus create a seperate storage profile. +Will run the development environment with the `alice` instance and thus create a separate storage profile. If a fixed profile is needed (in the case of tests), you can specify it using `storageProfile` in the config file. If the change is local then put it in `local-{instance}.json` otherwise put it in `default-{instance}.json` or `{env}-{instance}.json`. diff --git a/ts/components/SessionInboxView.tsx b/ts/components/SessionInboxView.tsx index f4408d539..5b16aeaee 100644 --- a/ts/components/SessionInboxView.tsx +++ b/ts/components/SessionInboxView.tsx @@ -32,7 +32,7 @@ import { ExpirationTimerOptions } from '../util/expiringMessages'; import moment from 'moment'; import styled from 'styled-components'; -// Default to the locale from env. It will be overriden if moment +// Default to the locale from env. It will be overridden if moment // does not recognize it with what moment knows which is the closest. // i.e. es-419 will return 'es'. // We just need to use what we got from moment in getLocale on the updateLocale below diff --git a/ts/components/avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx b/ts/components/avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx index dee98804c..826bbe962 100644 --- a/ts/components/avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx +++ b/ts/components/avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx @@ -17,7 +17,7 @@ const sha512FromPubkey = async (pubkey: string): Promise => { .join(''); }; -// do not do this on every avatar, just cache the values so we can reuse them accross the app +// do not do this on every avatar, just cache the values so we can reuse them across the app // key is the pubkey, value is the hash const cachedHashes = new Map(); diff --git a/ts/components/basic/SessionDropdown.tsx b/ts/components/basic/SessionDropdown.tsx index 20c3348e1..0b27a90da 100644 --- a/ts/components/basic/SessionDropdown.tsx +++ b/ts/components/basic/SessionDropdown.tsx @@ -3,7 +3,7 @@ import { SessionIcon, SessionIconType } from '../icon'; import { SessionDropdownItem, SessionDropDownItemType } from './SessionDropdownItem'; -// THIS IS DROPDOWN ACCORDIAN STYLE OPTIONS SELECTOR ELEMENT, NOT A CONTEXTMENU +// THIS IS DROPDOWN ACCORDION STYLE OPTIONS SELECTOR ELEMENT, NOT A CONTEXTMENU type Props = { label: string; diff --git a/ts/components/basic/SessionInput.tsx b/ts/components/basic/SessionInput.tsx index 8de063b88..e3425173d 100644 --- a/ts/components/basic/SessionInput.tsx +++ b/ts/components/basic/SessionInput.tsx @@ -92,7 +92,7 @@ export const SessionInput = (props: Props) => { data-testid={inputDataTestId} onChange={updateInputValue} className={classNames(enableShowHide ? 'session-input-floating-label-show-hide' : '')} - // just incase onChange isn't triggered + // just in case onChange isn't triggered onBlur={updateInputValue} onKeyPress={event => { if (event.key === 'Enter' && props.onEnterPressed) { diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index 448c3f437..694cbe5fb 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -707,7 +707,7 @@ class CompositionBoxInner extends React.Component { // than the message was sent without the link preview. // So be sure to reset the staged link preview so it is not sent with the next message. - // if we were not aborted, it's probably just an error on the fetch. Nothing to do excpet mark the fetch as done (with errors) + // if we were not aborted, it's probably just an error on the fetch. Nothing to do except mark the fetch as done (with errors) if (aborted) { this.setState({ diff --git a/ts/components/conversation/message/message-item/Message.tsx b/ts/components/conversation/message/message-item/Message.tsx index 953dbe590..bfa0778db 100644 --- a/ts/components/conversation/message/message-item/Message.tsx +++ b/ts/components/conversation/message/message-item/Message.tsx @@ -12,7 +12,7 @@ export const MINIMUM_LINK_PREVIEW_IMAGE_WIDTH = THUMBNAIL_SIDE; type Props = { messageId: string; - isDetailView?: boolean; // when the detail is shown for a message, we disble click and some other stuff + isDetailView?: boolean; // when the detail is shown for a message, we disable click and some other stuff }; export const Message = (props: Props) => { diff --git a/ts/components/search/MessageSearchResults.tsx b/ts/components/search/MessageSearchResults.tsx index 28f2740ce..b53a34e69 100644 --- a/ts/components/search/MessageSearchResults.tsx +++ b/ts/components/search/MessageSearchResults.tsx @@ -22,7 +22,7 @@ const StyledConversationTitleResults = styled.div` white-space: nowrap; text-overflow: ellipsis; color: var(--conversation-tab-text-color); - /* We don't want this to overflow horziontally past the timestamp */ + /* We don't want this to overflow horizontally past the timestamp */ width: 90px; `; diff --git a/ts/interactions/conversations/unsendingInteractions.ts b/ts/interactions/conversations/unsendingInteractions.ts index 777997400..3f4e9c669 100644 --- a/ts/interactions/conversations/unsendingInteractions.ts +++ b/ts/interactions/conversations/unsendingInteractions.ts @@ -351,7 +351,7 @@ export async function deleteMessagesByIdForEveryone( onClickOk: async () => { await doDeleteSelectedMessages({ selectedMessages, conversation, deleteForEveryone: true }); - // explicity close modal for this case. + // explicitly close modal for this case. window.inboxStore?.dispatch(updateConfirmModal(null)); return; }, diff --git a/ts/mains/main_node.ts b/ts/mains/main_node.ts index a8929e289..d4ed3e364 100644 --- a/ts/mains/main_node.ts +++ b/ts/mains/main_node.ts @@ -649,7 +649,7 @@ async function showDebugLogWindow() { } if (!mainWindow) { - console.info('debug log neeeds mainwindow size to open'); + console.info('debug log needs mainwindow size to open'); return; } diff --git a/ts/node/config.ts b/ts/node/config.ts index 2b142d6cb..7ce23701e 100644 --- a/ts/node/config.ts +++ b/ts/node/config.ts @@ -24,7 +24,7 @@ if (environment === 'production') { process.env.ALLOW_CONFIG_MUTATIONS = ''; process.env.SUPPRESS_NO_CONFIG_WARNING = ''; - // We could be running againt production but still be in dev mode, we need to handle that + // We could be running against production but still be in dev mode, we need to handle that if (!electronIsDev) { process.env.NODE_APP_INSTANCE = ''; } diff --git a/ts/node/config/user_config.ts b/ts/node/config/user_config.ts index 488d02f2d..d3ae021e6 100644 --- a/ts/node/config/user_config.ts +++ b/ts/node/config/user_config.ts @@ -15,7 +15,7 @@ const { NODE_ENV: environment, NODE_APP_INSTANCE: instance } = process.env; const isValidInstance = typeof instance === 'string' && instance.length > 0; const isProduction = environment === 'production' && !isValidInstance; -// Use seperate data directories for each different environment and app instances +// Use separate data directories for each different environment and app instances if (!isProduction) { storageProfile = environment; if (isValidInstance) { diff --git a/ts/node/migration/sessionMigrations.ts b/ts/node/migration/sessionMigrations.ts index 8c2ed8b40..b90aa8284 100644 --- a/ts/node/migration/sessionMigrations.ts +++ b/ts/node/migration/sessionMigrations.ts @@ -598,7 +598,7 @@ function updateToSessionSchemaVersion20(currentVersion: number, db: BetterSqlite // obj.profile.displayName is the display as this user set it. if (obj?.nickname?.length && obj?.profile?.displayName?.length) { - // this one has a nickname set, but name is unset, set it to the displayName in the lokiProfile if it's exisitng + // this one has a nickname set, but name is unset, set it to the displayName in the lokiProfile if it's existing obj.name = obj.profile.displayName; sqlNode.saveConversation(obj as ConversationAttributes, db); } diff --git a/ts/node/sql.ts b/ts/node/sql.ts index 4cf9569e1..2bd0164ce 100644 --- a/ts/node/sql.ts +++ b/ts/node/sql.ts @@ -2147,7 +2147,7 @@ function cleanUpOldOpengroupsOnStart() { let pruneSetting = getItemById(SettingsKey.settingsOpengroupPruning)?.value; if (pruneSetting === undefined) { - console.info('Prune settings is undefined (and not explicitely false), forcing it to true.'); + console.info('Prune settings is undefined (and not explicitly false), forcing it to true.'); createOrUpdateItem({ id: SettingsKey.settingsOpengroupPruning, value: true }); pruneSetting = true; } diff --git a/ts/receiver/configMessage.ts b/ts/receiver/configMessage.ts index 1d712a5c3..1f7c55f2b 100644 --- a/ts/receiver/configMessage.ts +++ b/ts/receiver/configMessage.ts @@ -174,7 +174,7 @@ const handleContactFromConfig = async ( } } - // only set for explicit true/false values incase outdated sender doesn't have the fields + // only set for explicit true/false values in case outdated sender doesn't have the fields if (contactReceived.isBlocked === true) { if (contactConvo.isIncomingRequest()) { // handling case where restored device's declined message requests were getting restored diff --git a/ts/receiver/queuedJob.ts b/ts/receiver/queuedJob.ts index f1bb88927..2d8d9ffe6 100644 --- a/ts/receiver/queuedJob.ts +++ b/ts/receiver/queuedJob.ts @@ -391,7 +391,7 @@ export async function handleMessageJob( void queueAttachmentDownloads(messageModel, conversation); // Check if we need to update any profile names // the only profile we don't update with what is coming here is ours, - // as our profile is shared accross our devices with a ConfigurationMessage + // as our profile is shared across our devices with a ConfigurationMessage if (messageModel.isIncoming() && regularDataMessage.profile) { void appendFetchAvatarAndProfileJob( sendingDeviceConversation, @@ -400,7 +400,7 @@ export async function handleMessageJob( ); } - // even with all the warnings, I am very sus about if this is usefull or not + // even with all the warnings, I am very sus about if this is useful or not // try { // // We go to the database here because, between the message save above and // // the previous line's trigger() call, we might have marked all messages diff --git a/ts/session/apis/open_group_api/opengroupV2/OpenGroupPollingUtils.ts b/ts/session/apis/open_group_api/opengroupV2/OpenGroupPollingUtils.ts index c9466e040..65c146422 100644 --- a/ts/session/apis/open_group_api/opengroupV2/OpenGroupPollingUtils.ts +++ b/ts/session/apis/open_group_api/opengroupV2/OpenGroupPollingUtils.ts @@ -22,7 +22,7 @@ export type OpenGroupRequestHeaders = { * @param endpoint endpoint of request we're making * @param method method of request we're making * @param blinded is the server being requested to blinded or not - * @param body the body of the request we're mkaing + * @param body the body of the request we're making * @returns object of headers, including X-SOGS and other headers. */ const getOurOpenGroupHeaders = async ( diff --git a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts index 7461b16f4..e73feb65c 100644 --- a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts +++ b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts @@ -330,7 +330,7 @@ const makeBatchRequestPayload = ( }; /** - * Get the request to get all of the details we care from an opengroup, accross all rooms. + * Get the request to get all of the details we care from an opengroup, across all rooms. * Only compatible with v4 onion requests. * * if isSequence is set to true, each rows will be run in order until the first one fails diff --git a/ts/session/apis/snode_api/SNodeAPI.ts b/ts/session/apis/snode_api/SNodeAPI.ts index 6be2c8246..c2330a9c7 100644 --- a/ts/session/apis/snode_api/SNodeAPI.ts +++ b/ts/session/apis/snode_api/SNodeAPI.ts @@ -567,7 +567,7 @@ export async function retrieveNextMessages( } /** - * Makes a post to a node to receive the timestamp info. If non-existant, returns -1 + * Makes a post to a node to receive the timestamp info. If non-existent, returns -1 * @param snode Snode to send request to * @returns timestamp of the response from snode */ diff --git a/ts/session/apis/snode_api/onions.ts b/ts/session/apis/snode_api/onions.ts index e0aab38cb..b93cb922d 100644 --- a/ts/session/apis/snode_api/onions.ts +++ b/ts/session/apis/snode_api/onions.ts @@ -727,7 +727,7 @@ async function handle421InvalidSwarm({ associatedWith, }); - // this is important we throw so another retry is made and we exit the handling of that reponse + // this is important we throw so another retry is made and we exit the handling of that response throw new pRetry.AbortError(ERROR_421_HANDLED_RETRY_REQUEST); } diff --git a/ts/session/onions/onionPath.ts b/ts/session/onions/onionPath.ts index aeeeccf18..32dd3bcda 100644 --- a/ts/session/onions/onionPath.ts +++ b/ts/session/onions/onionPath.ts @@ -260,7 +260,7 @@ async function dropPathStartingWithGuardNode(guardNodeEd25519: string) { guardNodes = guardNodes.filter(g => g.pubkey_ed25519 !== guardNodeEd25519); // write the updates guard nodes to the db. await internalUpdateGuardNodes(guardNodes); - // we are dropping it. Reset the counter in case this same guard gets choosen later + // we are dropping it. Reset the counter in case this same guard gets chosen later pathFailureCount[guardNodeEd25519] = 0; // trigger path rebuilding for the dropped path. This will throw if anything happens @@ -516,7 +516,7 @@ async function buildNewOnionPathsWorker() { minTimeout: 1000, onFailedAttempt: e => { window?.log?.warn( - `buildNewOnionPathsWorker attemp #${e.attemptNumber} failed. ${e.retriesLeft} retries left... Error: ${e.message}` + `buildNewOnionPathsWorker attempt #${e.attemptNumber} failed. ${e.retriesLeft} retries left... Error: ${e.message}` ); }, } diff --git a/ts/session/sending/MessageSentHandler.ts b/ts/session/sending/MessageSentHandler.ts index d2a759170..da599e6e3 100644 --- a/ts/session/sending/MessageSentHandler.ts +++ b/ts/session/sending/MessageSentHandler.ts @@ -175,7 +175,7 @@ async function handleMessageSentFailure( /** * This function tries to find a message by messageId by first looking on the MessageController. * The MessageController holds all messages being in memory. - * Those are the messages sent recently, recieved recently, or the one shown to the user. + * Those are the messages sent recently, received recently, or the one shown to the user. * * If the app restarted, it's very likely those messages won't be on the memory anymore. * In this case, this function will look for it in the database and return it. diff --git a/ts/session/utils/AttachmentsDownload.ts b/ts/session/utils/AttachmentsDownload.ts index acdec08ea..5156816d4 100644 --- a/ts/session/utils/AttachmentsDownload.ts +++ b/ts/session/utils/AttachmentsDownload.ts @@ -236,7 +236,7 @@ async function _runJob(job: any) { // so there is no need to continue trying to download it. if (currentAttempt >= 3 || was404Error(error)) { logger.error( - `_runJob: ${currentAttempt} failed attempts, marking attachment ${id} from message ${found?.idForLogging()} as permament error:`, + `_runJob: ${currentAttempt} failed attempts, marking attachment ${id} from message ${found?.idForLogging()} as permanent error:`, error && error.stack ? error.stack : error ); diff --git a/ts/session/utils/Promise.ts b/ts/session/utils/Promise.ts index 7d082cc2d..2236920ce 100644 --- a/ts/session/utils/Promise.ts +++ b/ts/session/utils/Promise.ts @@ -166,7 +166,7 @@ export async function poll( } /** - * Creates a promise which waits until `check` returns `true` or rejects if `timeout` preiod is reached. + * Creates a promise which waits until `check` returns `true` or rejects if `timeout` period is reached. * If `timeout` is reached then this will throw an Error. * * @param check The boolean check. diff --git a/ts/session/utils/SodiumUtils.ts b/ts/session/utils/SodiumUtils.ts index 356295aa8..55e804091 100644 --- a/ts/session/utils/SodiumUtils.ts +++ b/ts/session/utils/SodiumUtils.ts @@ -26,7 +26,7 @@ export function combineKeys( // // BLAKE2b(a kB || kA || kB) // -// The receiver can calulate the same value via: +// The receiver can calculate the same value via: // // BLAKE2b(b kA || kA || kB) export function sharedBlindedEncryptionKey({ diff --git a/ts/session/utils/calling/CallManager.ts b/ts/session/utils/calling/CallManager.ts index 4d0d2e8dd..ac44d4415 100644 --- a/ts/session/utils/calling/CallManager.ts +++ b/ts/session/utils/calling/CallManager.ts @@ -509,7 +509,7 @@ export async function USER_callRecipient(recipient: string) { callNotificationType: 'started-call', }); - // initiating a call is analgous to sending a message request + // initiating a call is analogous to sending a message request await approveConvoAndSendResponse(recipient, true); // we do it manually as the sendToPubkeyNonDurably rely on having a message saved to the db for MessageSentSuccess @@ -521,7 +521,7 @@ export async function USER_callRecipient(recipient: string) { await openMediaDevicesAndAddTracks(); await createOfferAndSendIt(recipient); - // close and end the call if callTimeoutMs is reached ans still not connected + // close and end the call if callTimeoutMs is reached and still not connected global.setTimeout(async () => { if (justCreatedCallUUID === currentCallUUID && getIsRinging()) { window.log.info( @@ -751,7 +751,7 @@ function createOrGetPeerConnection(withPubkey: string) { ); if (peerConnection && peerConnection?.iceConnectionState === 'disconnected') { - //this will trigger a negotation event with iceRestart set to true in the createOffer options set + //this will trigger a negotiation event with iceRestart set to true in the createOffer options set global.setTimeout(async () => { window.log.info('onconnectionstatechange disconnected: restartIce()'); diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index 12c3fb9f2..e9ed9b6d2 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -301,7 +301,7 @@ export type ConversationsStateType = { * Saving it here, make it possible to restore the position of the user before the refresh by pointing * at that same messageId and aligning the list to the top. * - * Once the view scrolled, this value is reseted by resetOldTopMessageId + * Once the view scrolled, this value is reset by resetOldTopMessageId */ oldTopMessageId: string | null; @@ -310,7 +310,7 @@ export type ConversationsStateType = { * Saving it here, make it possible to restore the position of the user before the refresh by pointing * at that same messageId and aligning the list to the bottom. * - * Once the view scrolled, this value is reseted by resetOldBottomMessageId + * Once the view scrolled, this value is reset by resetOldBottomMessageId */ oldBottomMessageId: string | null; diff --git a/ts/test/session/unit/crypto/OpenGroupAuthentication_test.ts b/ts/test/session/unit/crypto/OpenGroupAuthentication_test.ts index c88c2f42f..853a2828f 100644 --- a/ts/test/session/unit/crypto/OpenGroupAuthentication_test.ts +++ b/ts/test/session/unit/crypto/OpenGroupAuthentication_test.ts @@ -467,7 +467,7 @@ const decryptBlindedMessage = async ( if (plaintextIncoming.length <= 32) { // throw Error; - window?.log?.error('decryptBlindedMessage: plaintext unsufficient length'); + window?.log?.error('decryptBlindedMessage: plaintext insufficient length'); return; } diff --git a/ts/test/session/unit/onion/OnionErrors_test.ts b/ts/test/session/unit/onion/OnionErrors_test.ts index db3c21f13..19071b43c 100644 --- a/ts/test/session/unit/onion/OnionErrors_test.ts +++ b/ts/test/session/unit/onion/OnionErrors_test.ts @@ -94,7 +94,7 @@ describe('OnionPathsErrors', () => { stubData('getSwarmNodesForPubkey').resolves(fakeSwarmForAssociatedWith); updateGuardNodesStub = stubData('updateGuardNodes').resolves(); - // those are still doing what they do, but we spy on their executation + // those are still doing what they do, but we spy on their execution updateSwarmSpy = stubData('updateSwarmNodesForPubkey').resolves(); stubData('getItemById').resolves({ id: SNODE_POOL_ITEM_ID, value: '' }); stubData('createOrUpdateItem').resolves(); diff --git a/ts/test/session/unit/padding/Padding_test.ts b/ts/test/session/unit/padding/Padding_test.ts index 17828955e..6f3d58350 100644 --- a/ts/test/session/unit/padding/Padding_test.ts +++ b/ts/test/session/unit/padding/Padding_test.ts @@ -53,7 +53,7 @@ describe('Padding', () => { }); it('add padding if the attachment is already too big', () => { - // we just want to make sure we do not overide attachment data. The file upload will fail, but at least make sure to keep the user data. + // we just want to make sure we do not override attachment data. The file upload will fail, but at least make sure to keep the user data. const bufferIn = new Uint8Array(MAX_ATTACHMENT_FILESIZE_BYTES + 1); const paddedBuffer = addAttachmentPadding(bufferIn); const expectedPaddedSize = Math.floor( diff --git a/ts/test/session/unit/sending/MessageSender_test.ts b/ts/test/session/unit/sending/MessageSender_test.ts index 6146f4b17..24b329ab0 100644 --- a/ts/test/session/unit/sending/MessageSender_test.ts +++ b/ts/test/session/unit/sending/MessageSender_test.ts @@ -145,7 +145,7 @@ describe('MessageSender', () => { expect(decodedTimestampFromSending).to.be.above(expectedTimestamp - 10); expect(decodedTimestampFromSending).to.be.below(expectedTimestamp + 10); - // then make sure the plaintextBuffer was overriden too + // then make sure the plaintextBuffer was overridden too const visibleMessageExpected = TestUtils.generateVisibleMessage({ timestamp: decodedTimestampFromSending, }); diff --git a/ts/test/session/unit/sogsv3/MutationCache_test.ts b/ts/test/session/unit/sogsv3/MutationCache_test.ts index eae02332e..dc46a7b08 100644 --- a/ts/test/session/unit/sogsv3/MutationCache_test.ts +++ b/ts/test/session/unit/sogsv3/MutationCache_test.ts @@ -311,7 +311,7 @@ describe('mutationCache', () => { server: roomInfos.serverUrl, room: roomInfos.roomId, changeType: ChangeType.REACTIONS, - seqno: 300, // greater than response messageResponse seqno should be procesed + seqno: 300, // greater than response messageResponse seqno should be processed metadata: { messageId: originalMessage.serverId, emoji: '😄', @@ -322,7 +322,7 @@ describe('mutationCache', () => { server: roomInfos.serverUrl, room: roomInfos.roomId, changeType: ChangeType.REACTIONS, - seqno: 301, //// greater than response messageResponse seqno should be procesed + seqno: 301, //// greater than response messageResponse seqno should be processed metadata: { messageId: originalMessage.serverId, emoji: '😈', diff --git a/ts/test/session/unit/sogsv3/knownBlindedKeys_test.ts b/ts/test/session/unit/sogsv3/knownBlindedKeys_test.ts index 925591553..8969d21dc 100644 --- a/ts/test/session/unit/sogsv3/knownBlindedKeys_test.ts +++ b/ts/test/session/unit/sogsv3/knownBlindedKeys_test.ts @@ -95,13 +95,13 @@ describe('knownBlindedKeys', () => { describe('writeKnownBlindedKeys', () => { it('writeKnownBlindedKeys with null', async () => { - // the cached blinded keys is resetted on each test, so that first one we try to write null + // the cached blinded keys is reset on each test, so that first one we try to write null await writeKnownBlindedKeys(); expect(createOrUpdateItem.notCalled).to.be.true; }); it('writeKnownBlindedKeys with null but loaded', async () => { - // the cached blinded keys is resetted on each test, so that first one we try to write null + // the cached blinded keys is reset on each test, so that first one we try to write null getItemById.resolves(null); await loadKnownBlindedKeys(); diff --git a/ts/test/session/unit/utils/JobQueue_test.ts b/ts/test/session/unit/utils/JobQueue_test.ts index 3b607bbab..575592fff 100644 --- a/ts/test/session/unit/utils/JobQueue_test.ts +++ b/ts/test/session/unit/utils/JobQueue_test.ts @@ -42,7 +42,7 @@ describe('JobQueue', () => { const start = Date.now(); await assert.eventually.deepEqual(Promise.all(input.map(mapper)), [10, 20, 30]); const timeTaken = Date.now() - start; - assert.isAtLeast(timeTaken, 20, 'Queue should take atleast 100ms to run.'); + assert.isAtLeast(timeTaken, 20, 'Queue should take at least 100ms to run.'); }); it('should return the result of the job', async () => { diff --git a/ts/themes/globals.tsx b/ts/themes/globals.tsx index 4c1bb5022..f1fc40cbc 100644 --- a/ts/themes/globals.tsx +++ b/ts/themes/globals.tsx @@ -1,7 +1,7 @@ import { hexColorToRGB } from '../util/hexColorToRGB'; import { COLORS } from './constants/colors'; -// These variables are independant of the current theme +// These variables are independent of the current theme export type ThemeGlobals = { /* Fonts */ '--font-default': string; diff --git a/ts/types/Reaction.ts b/ts/types/Reaction.ts index 89bf0a361..f2ab687e2 100644 --- a/ts/types/Reaction.ts +++ b/ts/types/Reaction.ts @@ -117,7 +117,7 @@ export interface Reaction { action: Action; } -// used for logic operations with reactions i.e reponses, db, etc. +// used for logic operations with reactions i.e responses, db, etc. export type ReactionList = Record< string, { diff --git a/ts/util/blockedNumberController.ts b/ts/util/blockedNumberController.ts index cc25c66a0..0e31bf78b 100644 --- a/ts/util/blockedNumberController.ts +++ b/ts/util/blockedNumberController.ts @@ -30,7 +30,7 @@ export class BlockedNumberController { /** * Check if a device is blocked synchronously. - * This will only check against the memory cache on if a device is blocked, it is reccomended to pass in the primary device pub key. + * This will only check against the memory cache on if a device is blocked, it is recommended to pass in the primary device pub key. * * Make sure `load()` has been called before this function so that the correct blocked state is returned. * diff --git a/ts/util/expiringMessages.ts b/ts/util/expiringMessages.ts index 31e1381d5..bb5d2ba1b 100644 --- a/ts/util/expiringMessages.ts +++ b/ts/util/expiringMessages.ts @@ -20,7 +20,7 @@ export async function destroyMessagesAndUpdateRedux( const conversationWithChanges = uniq(messages.map(m => m.conversationKey)); try { - // Delete all thoses messages in a single sql call + // Delete all those messages in a single sql call await Data.removeMessagesByIds(messages.map(m => m.messageId)); } catch (e) { window.log.error('destroyMessages: removeMessagesByIds failed', e && e.message ? e.message : e); diff --git a/ts/util/linkPreviewFetch.ts b/ts/util/linkPreviewFetch.ts index eedbd2347..3f99e9391 100644 --- a/ts/util/linkPreviewFetch.ts +++ b/ts/util/linkPreviewFetch.ts @@ -72,7 +72,7 @@ async function fetchWithRedirects( } urlsSeen.add(nextHrefToLoad); - // This `await` is deliberatly inside of a loop. + // This `await` is deliberately inside of a loop. // eslint-disable-next-line no-await-in-loop const response = await fetchFn(nextHrefToLoad, { ...options, diff --git a/ts/util/linkPreviews.ts b/ts/util/linkPreviews.ts index bcd1d2cd5..1d72647cf 100644 --- a/ts/util/linkPreviews.ts +++ b/ts/util/linkPreviews.ts @@ -126,7 +126,7 @@ function isLinkSneaky(href: string) { return true; } - // This is necesary because getDomain returns domains in punycode form. + // This is necessary because getDomain returns domains in punycode form. const unicodeDomain = nodeUrl.domainToUnicode ? nodeUrl.domainToUnicode(url.hostname) : url.hostname;