Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy committed Feb 5, 2025
1 parent bee4fb4 commit 8d2635d
Show file tree
Hide file tree
Showing 96 changed files with 504 additions and 96 deletions.
8 changes: 7 additions & 1 deletion playwright/testcontainers/mas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import { AbstractStartedContainer, GenericContainer, type StartedTestContainer, Wait, type ExecResult } from "testcontainers";
import {
AbstractStartedContainer,
GenericContainer,
type StartedTestContainer,
Wait,
type ExecResult,
} from "testcontainers";
import { type StartedPostgreSqlContainer } from "@testcontainers/postgresql";
import * as YAML from "yaml";

Expand Down
8 changes: 7 additions & 1 deletion playwright/testcontainers/synapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import { AbstractStartedContainer, GenericContainer, type RestartOptions, type StartedTestContainer, Wait } from "testcontainers";
import {
AbstractStartedContainer,
GenericContainer,
type RestartOptions,
type StartedTestContainer,
Wait,
} from "testcontainers";
import { type APIRequestContext, type TestInfo } from "@playwright/test";
import crypto from "node:crypto";
import * as YAML from "yaml";
Expand Down
2 changes: 1 addition & 1 deletion src/@types/react.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import {type PropsWithChildren} from "react";
import { type PropsWithChildren } from "react";

import type React from "react";

Expand Down
4 changes: 3 additions & 1 deletion src/AddThreepid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import Modal from "./Modal";
import { _t, UserFriendlyError } from "./languageHandler";
import IdentityAuthClient from "./IdentityAuthClient";
import { SSOAuthEntry } from "./components/views/auth/InteractiveAuthEntryComponents";
import InteractiveAuthDialog, { type InteractiveAuthDialogProps } from "./components/views/dialogs/InteractiveAuthDialog";
import InteractiveAuthDialog, {
type InteractiveAuthDialogProps,
} from "./components/views/dialogs/InteractiveAuthDialog";

function getIdServerDomain(matrixClient: MatrixClient): string {
const idBaseUrl = matrixClient.getIdentityServerUrl(true);
Expand Down
8 changes: 7 additions & 1 deletion src/Lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ Please see LICENSE files in the repository root for full details.
*/

import { type ReactNode } from "react";
import { createClient, type MatrixClient, SSOAction, type OidcTokenRefresher, decodeBase64 } from "matrix-js-sdk/src/matrix";
import {
createClient,
type MatrixClient,
SSOAction,
type OidcTokenRefresher,
decodeBase64,
} from "matrix-js-sdk/src/matrix";
import { type AESEncryptedSecretStoragePayload } from "matrix-js-sdk/src/types";
import { type QueryDict } from "matrix-js-sdk/src/utils";
import { logger } from "matrix-js-sdk/src/logger";
Expand Down
4 changes: 3 additions & 1 deletion src/SecurityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import Modal from "./Modal";
import { MatrixClientPeg } from "./MatrixClientPeg";
import { _t } from "./languageHandler";
import { isSecureBackupRequired } from "./utils/WellKnownUtils";
import AccessSecretStorageDialog, { type KeyParams } from "./components/views/dialogs/security/AccessSecretStorageDialog";
import AccessSecretStorageDialog, {
type KeyParams,
} from "./components/views/dialogs/security/AccessSecretStorageDialog";
import { ModuleRunner } from "./modules/ModuleRunner";
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog";
Expand Down
9 changes: 8 additions & 1 deletion src/SlashCommands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ Please see LICENSE files in the repository root for full details.
*/

import * as React from "react";
import { ContentHelpers, Direction, EventType, type IContent, type MRoomTopicEventContent, type User } from "matrix-js-sdk/src/matrix";
import {
ContentHelpers,
Direction,
EventType,
type IContent,
type MRoomTopicEventContent,
type User,
} from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { KnownMembership, type RoomMemberEventContent } from "matrix-js-sdk/src/types";

Expand Down
8 changes: 7 additions & 1 deletion src/Terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ Please see LICENSE files in the repository root for full details.
*/

import classNames from "classnames";
import { type SERVICE_TYPES, type MatrixClient, type Terms, type Policy, type InternationalisedPolicy } from "matrix-js-sdk/src/matrix";
import {
type SERVICE_TYPES,
type MatrixClient,
type Terms,
type Policy,
type InternationalisedPolicy,
} from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";

import Modal from "./Modal";
Expand Down
2 changes: 1 addition & 1 deletion src/accessibility/roving/RovingTabIndexWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import {type ReactElement, type RefCallback} from "react";
import { type ReactElement, type RefCallback } from "react";

import type React from "react";
import { useRovingTabIndex } from "../RovingTabIndex";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ Please see LICENSE files in the repository root for full details.
import React, { createRef } from "react";
import FileSaver from "file-saver";
import { logger } from "matrix-js-sdk/src/logger";
import { type AuthDict, type CrossSigningKeys, MatrixError, type UIAFlow, type UIAResponse } from "matrix-js-sdk/src/matrix";
import {
type AuthDict,
type CrossSigningKeys,
MatrixError,
type UIAFlow,
type UIAResponse,
} from "matrix-js-sdk/src/matrix";
import { type GeneratedSecretStorageKey } from "matrix-js-sdk/src/crypto-api";
import classNames from "classnames";
import CheckmarkIcon from "@vector-im/compound-design-tokens/assets/web/icons/check";
Expand Down
2 changes: 1 addition & 1 deletion src/autocomplete/Autocompleter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import UserProvider from "./UserProvider";
import EmojiProvider from "./EmojiProvider";
import NotifProvider from "./NotifProvider";
import { timeout } from "../utils/promise";
import {type ICommand} from "./AutocompleteProvider";
import { type ICommand } from "./AutocompleteProvider";
import type AutocompleteProvider from "./AutocompleteProvider";
import SpaceProvider from "./SpaceProvider";
import { TimelineRenderingType } from "../contexts/RoomContext";
Expand Down
9 changes: 8 additions & 1 deletion src/components/structures/AutocompleteInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import React, { useState, type ReactNode, type ChangeEvent, type KeyboardEvent, useRef, type ReactElement } from "react";
import React, {
useState,
type ReactNode,
type ChangeEvent,
type KeyboardEvent,
useRef,
type ReactElement,
} from "react";
import classNames from "classnames";
import { SearchIcon, CloseIcon } from "@vector-im/compound-design-tokens/assets/web/icons";

Expand Down
5 changes: 4 additions & 1 deletion src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ import {
UPDATE_STATUS_INDICATOR,
} from "../../stores/notifications/RoomNotificationStateStore";
import { SettingLevel } from "../../settings/SettingLevel";
import ThreepidInviteStore, { type IThreepidInvite, type IThreepidInviteWireFormat } from "../../stores/ThreepidInviteStore";
import ThreepidInviteStore, {
type IThreepidInvite,
type IThreepidInviteWireFormat,
} from "../../stores/ThreepidInviteStore";
import { UIFeature } from "../../settings/UIFeature";
import DialPadModal from "../views/voip/DialPadModal";
import { showToast as showMobileGuideToast } from "../../toasts/MobileGuideToast";
Expand Down
9 changes: 8 additions & 1 deletion src/components/structures/MessagePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ Please see LICENSE files in the repository root for full details.

import React, { createRef, type ReactNode, type TransitionEvent } from "react";
import classNames from "classnames";
import { type Room, type MatrixClient, RoomStateEvent, EventStatus, type MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
import {
type Room,
type MatrixClient,
RoomStateEvent,
EventStatus,
type MatrixEvent,
EventType,
} from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { isSupportedReceiptType } from "matrix-js-sdk/src/utils";

Expand Down
10 changes: 9 additions & 1 deletion src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import React, { type ChangeEvent, type ComponentProps, createRef, type ReactElement, type ReactNode, type RefObject, type JSX } from "react";
import React, {
type ChangeEvent,
type ComponentProps,
createRef,
type ReactElement,
type ReactNode,
type RefObject,
type JSX,
} from "react";
import classNames from "classnames";
import {
type IRecommendedVersion,
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/grouper/BaseGrouper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
import { type ReactNode } from "react";
import { type MatrixEvent } from "matrix-js-sdk/src/matrix";

import {type WrappedEvent} from "../MessagePanel";
import { type WrappedEvent } from "../MessagePanel";
import type MessagePanel from "../MessagePanel";

/* Grouper classes determine when events can be grouped together in a summary.
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/grouper/CreationGrouper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EventType, M_BEACON_INFO, type MatrixEvent } from "matrix-js-sdk/src/ma
import { KnownMembership } from "matrix-js-sdk/src/types";

import { BaseGrouper } from "./BaseGrouper";
import {type WrappedEvent} from "../MessagePanel";
import { type WrappedEvent } from "../MessagePanel";
import type MessagePanel from "../MessagePanel";
import DMRoomMap from "../../../utils/DMRoomMap";
import { _t } from "../../../languageHandler";
Expand Down
10 changes: 9 additions & 1 deletion src/components/views/avatars/DecoratedRoomAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ Please see LICENSE files in the repository root for full details.

import React from "react";
import classNames from "classnames";
import { EventType, JoinRule, type MatrixEvent, type Room, RoomEvent, type User, UserEvent } from "matrix-js-sdk/src/matrix";
import {
EventType,
JoinRule,
type MatrixEvent,
type Room,
RoomEvent,
type User,
UserEvent,
} from "matrix-js-sdk/src/matrix";
import { UnstableValue } from "matrix-js-sdk/src/NamespacedValue";
import { Tooltip } from "@vector-im/compound-web";

Expand Down
9 changes: 8 additions & 1 deletion src/components/views/dialogs/BulkRedactDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ Please see LICENSE files in the repository root for full details.

import React, { useState } from "react";
import { logger } from "matrix-js-sdk/src/logger";
import { type MatrixClient, type RoomMember, type Room, type MatrixEvent, EventTimeline, EventType } from "matrix-js-sdk/src/matrix";
import {
type MatrixClient,
type RoomMember,
type Room,
type MatrixEvent,
EventTimeline,
EventType,
} from "matrix-js-sdk/src/matrix";

import { _t } from "../../../languageHandler";
import dis from "../../../dispatcher/dispatcher";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ Please see LICENSE files in the repository root for full details.
*/

import React from "react";
import { type Capability, isTimelineCapability, type Widget, WidgetEventCapability, type WidgetKind } from "matrix-widget-api";
import {
type Capability,
isTimelineCapability,
type Widget,
WidgetEventCapability,
type WidgetKind,
} from "matrix-widget-api";
import { lexicographicCompare } from "matrix-js-sdk/src/utils";

import BaseDialog from "./BaseDialog";
Expand Down
9 changes: 8 additions & 1 deletion src/components/views/elements/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import React, { type ChangeEvent, createRef, type CSSProperties, type ReactElement, type ReactNode, type Ref } from "react";
import React, {
type ChangeEvent,
createRef,
type CSSProperties,
type ReactElement,
type ReactNode,
type Ref,
} from "react";
import classnames from "classnames";

import AccessibleButton, { type ButtonEvent } from "./AccessibleButton";
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/messages/IBodyProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/

import {type LegacyRef} from "react";
import { type LegacyRef } from "react";
import { type MatrixEvent } from "matrix-js-sdk/src/matrix";

import type React from "react";
Expand Down
3 changes: 2 additions & 1 deletion src/components/views/messages/MessageActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
EventTimeline,
RoomStateEvent,
EventType,
type Relations } from "matrix-js-sdk/src/matrix";
type Relations,
} from "matrix-js-sdk/src/matrix";
import classNames from "classnames";
import {
PinIcon,
Expand Down
6 changes: 5 additions & 1 deletion src/components/views/rooms/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import { flatMap } from "lodash";
import { type Room } from "matrix-js-sdk/src/matrix";
import { defer } from "matrix-js-sdk/src/utils";

import Autocompleter, { type ICompletion, type ISelectionRange, type IProviderCompletions } from "../../../autocomplete/Autocompleter";
import Autocompleter, {
type ICompletion,
type ISelectionRange,
type IProviderCompletions,
} from "../../../autocomplete/Autocompleter";
import SettingsStore from "../../../settings/SettingsStore";
import RoomContext from "../../../contexts/RoomContext";

Expand Down
6 changes: 5 additions & 1 deletion src/components/views/rooms/EditMessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import classNames from "classnames";
import { EventStatus, type MatrixEvent, type Room, MsgType } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { type Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
import { type ReplacementEvent, type RoomMessageEventContent, type RoomMessageTextEventContent } from "matrix-js-sdk/src/types";
import {
type ReplacementEvent,
type RoomMessageEventContent,
type RoomMessageTextEventContent,
} from "matrix-js-sdk/src/types";

import { _t } from "../../../languageHandler";
import dis from "../../../dispatcher/dispatcher";
Expand Down
8 changes: 7 additions & 1 deletion src/components/views/rooms/MessageComposerButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ Please see LICENSE files in the repository root for full details.
*/

import classNames from "classnames";
import { type IEventRelation, type Room, type MatrixClient, THREAD_RELATION_TYPE, M_POLL_START } from "matrix-js-sdk/src/matrix";
import {
type IEventRelation,
type Room,
type MatrixClient,
THREAD_RELATION_TYPE,
M_POLL_START,
} from "matrix-js-sdk/src/matrix";
import React, { createContext, type ReactElement, type ReactNode, useContext, useRef } from "react";

import { _t } from "../../../languageHandler";
Expand Down
5 changes: 4 additions & 1 deletion src/components/views/rooms/RoomPreviewBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import React, { type ChangeEvent, type ReactNode } from "react";
import { type Room, type RoomMember, EventType, RoomType, JoinRule, type MatrixError } from "matrix-js-sdk/src/matrix";
import { KnownMembership, type RoomJoinRulesEventContent } from "matrix-js-sdk/src/types";
import classNames from "classnames";
import { type RoomPreviewOpts, RoomViewLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";
import {
type RoomPreviewOpts,
RoomViewLifecycle,
} from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";

import { MatrixClientPeg } from "../../../MatrixClientPeg";
import dis from "../../../dispatcher/dispatcher";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ Please see LICENSE files in the repository root for full details.

import { richToPlain, plainToRich } from "@vector-im/matrix-wysiwyg";
import { type IContent, type IEventRelation, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
import { type ReplacementEvent, type RoomMessageEventContent, type RoomMessageTextEventContent } from "matrix-js-sdk/src/types";
import {
type ReplacementEvent,
type RoomMessageEventContent,
type RoomMessageTextEventContent,
} from "matrix-js-sdk/src/types";

import SettingsStore from "../../../../../settings/SettingsStore";
import { parsePermalink } from "../../../../../utils/permalinks/Permalinks";
Expand Down
3 changes: 2 additions & 1 deletion src/components/views/settings/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import {
PushRuleVectorState,
VectorPushRulesDefinitions,
VectorState,
type VectorPushRuleDefinition } from "../../../notifications";
type VectorPushRuleDefinition,
} from "../../../notifications";
import { _t, type TranslatedString } from "../../../languageHandler";
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
import SettingsStore from "../../../settings/SettingsStore";
Expand Down
7 changes: 6 additions & 1 deletion src/components/views/settings/ThemeChoicePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ import dis from "../../../dispatcher/dispatcher";
import { type RecheckThemePayload } from "../../../dispatcher/payloads/RecheckThemePayload";
import { Action } from "../../../dispatcher/actions";
import { useTheme } from "../../../hooks/useTheme";
import { findHighContrastTheme, getOrderedThemes, type CustomTheme as CustomThemeType, type ITheme } from "../../../theme";
import {
findHighContrastTheme,
getOrderedThemes,
type CustomTheme as CustomThemeType,
type ITheme,
} from "../../../theme";
import { useSettingValue } from "../../../hooks/useSettings";

/**
Expand Down
Loading

0 comments on commit 8d2635d

Please sign in to comment.