diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index b7f52d3895..95f3459763 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -237,7 +237,7 @@ export default abstract class BasePlatform { } /** - * Restarts the application, without neccessarily reloading + * Restarts the application, without necessarily reloading * any application code */ abstract reload(); diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 2b934251b7..787f602fb7 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -948,7 +948,7 @@ export default class CallHandler extends EventEmitter { ): Promise { if (consultFirst) { // if we're consulting, we just start by placing a call to the transfer - // target (passing the transferee so the actual tranfer can happen later) + // target (passing the transferee so the actual transfer can happen later) this.dialNumber(destination, call); return; } diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 7f92653c30..6b9724caab 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -187,7 +187,7 @@ const transformTags: IExtendedSanitizeOptions["transformTags"] = { // custom to delete attribs.target; } } else { - // Delete the href attrib if it is falsey + // Delete the href attrib if it is falsy delete attribs.href; } diff --git a/src/ImageUtils.ts b/src/ImageUtils.ts index 9bfab37193..acf8daa607 100644 --- a/src/ImageUtils.ts +++ b/src/ImageUtils.ts @@ -25,7 +25,7 @@ limitations under the License. * reflect the actual height the scaled thumbnail occupies. * * This is very useful for calculating how much height a thumbnail will actually - * consume in the timeline, when performing scroll offset calcuations + * consume in the timeline, when performing scroll offset calculations * (e.g. scroll locking) */ export function thumbHeight(fullWidth: number, fullHeight: number, thumbWidth: number, thumbHeight: number) { diff --git a/src/Rooms.ts b/src/Rooms.ts index 32419080ac..b7b2f64a77 100644 --- a/src/Rooms.ts +++ b/src/Rooms.ts @@ -52,7 +52,7 @@ export function looksLikeDirectMessageRoom(room: Room, myUserId: string): boolea // Used to split rooms via tags const tagNames = Object.keys(room.tags); // Used for 1:1 direct chats - // Show 1:1 chats in seperate "Direct Messages" section as long as they haven't + // Show 1:1 chats in separate "Direct Messages" section as long as they haven't // been moved to a different tag section const totalMemberCount = room.currentState.getJoinedMemberCount() + room.currentState.getInvitedMemberCount(); diff --git a/src/async-components/views/dialogs/security/CreateKeyBackupDialog.tsx b/src/async-components/views/dialogs/security/CreateKeyBackupDialog.tsx index 560eaadab1..dea6c87941 100644 --- a/src/async-components/views/dialogs/security/CreateKeyBackupDialog.tsx +++ b/src/async-components/views/dialogs/security/CreateKeyBackupDialog.tsx @@ -291,7 +291,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent { }); // default value here too, otherwise we need to handle null / undefined - // values between mounting and the initial value propgating + // values between mounting and the initial value propagating const value = this.props.value || this.state.defaultCountry.iso2; return { if (hasLocationPublishError) { - return _t('An error occured whilst sharing your live location, please try again'); + return _t('An error occurred whilst sharing your live location, please try again'); } if (hasStopSharingError) { return _t('An error occurred while stopping your live location, please try again'); diff --git a/src/components/views/dialogs/BulkRedactDialog.tsx b/src/components/views/dialogs/BulkRedactDialog.tsx index 86c0f4033f..3d8e6967f1 100644 --- a/src/components/views/dialogs/BulkRedactDialog.tsx +++ b/src/components/views/dialogs/BulkRedactDialog.tsx @@ -25,7 +25,7 @@ import { EventType } from "matrix-js-sdk/src/@types/event"; import { _t } from '../../../languageHandler'; import dis from "../../../dispatcher/dispatcher"; import { Action } from "../../../dispatcher/actions"; -import { IDialogProps } from "../dialogs/IDialogProps"; +import { IDialogProps } from "./IDialogProps"; import BaseDialog from "../dialogs/BaseDialog"; import InfoDialog from "../dialogs/InfoDialog"; import DialogButtons from "../elements/DialogButtons"; diff --git a/src/components/views/dialogs/ExportDialog.tsx b/src/components/views/dialogs/ExportDialog.tsx index 5c1bf48cac..1a8d1020cd 100644 --- a/src/components/views/dialogs/ExportDialog.tsx +++ b/src/components/views/dialogs/ExportDialog.tsx @@ -263,7 +263,7 @@ const ExportDialog: React.FC = ({ room, onFinished }) => { else onFinished(false); }; - const confirmCanel = async () => { + const confirmCancel = async () => { await exporter?.cancelExport(); setExportCancelled(true); setExporting(false); @@ -346,7 +346,7 @@ const ExportDialog: React.FC = ({ room, onFinished }) => { hasCancel={true} cancelButton={_t("Continue")} onCancel={() => setCancelWarning(false)} - onPrimaryButtonClick={confirmCanel} + onPrimaryButtonClick={confirmCancel} /> ); diff --git a/src/components/views/dialogs/KeySignatureUploadFailedDialog.tsx b/src/components/views/dialogs/KeySignatureUploadFailedDialog.tsx index 381c96dc66..72ce6bd3ba 100644 --- a/src/components/views/dialogs/KeySignatureUploadFailedDialog.tsx +++ b/src/components/views/dialogs/KeySignatureUploadFailedDialog.tsx @@ -29,7 +29,7 @@ interface IProps extends IDialogProps { error: string; }>>; source: string; - continuation: () => void; + continuation: () => Promise; } const KeySignatureUploadFailedDialog: React.FC = ({ diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index cb06d09d80..f07964650f 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -52,7 +52,7 @@ const socials = [ }, { name: 'Reddit', img: require("../../../../res/img/social/reddit.png"), - url: (url) => `http://www.reddit.com/submit?url=${url}`, + url: (url) => `https://www.reddit.com/submit?url=${url}`, }, { name: 'email', img: require("../../../../res/img/social/email-1.png"), diff --git a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx index 719c31c48f..0fedcf3d93 100644 --- a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx +++ b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx @@ -44,7 +44,7 @@ enum ProgressState { } interface IProps extends IDialogProps { - // if false, will close the dialog as soon as the restore completes succesfully + // if false, will close the dialog as soon as the restore completes successfully // default: true showSummary?: boolean; // If specified, gather the key from the user but then call the function with the backup diff --git a/src/components/views/elements/AccessibleButton.tsx b/src/components/views/elements/AccessibleButton.tsx index 3db6d0dfb0..36600cbfb3 100644 --- a/src/components/views/elements/AccessibleButton.tsx +++ b/src/components/views/elements/AccessibleButton.tsx @@ -96,7 +96,7 @@ export default function AccessibleButton({ // that might receive focus as a result of the AccessibleButtonClick action // It's because we are using html buttons at a few places e.g. inside dialogs // And divs which we report as role button to assistive technologies. - // Browsers handle space and enter keypresses differently and we are only adjusting to the + // Browsers handle space and enter key presses differently and we are only adjusting to the // inconsistencies here newProps.onKeyDown = (e) => { const action = getKeyBindingsManager().getAccessibilityAction(e); diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 1eba26a3d4..f202a1e570 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -57,7 +57,7 @@ interface IProps { // which bypasses permission prompts as it was added explicitly by that user room?: Room; threadId?: string | null; - // Specifying 'fullWidth' as true will render the app tile to fill the width of the app drawer continer. + // Specifying 'fullWidth' as true will render the app tile to fill the width of the app drawer container. // This should be set to true when there is only one widget in the app drawer, otherwise it should be false. fullWidth?: boolean; // Optional. If set, renders a smaller view of the widget @@ -288,7 +288,7 @@ export default class AppTile extends React.Component { private setupSgListeners() { this.sgWidget.on("preparing", this.onWidgetPreparing); this.sgWidget.on("ready", this.onWidgetReady); - // emits when the capabilites have been setup or changed + // emits when the capabilities have been set up or changed this.sgWidget.on("capabilitiesNotified", this.onWidgetCapabilitiesNotified); } @@ -543,7 +543,7 @@ export default class AppTile extends React.Component { const sandboxFlags = "allow-forms allow-popups allow-popups-to-escape-sandbox " + "allow-same-origin allow-scripts allow-presentation allow-downloads"; - // Additional iframe feature pemissions + // Additional iframe feature permissions // (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/) const iframeFeatures = "microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write;"; diff --git a/src/components/views/elements/ErrorBoundary.tsx b/src/components/views/elements/ErrorBoundary.tsx index 91e56b82be..4d281de12c 100644 --- a/src/components/views/elements/ErrorBoundary.tsx +++ b/src/components/views/elements/ErrorBoundary.tsx @@ -53,7 +53,7 @@ export default class ErrorBoundary extends React.PureComponent<{}, IState> { // in their own `console.error` invocation. logger.error(error); logger.error( - "The above error occured while React was rendering the following components:", + "The above error occurred while React was rendering the following components:", componentStack, ); } diff --git a/src/components/views/elements/LanguageDropdown.tsx b/src/components/views/elements/LanguageDropdown.tsx index 7d19dbfce1..cf1dfedcce 100644 --- a/src/components/views/elements/LanguageDropdown.tsx +++ b/src/components/views/elements/LanguageDropdown.tsx @@ -99,7 +99,7 @@ export default class LanguageDropdown extends React.Component { }); // default value here too, otherwise we need to handle null / undefined - // values between mounting and the initial value propgating + // values between mounting and the initial value propagating let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true); let value = null; if (language) { diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index 0272980ef0..dd7cf76855 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -167,7 +167,7 @@ export default class ReplyChain extends React.Component { await this.matrixClient.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId); } catch (e) { // if it fails catch the error and return early, there's no point trying to find the event in this case. - // Return null as it is falsey and thus should be treated as an error (as the event cannot be resolved). + // Return null as it is falsy and thus should be treated as an error (as the event cannot be resolved). return null; } return this.room.findEventById(eventId); diff --git a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx index 126898a4ff..a269ac0010 100644 --- a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx +++ b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx @@ -99,7 +99,7 @@ export default class SpellCheckLanguagesDropdown extends React.Component { return this.props.getChildren(start, end); } else { // XXX: I'm not sure why anything would pass null into this, it seems - // like a bizzare case to handle, but I'm preserving the behaviour. + // like a bizarre case to handle, but I'm preserving the behaviour. // (see commit 38d5c7d5c5d5a34dc16ef5d46278315f5c57f542) return React.Children.toArray(this.props.children).filter((c) => { return c != null; diff --git a/src/components/views/messages/MImageBody.tsx b/src/components/views/messages/MImageBody.tsx index 73c59472fd..118de8e8fe 100644 --- a/src/components/views/messages/MImageBody.tsx +++ b/src/components/views/messages/MImageBody.tsx @@ -485,14 +485,14 @@ export default class MImageBody extends React.Component { return this.wrapImage(contentUrl, thumbnail); } - // Overidden by MStickerBody + // Overridden by MStickerBody protected wrapImage(contentUrl: string, children: JSX.Element): JSX.Element { return { children } ; } - // Overidden by MStickerBody + // Overridden by MStickerBody protected getPlaceholder(width: number, height: number): JSX.Element { const blurhash = this.props.mxEvent.getContent().info?.[BLURHASH_FIELD]; @@ -506,12 +506,12 @@ export default class MImageBody extends React.Component { return ; } - // Overidden by MStickerBody + // Overridden by MStickerBody protected getTooltip(): JSX.Element { return null; } - // Overidden by MStickerBody + // Overridden by MStickerBody protected getFileBody(): string | JSX.Element { if (this.props.forExport) return null; /* diff --git a/src/components/views/rooms/AppsDrawer.tsx b/src/components/views/rooms/AppsDrawer.tsx index 22afea2490..601cc9ee34 100644 --- a/src/components/views/rooms/AppsDrawer.tsx +++ b/src/components/views/rooms/AppsDrawer.tsx @@ -49,7 +49,7 @@ interface IState { // @ts-ignore - TS wants a string key, but we know better apps: {[id: Container]: IApp[]}; resizingVertical: boolean; // true when changing the height of the apps drawer - resizingHorizontal: boolean; // true when chagning the distribution of the width between widgets + resizingHorizontal: boolean; // true when changing the distribution of the width between widgets resizing: boolean; } @@ -259,7 +259,7 @@ export default class AppsDrawer extends React.Component { mx_AppsDrawer_2apps: apps.length === 2, mx_AppsDrawer_3apps: apps.length === 3, }); - const appConatiners = + const appContainers =
{ apps.map((app, i) => { if (i < 1) return app; @@ -272,7 +272,7 @@ export default class AppsDrawer extends React.Component { let drawer; if (widgetIsMaxmised) { - drawer = appConatiners; + drawer = appContainers; } else { drawer = { handleWrapperClass="mx_AppsContainer_resizerHandleContainer" className="mx_AppsContainer_resizer" resizeNotifier={this.props.resizeNotifier}> - { appConatiners } + { appContainers } ; } diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index a7f9a12229..c1325658f9 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -104,7 +104,7 @@ export default class AuxPanel extends React.Component { const severity = ev.getContent().severity || "normal"; const stateKey = ev.getStateKey(); - // We want a non-empty title but can accept falsey values (e.g. + // We want a non-empty title but can accept falsy values (e.g. // zero) if (title && value !== undefined) { counters.push({ diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index e54c0900a5..160bb9fff5 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -212,7 +212,7 @@ interface IProps { // whether or not to display thread info showThreadInfo?: boolean; - // if specified and `true`, the message his behing + // if specified and `true`, the message is being // hidden for moderation from other users but is // displayed to the current user either because they're // the author or they are a moderator diff --git a/src/components/views/toasts/VerificationRequestToast.tsx b/src/components/views/toasts/VerificationRequestToast.tsx index b424f43900..3786f5c858 100644 --- a/src/components/views/toasts/VerificationRequestToast.tsx +++ b/src/components/views/toasts/VerificationRequestToast.tsx @@ -66,7 +66,7 @@ export default class VerificationRequestToast extends React.PureComponent { // To avoid visual glitching of two modals stacking briefly, we customise the // terms dialog sizing when it will appear for the integration manager so that - // it gets the same basic size as the IM's own modal. + // it gets the same basic size as the integration manager's own modal. return dialogTermsInteractionCallback( policyInfo, agreedUrls, 'mx_TermsDialog_forIntegrationManager', ); diff --git a/src/notifications/VectorPushRulesDefinitions.ts b/src/notifications/VectorPushRulesDefinitions.ts index 85cefd5194..1d6aff8a13 100644 --- a/src/notifications/VectorPushRulesDefinitions.ts +++ b/src/notifications/VectorPushRulesDefinitions.ts @@ -132,7 +132,7 @@ export const VectorPushRulesDefinitions = { }), // Messages just sent to a group chat room - // 1:1 room messages are catched by the .m.rule.room_one_to_one rule if any defined + // 1:1 room messages are caught by the .m.rule.room_one_to_one rule if any defined // By opposition, all other room messages are from group chat rooms. ".m.rule.message": new VectorPushRuleDefinition({ description: _td("Messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js @@ -144,7 +144,7 @@ export const VectorPushRulesDefinitions = { }), // Encrypted messages just sent to a group chat room - // Encrypted 1:1 room messages are catched by the .m.rule.encrypted_room_one_to_one rule if any defined + // Encrypted 1:1 room messages are caught by the .m.rule.encrypted_room_one_to_one rule if any defined // By opposition, all other room messages are from group chat rooms. ".m.rule.encrypted": new VectorPushRuleDefinition({ description: _td("Encrypted messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js diff --git a/src/settings/watchers/ThemeWatcher.ts b/src/settings/watchers/ThemeWatcher.ts index a8994d6f74..041435c7cd 100644 --- a/src/settings/watchers/ThemeWatcher.ts +++ b/src/settings/watchers/ThemeWatcher.ts @@ -100,7 +100,7 @@ export default class ThemeWatcher { // itself completely redundant since we just override the result here and we're // now effectively just using the ThemeController as a place to store the static // variable. The system theme setting probably ought to have an equivalent - // controller that honours the same flag, although probablt better would be to + // controller that honours the same flag, although probably better would be to // have the theme logic in one place rather than split between however many // different places. if (ThemeController.isLogin) return 'light'; diff --git a/src/stores/OwnBeaconStore.ts b/src/stores/OwnBeaconStore.ts index 885c15b69d..1dbf8668fc 100644 --- a/src/stores/OwnBeaconStore.ts +++ b/src/stores/OwnBeaconStore.ts @@ -43,7 +43,7 @@ import { TimedGeoUri, watchPosition, } from "../utils/beacon"; -import { getCurrentPosition } from "../utils/beacon/geolocation"; +import { getCurrentPosition } from "../utils/beacon"; const isOwnBeacon = (beacon: Beacon, userId: string): boolean => beacon.beaconInfoOwner === userId; @@ -456,7 +456,7 @@ export class OwnBeaconStore extends AsyncStoreWithClient { private onWatchedPosition = (position: GeolocationPosition) => { const timedGeoPosition = mapGeolocationPositionToTimedGeo(position); - // if this is our first position, publish immediateley + // if this is our first position, publish immediately if (!this.lastPublishedPositionTimestamp) { this.publishLocationToBeacons(timedGeoPosition); } else { diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 77909ae612..29e974498d 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -504,7 +504,7 @@ export class RoomViewStore extends Store { // since we should still consider a join to be in progress until the room // & member events come down the sync. // - // This flag remains true after the room has been sucessfully joined, + // This flag remains true after the room has been successfully joined, // (this store doesn't listen for the appropriate member events) // so you should always observe the joined state from the member event // if a room object is present. diff --git a/src/stores/WidgetEchoStore.ts b/src/stores/WidgetEchoStore.ts index 34b9b4aa47..2923d46b09 100644 --- a/src/stores/WidgetEchoStore.ts +++ b/src/stores/WidgetEchoStore.ts @@ -44,9 +44,9 @@ class WidgetEchoStore extends EventEmitter { } /** - * Gets the widgets for a room, substracting those that are pending deletion. + * Gets the widgets for a room, subtracting those that are pending deletion. * Widgets that are pending addition are not included, since widgets are - * represted as MatrixEvents, so to do this we'd have to create fake MatrixEvents, + * represented as MatrixEvents, so to do this we'd have to create fake MatrixEvents, * and we don't really need the actual widget events anyway since we just want to * show a spinner / prevent widgets being added twice. * diff --git a/src/stores/spaces/flattenSpaceHierarchy.ts b/src/stores/spaces/flattenSpaceHierarchy.ts index 9d94cd4a8d..138947c395 100644 --- a/src/stores/spaces/flattenSpaceHierarchy.ts +++ b/src/stores/spaces/flattenSpaceHierarchy.ts @@ -38,7 +38,7 @@ const traverseSpaceDescendants = ( }; /** - * Helper function to traverse space heirachy and flatten + * Helper function to traverse space hierarchy and flatten * @param spaceEntityMap ie map of rooms or dm userIds * @param spaceDescendantMap map of spaces and their children * @returns set of all rooms diff --git a/src/stores/widgets/WidgetMessagingStore.ts b/src/stores/widgets/WidgetMessagingStore.ts index d954af6d60..bcc46c0e43 100644 --- a/src/stores/widgets/WidgetMessagingStore.ts +++ b/src/stores/widgets/WidgetMessagingStore.ts @@ -91,7 +91,7 @@ export class WidgetMessagingStore extends AsyncStoreWithClient { /** * Gets the widget messaging class for a given widget UID. * @param {string} widgetUid The widget UID. - * @returns {ClientWidgetApi} The widget API, or a falsey value if not found. + * @returns {ClientWidgetApi} The widget API, or a falsy value if not found. */ public getMessagingForUid(widgetUid: string): ClientWidgetApi { return this.widgetMap.get(widgetUid); diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index ee4837cfb6..811522a667 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -142,7 +142,7 @@ export default class DMRoomMap { /** * Gets the DM room which the given IDs share, if any. * @param {string[]} ids The identifiers (user IDs and email addresses) to look for. - * @returns {Room} The DM room which all IDs given share, or falsey if no common room. + * @returns {Room} The DM room which all IDs given share, or falsy if no common room. */ public getDMRoomForIdentifiers(ids: string[]): Room { // TODO: [Canonical DMs] Handle lookups for email addresses. diff --git a/src/utils/ErrorUtils.tsx b/src/utils/ErrorUtils.tsx index 52c9c470f8..6af61aca2e 100644 --- a/src/utils/ErrorUtils.tsx +++ b/src/utils/ErrorUtils.tsx @@ -25,7 +25,7 @@ import { _t, _td, Tags, TranslatedString } from '../languageHandler'; * * @param {string} limitType The limit_type from the error * @param {string} adminContact The admin_contact from the error - * @param {Object} strings Translateable string for different + * @param {Object} strings Translatable string for different * limit_type. Must include at least the empty string key * which is the default. Strings may include an 'a' tag * for the admin contact link. diff --git a/src/utils/FileUtils.ts b/src/utils/FileUtils.ts index 21d2928073..e934389152 100644 --- a/src/utils/FileUtils.ts +++ b/src/utils/FileUtils.ts @@ -64,7 +64,7 @@ export function presentableTextForFile( // big a file they are downloading. // The content.info also contains a MIME-type but we don't display // it since it is "ugly", users generally aren't aware what it - // means and the type of the attachment can usually be inferrered + // means and the type of the attachment can usually be inferred // from the file extension. text += ' (' + filesize(content.info.size) + ')'; } diff --git a/src/utils/LazyValue.ts b/src/utils/LazyValue.ts index 9cdcda489a..70ffb1106c 100644 --- a/src/utils/LazyValue.ts +++ b/src/utils/LazyValue.ts @@ -29,7 +29,7 @@ export class LazyValue { * Whether or not a cached value is present. */ public get present(): boolean { - // we use a tracking variable just in case the final value is falsey + // we use a tracking variable just in case the final value is falsy return this.done; } diff --git a/src/utils/Singleflight.ts b/src/utils/Singleflight.ts index 07d82efa3e..93822594a2 100644 --- a/src/utils/Singleflight.ts +++ b/src/utils/Singleflight.ts @@ -34,7 +34,7 @@ const keyMap = new EnhancedMap>(); * second call comes through late. There are various functions named "forget" * to have the cache be cleared of a result. * - * Singleflights in our usecase are tied to an instance of something, combined + * Singleflights in our use case are tied to an instance of something, combined * with a string key to differentiate between multiple possible actions. This * means that a "save" key will be scoped to the instance which defined it and * not leak between other instances. This is done to avoid having to concatenate diff --git a/src/utils/beacon/useBeacon.ts b/src/utils/beacon/useBeacon.ts index 91b00104a1..e1dcfc4975 100644 --- a/src/utils/beacon/useBeacon.ts +++ b/src/utils/beacon/useBeacon.ts @@ -54,7 +54,7 @@ export const useBeacon = (beaconInfoEvent: MatrixEvent): Beacon | undefined => { } }, [beaconInfoEvent, matrixClient]); - // beacon update will fire when this beacon is superceded + // beacon update will fire when this beacon is superseded // check the updated event id for equality to the matrix event const beaconInstanceEventId = useEventEmitterState( beacon, diff --git a/src/utils/direct-messages.ts b/src/utils/direct-messages.ts index 0932cc9aaf..e67c01c7ca 100644 --- a/src/utils/direct-messages.ts +++ b/src/utils/direct-messages.ts @@ -175,7 +175,7 @@ export class ThreepidMember extends Member { this.id = id; } - // This is a getter that would be falsey on all other implementations. Until we have + // This is a getter that would be falsy on all other implementations. Until we have // better type support in the react-sdk we can use this trick to determine the kind // of 3PID we're dealing with, if any. get isEmail(): boolean { diff --git a/src/utils/exportUtils/exportCustomCSS.css b/src/utils/exportUtils/exportCustomCSS.css index 0a0a2c2005..a62f890649 100644 --- a/src/utils/exportUtils/exportCustomCSS.css +++ b/src/utils/exportUtils/exportCustomCSS.css @@ -120,7 +120,7 @@ a.mx_reply_anchor:hover { } .mx_ReplyChain_Export { - margin-top: 0px; + margin-top: 0; margin-bottom: 5px; } diff --git a/src/utils/permalinks/ElementPermalinkConstructor.ts b/src/utils/permalinks/ElementPermalinkConstructor.ts index b901581ca6..01525081a6 100644 --- a/src/utils/permalinks/ElementPermalinkConstructor.ts +++ b/src/utils/permalinks/ElementPermalinkConstructor.ts @@ -80,7 +80,7 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor { } /** - * Parses an app route (`(user|room)/identifer`) to a Matrix entity + * Parses an app route (`(user|room)/identifier`) to a Matrix entity * (room, user). * @param {string} route The app route * @returns {PermalinkParts} diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts index 4ab355fe78..d4d6627051 100644 --- a/src/utils/permalinks/Permalinks.ts +++ b/src/utils/permalinks/Permalinks.ts @@ -274,7 +274,7 @@ export function makeUserPermalink(userId: string): string { export function makeRoomPermalink(roomId: string): string { if (!roomId) { - throw new Error("can't permalink a falsey roomId"); + throw new Error("can't permalink a falsy roomId"); } // If the roomId isn't actually a room ID, don't try to list the servers. diff --git a/test/components/views/beacon/LeftPanelLiveShareWarning-test.tsx b/test/components/views/beacon/LeftPanelLiveShareWarning-test.tsx index a05fbf348f..8a10f73575 100644 --- a/test/components/views/beacon/LeftPanelLiveShareWarning-test.tsx +++ b/test/components/views/beacon/LeftPanelLiveShareWarning-test.tsx @@ -168,7 +168,7 @@ describe('', () => { const component = getComponent(); // error mode expect(component.find('.mx_LeftPanelLiveShareWarning').at(0).text()).toEqual( - 'An error occured whilst sharing your live location', + 'An error occurred whilst sharing your live location', ); act(() => { diff --git a/test/components/views/beacon/RoomLiveShareWarning-test.tsx b/test/components/views/beacon/RoomLiveShareWarning-test.tsx index 13ae42fce4..2a6956c92b 100644 --- a/test/components/views/beacon/RoomLiveShareWarning-test.tsx +++ b/test/components/views/beacon/RoomLiveShareWarning-test.tsx @@ -359,7 +359,7 @@ describe('', () => { // renders wire error ui expect(component.find('.mx_RoomLiveShareWarning_label').text()).toEqual( - 'An error occured whilst sharing your live location, please try again', + 'An error occurred whilst sharing your live location, please try again', ); expect(findByTestId(component, 'room-live-share-wire-error-close-button').length).toBeTruthy(); }); diff --git a/test/components/views/beacon/__snapshots__/LeftPanelLiveShareWarning-test.tsx.snap b/test/components/views/beacon/__snapshots__/LeftPanelLiveShareWarning-test.tsx.snap index d1d6dd56c0..0dd32a9387 100644 --- a/test/components/views/beacon/__snapshots__/LeftPanelLiveShareWarning-test.tsx.snap +++ b/test/components/views/beacon/__snapshots__/LeftPanelLiveShareWarning-test.tsx.snap @@ -69,7 +69,7 @@ exports[` when user has live location monitor rende role="button" tabIndex={0} > - An error occured whilst sharing your live location + An error occurred whilst sharing your live location
diff --git a/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap b/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap index c9695ddf58..8701c83c91 100644 --- a/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap +++ b/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap @@ -32,7 +32,7 @@ exports[` when user has live beacons and geolocation is - An error occured whilst sharing your live location, please try again + An error occurred whilst sharing your live location, please try again