+ : T[P];
};
export type KeysStartingWith = {
@@ -51,10 +51,10 @@ export type Defaultize = P extends any
export type DeepReadonly = T extends (infer R)[]
? DeepReadonlyArray
: T extends Function
- ? T
- : T extends object
- ? DeepReadonlyObject
- : T;
+ ? T
+ : T extends object
+ ? DeepReadonlyObject
+ : T;
interface DeepReadonlyArray extends ReadonlyArray> {}
diff --git a/src/DecryptionFailureTracker.ts b/src/DecryptionFailureTracker.ts
index 668a3bc6fc..96526c034a 100644
--- a/src/DecryptionFailureTracker.ts
+++ b/src/DecryptionFailureTracker.ts
@@ -23,7 +23,10 @@ import { PosthogAnalytics } from "./PosthogAnalytics";
export class DecryptionFailure {
public readonly ts: number;
- public constructor(public readonly failedEventId: string, public readonly errorCode: string) {
+ public constructor(
+ public readonly failedEventId: string,
+ public readonly errorCode: string,
+ ) {
this.ts = Date.now();
}
}
@@ -110,7 +113,10 @@ export class DecryptionFailureTracker {
* @param {function?} errorCodeMapFn The function used to map error codes to the
* trackedErrorCode. If not provided, the `.code` of errors will be used.
*/
- private constructor(private readonly fn: TrackingFn, private readonly errorCodeMapFn: ErrCodeMapFn) {
+ private constructor(
+ private readonly fn: TrackingFn,
+ private readonly errorCodeMapFn: ErrCodeMapFn,
+ ) {
if (!fn || typeof fn !== "function") {
throw new Error("DecryptionFailureTracker requires tracking function");
}
diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx
index 78dcd4a139..9a37e76ca8 100644
--- a/src/HtmlUtils.tsx
+++ b/src/HtmlUtils.tsx
@@ -327,7 +327,10 @@ const topicSanitizeHtmlParams: IExtendedSanitizeOptions = {
};
abstract class BaseHighlighter {
- public constructor(public highlightClass: string, public highlightLink?: string) {}
+ public constructor(
+ public highlightClass: string,
+ public highlightLink?: string,
+ ) {}
/**
* Apply the highlights to a section of text
diff --git a/src/ScalarAuthClient.ts b/src/ScalarAuthClient.ts
index 56069c2103..5be7a5d86a 100644
--- a/src/ScalarAuthClient.ts
+++ b/src/ScalarAuthClient.ts
@@ -34,7 +34,10 @@ export default class ScalarAuthClient {
private termsInteractionCallback?: TermsInteractionCallback;
private isDefaultManager: boolean;
- public constructor(private apiUrl: string, private uiUrl: string) {
+ public constructor(
+ private apiUrl: string,
+ private uiUrl: string,
+ ) {
this.scalarToken = null;
// `undefined` to allow `startTermsFlow` to fallback to a default
// callback if this is unset.
diff --git a/src/Terms.ts b/src/Terms.ts
index 41400ef872..afa6524828 100644
--- a/src/Terms.ts
+++ b/src/Terms.ts
@@ -33,7 +33,11 @@ export class Service {
* @param {string} baseUrl The Base URL of the service (ie. before '/_matrix')
* @param {string} accessToken The user's access token for the service
*/
- public constructor(public serviceType: SERVICE_TYPES, public baseUrl: string, public accessToken: string) {}
+ public constructor(
+ public serviceType: SERVICE_TYPES,
+ public baseUrl: string,
+ public accessToken: string,
+ ) {}
}
export interface LocalisedPolicy {
diff --git a/src/UserActivity.ts b/src/UserActivity.ts
index ae6417d4f4..e65f627e76 100644
--- a/src/UserActivity.ts
+++ b/src/UserActivity.ts
@@ -45,7 +45,10 @@ export default class UserActivity {
private lastScreenX = 0;
private lastScreenY = 0;
- public constructor(private readonly window: Window, private readonly document: Document) {
+ public constructor(
+ private readonly window: Window,
+ private readonly document: Document,
+ ) {
this.activeNowTimeout = new Timer(CURRENTLY_ACTIVE_THRESHOLD_MS);
this.activeRecentlyTimeout = new Timer(RECENTLY_ACTIVE_THRESHOLD_MS);
}
diff --git a/src/audio/ManagedPlayback.ts b/src/audio/ManagedPlayback.ts
index 6ecedd6766..1751545573 100644
--- a/src/audio/ManagedPlayback.ts
+++ b/src/audio/ManagedPlayback.ts
@@ -22,7 +22,11 @@ import { DEFAULT_WAVEFORM } from "./consts";
* A managed playback is a Playback instance that is guided by a PlaybackManager.
*/
export class ManagedPlayback extends Playback {
- public constructor(private manager: PlaybackManager, buf: ArrayBuffer, seedWaveform = DEFAULT_WAVEFORM) {
+ public constructor(
+ private manager: PlaybackManager,
+ buf: ArrayBuffer,
+ seedWaveform = DEFAULT_WAVEFORM,
+ ) {
super(buf, seedWaveform);
}
diff --git a/src/audio/Playback.ts b/src/audio/Playback.ts
index a40e0a463c..dc2619d692 100644
--- a/src/audio/Playback.ts
+++ b/src/audio/Playback.ts
@@ -72,7 +72,10 @@ export class Playback extends EventEmitter implements IDestroyable, PlaybackInte
* @param {number[]} seedWaveform Optional seed waveform to present until the proper waveform
* can be calculated. Contains values between zero and one, inclusive.
*/
- public constructor(private buf: ArrayBuffer, seedWaveform = DEFAULT_WAVEFORM) {
+ public constructor(
+ private buf: ArrayBuffer,
+ seedWaveform = DEFAULT_WAVEFORM,
+ ) {
super();
// Capture the file size early as reading the buffer will result in a 0-length buffer left behind
this.fileSize = this.buf.byteLength;
diff --git a/src/audio/VoiceMessageRecording.ts b/src/audio/VoiceMessageRecording.ts
index b46fd0da23..de00bea312 100644
--- a/src/audio/VoiceMessageRecording.ts
+++ b/src/audio/VoiceMessageRecording.ts
@@ -37,7 +37,10 @@ export class VoiceMessageRecording implements IDestroyable {
private buffer = new Uint8Array(0); // use this.audioBuffer to access
private playback?: Playback;
- public constructor(private matrixClient: MatrixClient, private voiceRecording: VoiceRecording) {
+ public constructor(
+ private matrixClient: MatrixClient,
+ private voiceRecording: VoiceRecording,
+ ) {
this.voiceRecording.onDataAvailable = this.onDataAvailable;
}
diff --git a/src/autocomplete/NotifProvider.tsx b/src/autocomplete/NotifProvider.tsx
index 88eca2f096..b524454bc7 100644
--- a/src/autocomplete/NotifProvider.tsx
+++ b/src/autocomplete/NotifProvider.tsx
@@ -28,7 +28,10 @@ import { TimelineRenderingType } from "../contexts/RoomContext";
const AT_ROOM_REGEX = /@\S*/g;
export default class NotifProvider extends AutocompleteProvider {
- public constructor(public room: Room, renderingType?: TimelineRenderingType) {
+ public constructor(
+ public room: Room,
+ renderingType?: TimelineRenderingType,
+ ) {
super({ commandRegex: AT_ROOM_REGEX, renderingType });
}
diff --git a/src/autocomplete/RoomProvider.tsx b/src/autocomplete/RoomProvider.tsx
index a710b71231..f12fdd004d 100644
--- a/src/autocomplete/RoomProvider.tsx
+++ b/src/autocomplete/RoomProvider.tsx
@@ -57,7 +57,10 @@ function matcherObject(
export default class RoomProvider extends AutocompleteProvider {
protected matcher: QueryMatcher>;
- public constructor(private readonly room: Room, renderingType?: TimelineRenderingType) {
+ public constructor(
+ private readonly room: Room,
+ renderingType?: TimelineRenderingType,
+ ) {
super({ commandRegex: ROOM_REGEX, renderingType });
this.matcher = new QueryMatcher>([], {
keys: ["displayedAlias", "matchName"],
diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx
index 2e8b579567..d43b4e25d1 100644
--- a/src/components/structures/ThreadPanel.tsx
+++ b/src/components/structures/ThreadPanel.tsx
@@ -204,7 +204,8 @@ const ThreadPanel: React.FC = ({ roomId, onClose, permalinkCreator }) =>
useEffect(() => {
const room = mxClient.getRoom(roomId);
- room?.createThreadsTimelineSets()
+ room
+ ?.createThreadsTimelineSets()
.then(() => room.fetchRoomThreads())
.then(() => {
setFilterOption(ThreadFilterType.All);
diff --git a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx
index 77fb046bfa..39a00f1034 100644
--- a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx
+++ b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx
@@ -362,32 +362,31 @@ export const AddExistingToSpace: React.FC = ({
const defaultRendererFactory =
(title: TranslationKey): Renderer =>
- (rooms, selectedToAdd, { scrollTop, height }, onChange) =>
- (
-
-
{_t(title)}
- (
- {
- onChange(checked, room);
- }
- : undefined
- }
- />
- )}
- />
-
- );
+ (rooms, selectedToAdd, { scrollTop, height }, onChange) => (
+
+
{_t(title)}
+ (
+ {
+ onChange(checked, room);
+ }
+ : undefined
+ }
+ />
+ )}
+ />
+
+ );
export const defaultRoomsRenderer = defaultRendererFactory(_td("common|rooms"));
export const defaultSpacesRenderer = defaultRendererFactory(_td("common|spaces"));
diff --git a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx
index 4771cd29d9..04df85e79f 100644
--- a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx
+++ b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx
@@ -252,12 +252,15 @@ const findVisibleRoomMembers = (visibleRooms: Room[], cli: MatrixClient, filterD
return Object.values(
visibleRooms
.filter((room) => !filterDMs || !DMRoomMap.shared().getUserIdForRoomId(room.roomId))
- .reduce((members, room) => {
- for (const member of room.getJoinedMembers()) {
- members[member.userId] = member;
- }
- return members;
- }, {} as Record),
+ .reduce(
+ (members, room) => {
+ for (const member of room.getJoinedMembers()) {
+ members[member.userId] = member;
+ }
+ return members;
+ },
+ {} as Record,
+ ),
).filter((it) => it.userId !== cli.getUserId());
};
diff --git a/src/components/views/elements/LazyRenderList.tsx b/src/components/views/elements/LazyRenderList.tsx
index 355d673404..8e816bbfcf 100644
--- a/src/components/views/elements/LazyRenderList.tsx
+++ b/src/components/views/elements/LazyRenderList.tsx
@@ -17,7 +17,11 @@ limitations under the License.
import React from "react";
class ItemRange {
- public constructor(public topCount: number, public renderCount: number, public bottomCount: number) {}
+ public constructor(
+ public topCount: number,
+ public renderCount: number,
+ public bottomCount: number,
+ ) {}
public contains(range: ItemRange): boolean {
// don't contain empty ranges
diff --git a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx
index 65ff1a9f68..e5c927ad4c 100644
--- a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx
+++ b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx
@@ -61,7 +61,8 @@ export default class SpellCheckLanguagesDropdown extends React.Component<
const plaf = PlatformPeg.get();
if (plaf) {
const languageNames = new Intl.DisplayNames([getUserLanguage()], { type: "language", style: "short" });
- plaf.getAvailableSpellCheckLanguages()
+ plaf
+ .getAvailableSpellCheckLanguages()
?.then((languages) => {
languages.sort(function (a, b) {
if (a < b) return -1;
diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx
index 78be675dfc..fcf92c7f62 100644
--- a/src/components/views/messages/MPollBody.tsx
+++ b/src/components/views/messages/MPollBody.tsx
@@ -366,7 +366,11 @@ export default class MPollBody extends React.Component {
}
}
export class UserVote {
- public constructor(public readonly ts: number, public readonly sender: string, public readonly answers: string[]) {}
+ public constructor(
+ public readonly ts: number,
+ public readonly sender: string,
+ public readonly answers: string[],
+ ) {}
}
function userResponseFromPollResponseEvent(event: MatrixEvent): UserVote {
diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx
index 66f1bf4375..b2587fe539 100644
--- a/src/components/views/right_panel/UserInfo.tsx
+++ b/src/components/views/right_panel/UserInfo.tsx
@@ -650,8 +650,8 @@ export const RoomKickButton = ({
? _t("user_info|disinvite_button_space")
: _t("user_info|kick_button_space")
: member.membership === "invite"
- ? _t("user_info|disinvite_button_room")
- : _t("user_info|kick_button_room"),
+ ? _t("user_info|disinvite_button_room")
+ : _t("user_info|kick_button_room"),
title:
member.membership === "invite"
? _t("user_info|disinvite_button_room_name", { roomName: room.name })
@@ -721,8 +721,8 @@ export const RoomKickButton = ({
? _t("user_info|disinvite_button_space")
: _t("user_info|kick_button_space")
: member.membership === "invite"
- ? _t("user_info|disinvite_button_room")
- : _t("user_info|kick_button_room");
+ ? _t("user_info|disinvite_button_room")
+ : _t("user_info|kick_button_room");
return (
{
const masterPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.masterKey;
const selfSigningPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.selfSigningKey;
const userSigningPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.userSigningKey;
- const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature(
- "org.matrix.e2e_cross_signing",
- );
+ const homeserverSupportsCrossSigning =
+ await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing");
const crossSigningReady = await crypto.isCrossSigningReady();
this.setState({
diff --git a/src/components/views/settings/tabs/user/SessionManagerTab.tsx b/src/components/views/settings/tabs/user/SessionManagerTab.tsx
index bc06103255..3f80c03d7c 100644
--- a/src/components/views/settings/tabs/user/SessionManagerTab.tsx
+++ b/src/components/views/settings/tabs/user/SessionManagerTab.tsx
@@ -194,13 +194,14 @@ const SessionManagerTab: React.FC = () => {
setFilter(filter);
clearTimeout(scrollIntoViewTimeoutRef.current);
// wait a tick for the filtered section to rerender with different height
- scrollIntoViewTimeoutRef.current = window.setTimeout(() =>
- filteredDeviceListRef.current?.scrollIntoView({
- // align element to top of scrollbox
- block: "start",
- inline: "nearest",
- behavior: "smooth",
- }),
+ scrollIntoViewTimeoutRef.current = window.setTimeout(
+ () =>
+ filteredDeviceListRef.current?.scrollIntoView({
+ // align element to top of scrollbox
+ block: "start",
+ inline: "nearest",
+ behavior: "smooth",
+ }),
);
};
diff --git a/src/customisations/Media.ts b/src/customisations/Media.ts
index 2177c013b7..415a7f4c5d 100644
--- a/src/customisations/Media.ts
+++ b/src/customisations/Media.ts
@@ -36,7 +36,10 @@ export class Media {
private client: MatrixClient;
// Per above, this constructor signature can be whatever is helpful for you.
- public constructor(private prepared: IPreparedMedia, client?: MatrixClient) {
+ public constructor(
+ private prepared: IPreparedMedia,
+ client?: MatrixClient,
+ ) {
this.client = client ?? MatrixClientPeg.safeGet();
if (!this.client) {
throw new Error("No possible MatrixClient for media resolution. Please provide one or log in.");
diff --git a/src/editor/model.ts b/src/editor/model.ts
index 232971adf0..cefdc86661 100644
--- a/src/editor/model.ts
+++ b/src/editor/model.ts
@@ -57,7 +57,11 @@ export default class EditorModel {
private autoCompletePartCount = 0;
private transformCallback: TransformCallback | null = null;
- public constructor(parts: Part[], partCreator: PartCreator, private updateCallback: UpdateCallback | null = null) {
+ public constructor(
+ parts: Part[],
+ partCreator: PartCreator,
+ private updateCallback: UpdateCallback | null = null,
+ ) {
this._parts = parts;
this._partCreator = partCreator;
this.transformCallback = null;
diff --git a/src/editor/offset.ts b/src/editor/offset.ts
index ad358dd92f..acad566047 100644
--- a/src/editor/offset.ts
+++ b/src/editor/offset.ts
@@ -18,7 +18,10 @@ import EditorModel from "./model";
import DocumentPosition from "./position";
export default class DocumentOffset {
- public constructor(public offset: number, public readonly atNodeEnd: boolean) {}
+ public constructor(
+ public offset: number,
+ public readonly atNodeEnd: boolean,
+ ) {}
public asPosition(model: EditorModel): DocumentPosition {
return model.positionForOffset(this.offset, this.atNodeEnd);
diff --git a/src/editor/parts.ts b/src/editor/parts.ts
index 970093c43f..12262280ae 100644
--- a/src/editor/parts.ts
+++ b/src/editor/parts.ts
@@ -254,7 +254,10 @@ export class PlainPart extends PlainBasePart implements IBasePart {
}
export abstract class PillPart extends BasePart implements IPillPart {
- public constructor(public resourceId: string, label: string) {
+ public constructor(
+ public resourceId: string,
+ label: string,
+ ) {
super(label);
}
@@ -414,7 +417,11 @@ export class EmojiPart extends BasePart implements IBasePart {
}
class RoomPillPart extends PillPart {
- public constructor(resourceId: string, label: string, private room?: Room) {
+ public constructor(
+ resourceId: string,
+ label: string,
+ private room?: Room,
+ ) {
super(resourceId, label);
}
@@ -455,7 +462,11 @@ class AtRoomPillPart extends RoomPillPart {
}
class UserPillPart extends PillPart {
- public constructor(userId: string, displayName: string, private member?: RoomMember) {
+ public constructor(
+ userId: string,
+ displayName: string,
+ private member?: RoomMember,
+ ) {
super(userId, displayName);
}
@@ -490,7 +501,10 @@ class UserPillPart extends PillPart {
}
class PillCandidatePart extends PlainBasePart implements IPillCandidatePart {
- public constructor(text: string, private autoCompleteCreator: IAutocompleteCreator) {
+ public constructor(
+ text: string,
+ private autoCompleteCreator: IAutocompleteCreator,
+ ) {
super(text);
}
diff --git a/src/editor/position.ts b/src/editor/position.ts
index 3f23016a8a..243c7970c8 100644
--- a/src/editor/position.ts
+++ b/src/editor/position.ts
@@ -27,7 +27,10 @@ type Callback = (part: Part, startIdx: number, endIdx: number) => void;
export type Predicate = (index: number, offset: number, part: Part) => boolean;
export default class DocumentPosition implements IPosition {
- public constructor(public readonly index: number, public readonly offset: number) {}
+ public constructor(
+ public readonly index: number,
+ public readonly offset: number,
+ ) {}
public compare(otherPos: DocumentPosition): number {
if (this.index === otherPos.index) {
diff --git a/src/editor/range.ts b/src/editor/range.ts
index 445185c375..2c95dc7a89 100644
--- a/src/editor/range.ts
+++ b/src/editor/range.ts
@@ -28,7 +28,11 @@ export default class Range {
private _lastStart: DocumentPosition;
private _initializedEmpty: boolean;
- public constructor(public readonly model: EditorModel, positionA: DocumentPosition, positionB = positionA) {
+ public constructor(
+ public readonly model: EditorModel,
+ positionA: DocumentPosition,
+ positionB = positionA,
+ ) {
const bIsLarger = positionA.compare(positionB) < 0;
this._start = bIsLarger ? positionA : positionB;
this._end = bIsLarger ? positionB : positionA;
diff --git a/src/models/Call.ts b/src/models/Call.ts
index 004782120e..c2bb25bada 100644
--- a/src/models/Call.ts
+++ b/src/models/Call.ts
@@ -570,10 +570,13 @@ export class JitsiCall extends Call {
// Tell others that we're connected, by adding our device to room state
await this.addOurDevice();
// Re-add this device every so often so our video member event doesn't become stale
- this.resendDevicesTimer = window.setInterval(async (): Promise => {
- logger.log(`Resending video member event for ${this.roomId}`);
- await this.addOurDevice();
- }, (this.STUCK_DEVICE_TIMEOUT_MS * 3) / 4);
+ this.resendDevicesTimer = window.setInterval(
+ async (): Promise => {
+ logger.log(`Resending video member event for ${this.roomId}`);
+ await this.addOurDevice();
+ },
+ (this.STUCK_DEVICE_TIMEOUT_MS * 3) / 4,
+ );
} else if (state === ConnectionState.Disconnected && isConnected(prevState)) {
this.updateParticipants(); // Local echo
@@ -717,7 +720,11 @@ export class ElementCall extends Call {
this.widget.url = ElementCall.generateWidgetUrl(this.client, this.roomId).toString();
}
- private constructor(public session: MatrixRTCSession, widget: IApp, client: MatrixClient) {
+ private constructor(
+ public session: MatrixRTCSession,
+ widget: IApp,
+ client: MatrixClient,
+ ) {
super(widget, client);
this.session.on(MatrixRTCSessionEvent.MembershipsChanged, this.onMembershipChanged);
diff --git a/src/rageshake/rageshake.ts b/src/rageshake/rageshake.ts
index aa80e463fb..45a5a40c4c 100644
--- a/src/rageshake/rageshake.ts
+++ b/src/rageshake/rageshake.ts
@@ -138,7 +138,10 @@ export class IndexedDBLogStore {
private flushPromise: Promise | null = null;
private flushAgainPromise: Promise | null = null;
- public constructor(private indexedDB: IDBFactory, private logger: ConsoleLogger) {
+ public constructor(
+ private indexedDB: IDBFactory,
+ private logger: ConsoleLogger,
+ ) {
this.id = "instance-" + randomString(16);
}
diff --git a/src/settings/controllers/PushToMatrixClientController.ts b/src/settings/controllers/PushToMatrixClientController.ts
index f525f8368f..f6985c25f5 100644
--- a/src/settings/controllers/PushToMatrixClientController.ts
+++ b/src/settings/controllers/PushToMatrixClientController.ts
@@ -22,7 +22,10 @@ import SettingController from "./SettingController";
* When the value changes, call a setter function on the matrix client with the new value
*/
export default class PushToMatrixClientController extends SettingController {
- public constructor(private setter: Function, private inverse: boolean) {
+ public constructor(
+ private setter: Function,
+ private inverse: boolean,
+ ) {
super();
}
diff --git a/src/settings/controllers/UIFeatureController.ts b/src/settings/controllers/UIFeatureController.ts
index 31a2be0efc..6822d74c62 100644
--- a/src/settings/controllers/UIFeatureController.ts
+++ b/src/settings/controllers/UIFeatureController.ts
@@ -26,7 +26,10 @@ import SettingsStore from "../SettingsStore";
* Settings using this controller are assumed to return `false` when disabled.
*/
export default class UIFeatureController extends SettingController {
- public constructor(private uiFeatureName: string, private forcedValue = false) {
+ public constructor(
+ private uiFeatureName: string,
+ private forcedValue = false,
+ ) {
super();
}
diff --git a/src/settings/handlers/DefaultSettingsHandler.ts b/src/settings/handlers/DefaultSettingsHandler.ts
index 06ddff7a0f..fe8dcb36df 100644
--- a/src/settings/handlers/DefaultSettingsHandler.ts
+++ b/src/settings/handlers/DefaultSettingsHandler.ts
@@ -27,7 +27,10 @@ export default class DefaultSettingsHandler extends SettingsHandler {
* @param {object} defaults The default setting values, keyed by setting name.
* @param {object} invertedDefaults The default inverted setting values, keyed by setting name.
*/
- public constructor(private defaults: Record, private invertedDefaults: Record) {
+ public constructor(
+ private defaults: Record,
+ private invertedDefaults: Record,
+ ) {
super();
}
diff --git a/src/settings/handlers/DeviceSettingsHandler.ts b/src/settings/handlers/DeviceSettingsHandler.ts
index 978c83c1a6..0423ba72d1 100644
--- a/src/settings/handlers/DeviceSettingsHandler.ts
+++ b/src/settings/handlers/DeviceSettingsHandler.ts
@@ -31,7 +31,10 @@ export default class DeviceSettingsHandler extends AbstractLocalStorageSettingsH
* @param {string[]} featureNames The names of known features.
* @param {WatchManager} watchers The watch manager to notify updates to
*/
- public constructor(private featureNames: string[], public readonly watchers: WatchManager) {
+ public constructor(
+ private featureNames: string[],
+ public readonly watchers: WatchManager,
+ ) {
super();
}
diff --git a/src/settings/handlers/LocalEchoWrapper.ts b/src/settings/handlers/LocalEchoWrapper.ts
index 75cc4636e6..ea216710e7 100644
--- a/src/settings/handlers/LocalEchoWrapper.ts
+++ b/src/settings/handlers/LocalEchoWrapper.ts
@@ -35,7 +35,10 @@ export default class LocalEchoWrapper extends SettingsHandler {
* @param {SettingsHandler} handler The handler to wrap
* @param {SettingLevel} level The level to notify updates at
*/
- public constructor(private readonly handler: SettingsHandler, private readonly level: SettingLevel) {
+ public constructor(
+ private readonly handler: SettingsHandler,
+ private readonly level: SettingLevel,
+ ) {
super();
}
diff --git a/src/stores/AsyncStore.ts b/src/stores/AsyncStore.ts
index d8f5bbdd1e..3a1e8c4756 100644
--- a/src/stores/AsyncStore.ts
+++ b/src/stores/AsyncStore.ts
@@ -52,7 +52,10 @@ export abstract class AsyncStore extends EventEmitter {
* @param {Dispatcher} dispatcher The dispatcher to rely upon.
* @param {T} initialState The initial state for the store.
*/
- protected constructor(private dispatcher: MatrixDispatcher, initialState: T = {}) {
+ protected constructor(
+ private dispatcher: MatrixDispatcher,
+ initialState: T = {},
+ ) {
super();
this.dispatcherRef = dispatcher.register(this.onDispatch.bind(this));
diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx
index 78b6660b3d..8a3f712e6b 100644
--- a/src/stores/RoomViewStore.tsx
+++ b/src/stores/RoomViewStore.tsx
@@ -160,7 +160,10 @@ export class RoomViewStore extends EventEmitter {
private dis?: MatrixDispatcher;
private dispatchToken?: string;
- public constructor(dis: MatrixDispatcher, private readonly stores: SdkContextClass) {
+ public constructor(
+ dis: MatrixDispatcher,
+ private readonly stores: SdkContextClass,
+ ) {
super();
this.resetDispatcher(dis);
this.stores.voiceBroadcastRecordingsStore.addListener(
@@ -319,14 +322,14 @@ export class RoomViewStore extends EventEmitter {
numMembers > 1000
? "MoreThanAThousand"
: numMembers > 100
- ? "OneHundredAndOneToAThousand"
- : numMembers > 10
- ? "ElevenToOneHundred"
- : numMembers > 2
- ? "ThreeToTen"
- : numMembers > 1
- ? "Two"
- : "One";
+ ? "OneHundredAndOneToAThousand"
+ : numMembers > 10
+ ? "ElevenToOneHundred"
+ : numMembers > 2
+ ? "ThreeToTen"
+ : numMembers > 1
+ ? "Two"
+ : "One";
this.stores.posthogAnalytics.trackEvent({
eventName: "JoinedRoom",
diff --git a/src/stores/local-echo/EchoTransaction.ts b/src/stores/local-echo/EchoTransaction.ts
index 9f5563d5d7..bc5418eb2c 100644
--- a/src/stores/local-echo/EchoTransaction.ts
+++ b/src/stores/local-echo/EchoTransaction.ts
@@ -30,7 +30,10 @@ export class EchoTransaction extends Whenable {
public readonly startTime = new Date();
- public constructor(public readonly auditName: string, public runFn: RunFn) {
+ public constructor(
+ public readonly auditName: string,
+ public runFn: RunFn,
+ ) {
super();
}
diff --git a/src/stores/local-echo/GenericEchoChamber.ts b/src/stores/local-echo/GenericEchoChamber.ts
index be552aebdf..1fa01d0f27 100644
--- a/src/stores/local-echo/GenericEchoChamber.ts
+++ b/src/stores/local-echo/GenericEchoChamber.ts
@@ -30,7 +30,10 @@ export abstract class GenericEchoChamber extends Ev
private cache = new Map();
protected matrixClient: MatrixClient | null = null;
- protected constructor(public readonly context: C, private lookupFn: (key: K) => V) {
+ protected constructor(
+ public readonly context: C,
+ private lookupFn: (key: K) => V,
+ ) {
super();
}
diff --git a/src/stores/notifications/ListNotificationState.ts b/src/stores/notifications/ListNotificationState.ts
index ca65161472..7d24678620 100644
--- a/src/stores/notifications/ListNotificationState.ts
+++ b/src/stores/notifications/ListNotificationState.ts
@@ -27,7 +27,10 @@ export class ListNotificationState extends NotificationState {
private rooms: Room[] = [];
private states: { [roomId: string]: RoomNotificationState } = {};
- public constructor(private byTileCount = false, private getRoomFn: FetchRoomFn) {
+ public constructor(
+ private byTileCount = false,
+ private getRoomFn: FetchRoomFn,
+ ) {
super();
}
diff --git a/src/stores/room-list/SlidingRoomListStore.ts b/src/stores/room-list/SlidingRoomListStore.ts
index 76b66c9e7a..5218881c2f 100644
--- a/src/stores/room-list/SlidingRoomListStore.ts
+++ b/src/stores/room-list/SlidingRoomListStore.ts
@@ -80,7 +80,10 @@ export class SlidingRoomListStoreClass extends AsyncStoreWithClient impl
private counts: Record = {};
private stickyRoomId: Optional;
- public constructor(dis: MatrixDispatcher, private readonly context: SdkContextClass) {
+ public constructor(
+ dis: MatrixDispatcher,
+ private readonly context: SdkContextClass,
+ ) {
super(dis);
this.setMaxListeners(20); // RoomList + LeftPanel + 8xRoomSubList + spares
}
diff --git a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts
index 1592eb4597..1b6472a018 100644
--- a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts
+++ b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts
@@ -30,7 +30,10 @@ export abstract class OrderingAlgorithm {
// set by setSortAlgorithm() in ctor
protected sortingAlgorithm!: SortAlgorithm;
- protected constructor(protected tagId: TagID, initialSortingAlgorithm: SortAlgorithm) {
+ protected constructor(
+ protected tagId: TagID,
+ initialSortingAlgorithm: SortAlgorithm,
+ ) {
// noinspection JSIgnoredPromiseFromCall
this.setSortAlgorithm(initialSortingAlgorithm); // we use the setter for validation
}
diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts
index dc232d862e..eafbe07d5d 100644
--- a/src/utils/DMRoomMap.ts
+++ b/src/utils/DMRoomMap.ts
@@ -202,15 +202,18 @@ export default class DMRoomMap {
public getUniqueRoomsWithIndividuals(): { [userId: string]: Room } {
if (!this.roomToUser) return {}; // No rooms means no map.
// map roomToUser to valid rooms with two participants
- return Object.keys(this.roomToUser).reduce((acc, roomId: string) => {
- const userId = this.getUserIdForRoomId(roomId);
- const room = this.matrixClient.getRoom(roomId);
- const hasTwoMembers = room?.getInvitedAndJoinedMemberCount() === 2;
- if (userId && room && hasTwoMembers) {
- acc[userId] = room;
- }
- return acc;
- }, {} as Record);
+ return Object.keys(this.roomToUser).reduce(
+ (acc, roomId: string) => {
+ const userId = this.getUserIdForRoomId(roomId);
+ const room = this.matrixClient.getRoom(roomId);
+ const hasTwoMembers = room?.getInvitedAndJoinedMemberCount() === 2;
+ if (userId && room && hasTwoMembers) {
+ acc[userId] = room;
+ }
+ return acc;
+ },
+ {} as Record,
+ );
}
/**
diff --git a/src/utils/FixedRollingArray.ts b/src/utils/FixedRollingArray.ts
index 8b9a1a68c8..376120532c 100644
--- a/src/utils/FixedRollingArray.ts
+++ b/src/utils/FixedRollingArray.ts
@@ -28,7 +28,10 @@ export class FixedRollingArray {
* @param width The width of the array.
* @param padValue The value to seed the array with.
*/
- public constructor(private width: number, padValue: T) {
+ public constructor(
+ private width: number,
+ padValue: T,
+ ) {
this.samples = arraySeed(padValue, this.width);
}
diff --git a/src/utils/MarkedExecution.ts b/src/utils/MarkedExecution.ts
index 6c32f8111d..722f9e7041 100644
--- a/src/utils/MarkedExecution.ts
+++ b/src/utils/MarkedExecution.ts
@@ -30,7 +30,10 @@ export class MarkedExecution {
* @param {Function} onMarkCallback A function that is called when a new mark is made. Not
* called if a mark is already flagged.
*/
- public constructor(private fn: () => void, private onMarkCallback?: () => void) {}
+ public constructor(
+ private fn: () => void,
+ private onMarkCallback?: () => void,
+ ) {}
/**
* Resets the mark without calling the function.
diff --git a/src/utils/RoomUpgrade.ts b/src/utils/RoomUpgrade.ts
index 88fc904541..9646bd52c4 100644
--- a/src/utils/RoomUpgrade.ts
+++ b/src/utils/RoomUpgrade.ts
@@ -76,8 +76,8 @@ export async function upgradeRoom(
if (updateSpaces) {
parentsToRelink = Array.from(SpaceStore.instance.getKnownParents(room.roomId))
.map((roomId) => cli.getRoom(roomId))
- .filter((parent) =>
- parent?.currentState.maySendStateEvent(EventType.SpaceChild, cli.getUserId()!),
+ .filter(
+ (parent) => parent?.currentState.maySendStateEvent(EventType.SpaceChild, cli.getUserId()!),
) as Room[];
}
diff --git a/src/utils/Singleflight.ts b/src/utils/Singleflight.ts
index 0d0829d1c0..125d643443 100644
--- a/src/utils/Singleflight.ts
+++ b/src/utils/Singleflight.ts
@@ -79,7 +79,10 @@ export class Singleflight {
}
class SingleflightContext {
- public constructor(private instance: Object, private key: string) {}
+ public constructor(
+ private instance: Object,
+ private key: string,
+ ) {}
/**
* Forget this particular instance and key combination, discarding the result.
diff --git a/src/utils/exportUtils/exportCustomCSS.css b/src/utils/exportUtils/exportCustomCSS.css
index 47dd4e5ec5..4807e316a8 100644
--- a/src/utils/exportUtils/exportCustomCSS.css
+++ b/src/utils/exportUtils/exportCustomCSS.css
@@ -32,8 +32,19 @@ limitations under the License.
bottom: 30px;
font-size: 17px;
padding: 6px 16px;
- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu,
- roboto, noto, arial, sans-serif;
+ font-family:
+ -apple-system,
+ BlinkMacSystemFont,
+ avenir next,
+ avenir,
+ segoe ui,
+ helvetica neue,
+ helvetica,
+ Ubuntu,
+ roboto,
+ noto,
+ arial,
+ sans-serif;
font-weight: 400;
line-height: 1.43;
border-radius: 4px;
@@ -42,8 +53,12 @@ limitations under the License.
#snackbar.mx_show {
visibility: visible;
- -webkit-animation: mx_snackbar_fadein 0.5s, mx_snackbar_fadeout 0.5s 2.5s;
- animation: mx_snackbar_fadein 0.5s, mx_snackbar_fadeout 0.5s 2.5s;
+ -webkit-animation:
+ mx_snackbar_fadein 0.5s,
+ mx_snackbar_fadeout 0.5s 2.5s;
+ animation:
+ mx_snackbar_fadein 0.5s,
+ mx_snackbar_fadeout 0.5s 2.5s;
}
a.mx_reply_anchor {
diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts
index 1a55b8408e..9af7476a39 100644
--- a/src/utils/permalinks/Permalinks.ts
+++ b/src/utils/permalinks/Permalinks.ts
@@ -93,7 +93,11 @@ export class RoomPermalinkCreator {
// Some of the tests done by this class are relatively expensive, so normally
// throttled to not happen on every update. Pass false as the shouldThrottle
// param to disable this behaviour, eg. for tests.
- public constructor(private room: Room | null, roomId: string | null = null, shouldThrottle = true) {
+ public constructor(
+ private room: Room | null,
+ roomId: string | null = null,
+ shouldThrottle = true,
+ ) {
this.roomId = room ? room.roomId : roomId!;
if (!this.roomId) {
diff --git a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
index 80241de156..55788af9ad 100644
--- a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
+++ b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
@@ -63,7 +63,10 @@ export class VoiceBroadcastRecorder
// current chunk length in seconds
private currentChunkLength = 0;
- public constructor(private voiceRecording: VoiceRecording, public readonly targetChunkLength: number) {
+ public constructor(
+ private voiceRecording: VoiceRecording,
+ public readonly targetChunkLength: number,
+ ) {
super();
this.voiceRecording.onDataAvailable = this.onDataAvailable;
}
diff --git a/src/widgets/WidgetType.ts b/src/widgets/WidgetType.ts
index 8dc02e70f8..e6f8c78051 100644
--- a/src/widgets/WidgetType.ts
+++ b/src/widgets/WidgetType.ts
@@ -22,7 +22,10 @@ export class WidgetType {
public static readonly CUSTOM = new WidgetType("m.custom", "m.custom");
public static readonly CALL = new WidgetType("m.call", "m.call");
- public constructor(public readonly preferred: string, public readonly legacy: string) {}
+ public constructor(
+ public readonly preferred: string,
+ public readonly legacy: string,
+ ) {}
public matches(type: string): boolean {
return type === this.preferred || type === this.legacy;
diff --git a/test/PosthogAnalytics-test.ts b/test/PosthogAnalytics-test.ts
index d73ee1ec66..748c8f17f6 100644
--- a/test/PosthogAnalytics-test.ts
+++ b/test/PosthogAnalytics-test.ts
@@ -39,7 +39,7 @@ const getFakePosthog = (): PostHog =>
get_user_state: jest.fn(),
},
identifyUser: jest.fn(),
- } as unknown as PostHog);
+ }) as unknown as PostHog;
interface ITestEvent extends IPosthogEvent {
eventName: "JestTestEvents";
@@ -288,7 +288,7 @@ describe("PosthogAnalytics", () => {
id: "0000000",
pseudonymousAnalyticsOptIn: true,
}),
- } as unknown as MatrixClient);
+ }) as unknown as MatrixClient;
beforeEach(async () => {
SdkConfig.put({
diff --git a/test/components/structures/AutocompleteInput-test.tsx b/test/components/structures/AutocompleteInput-test.tsx
index 76a007a25e..0baa43fb44 100644
--- a/test/components/structures/AutocompleteInput-test.tsx
+++ b/test/components/structures/AutocompleteInput-test.tsx
@@ -43,7 +43,7 @@ describe("AutocompleteInput", () => {
const constructMockProvider = (data: ICompletion[]) =>
({
getCompletions: jest.fn().mockImplementation(async () => data),
- } as unknown as AutocompleteProvider);
+ }) as unknown as AutocompleteProvider;
beforeEach(() => {
TestUtils.stubClient();
diff --git a/test/components/views/context_menus/ContextMenu-test.tsx b/test/components/views/context_menus/ContextMenu-test.tsx
index 8ffa186aa7..55974d3daf 100644
--- a/test/components/views/context_menus/ContextMenu-test.tsx
+++ b/test/components/views/context_menus/ContextMenu-test.tsx
@@ -31,7 +31,7 @@ describe("", () => {
({
windowWidth: windowSize,
windowHeight: windowSize,
- } as unknown as UIStore),
+ }) as unknown as UIStore,
);
window.Element.prototype.getBoundingClientRect = jest.fn().mockReturnValue({
width: menuSize,
diff --git a/test/components/views/context_menus/MessageContextMenu-test.tsx b/test/components/views/context_menus/MessageContextMenu-test.tsx
index 8da114a2e1..8fd2f9f416 100644
--- a/test/components/views/context_menus/MessageContextMenu-test.tsx
+++ b/test/components/views/context_menus/MessageContextMenu-test.tsx
@@ -480,7 +480,7 @@ describe("MessageContextMenu", () => {
it("shows view in room button when the event is a thread root", () => {
const eventContent = createMessageEventContent("hello");
const mxEvent = new MatrixEvent({ type: EventType.RoomMessage, content: eventContent });
- mxEvent.getThread = () => ({ rootEvent: mxEvent } as Thread);
+ mxEvent.getThread = () => ({ rootEvent: mxEvent }) as Thread;
const props = {
rightClick: true,
};
diff --git a/test/components/views/context_menus/SpaceContextMenu-test.tsx b/test/components/views/context_menus/SpaceContextMenu-test.tsx
index cf6d607ec7..9e787b8bd0 100644
--- a/test/components/views/context_menus/SpaceContextMenu-test.tsx
+++ b/test/components/views/context_menus/SpaceContextMenu-test.tsx
@@ -69,7 +69,7 @@ describe("", () => {
client: mockClient,
getMyMembership: jest.fn(),
...props,
- } as unknown as Room);
+ }) as unknown as Room;
const defaultProps = {
space: makeMockSpace(),
diff --git a/test/components/views/messages/TextualBody-test.tsx b/test/components/views/messages/TextualBody-test.tsx
index fb34f85a59..3c7a62f105 100644
--- a/test/components/views/messages/TextualBody-test.tsx
+++ b/test/components/views/messages/TextualBody-test.tsx
@@ -18,7 +18,6 @@ import React from "react";
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { mocked, MockedObject } from "jest-mock";
import { render } from "@testing-library/react";
-import * as prettier from "prettier";
import { getMockClientWithEventEmitter, mkEvent, mkMessage, mkStubRoom } from "../../../test-utils";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
@@ -225,11 +224,7 @@ describe("", () => {
const ev = mkRoomTextMessage(`Visit https://matrix.to/#/${room1Id}/${defaultEvent.getId()}`);
const { container } = getComponent({ mxEvent: ev });
const content = container.querySelector(".mx_EventTile_body");
- expect(
- prettier.format(content.innerHTML.replace(defaultEvent.getId(), "%event_id%"), {
- parser: "html",
- }),
- ).toMatchSnapshot();
+ expect(content.innerHTML.replace(defaultEvent.getId(), "%event_id%")).toMatchSnapshot();
});
it("should pillify a permalink to an unknown message in the same room with the label »Message«", () => {
@@ -243,11 +238,7 @@ describe("", () => {
const ev = mkRoomTextMessage(`Visit https://matrix.to/#/${room2Id}/${defaultEvent.getId()}`);
const { container } = getComponent({ mxEvent: ev });
const content = container.querySelector(".mx_EventTile_body");
- expect(
- prettier.format(content.innerHTML.replace(defaultEvent.getId(), "%event_id%"), {
- parser: "html",
- }),
- ).toMatchSnapshot();
+ expect(content.innerHTML.replace(defaultEvent.getId(), "%event_id%")).toMatchSnapshot();
});
});
diff --git a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap
index 383f7d5515..b0e02453b6 100644
--- a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap
+++ b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap
@@ -296,71 +296,9 @@ exports[` renders formatted m.text correctly pills get injected c
`;
-exports[` renders plain-text m.text correctly should pillify a permalink to a message in the same room with the label »Message from Member« 1`] = `
-"Visit
-Message from Member
-"
-`;
+exports[` renders plain-text m.text correctly should pillify a permalink to a message in the same room with the label »Message from Member« 1`] = `"Visit Message from Member"`;
-exports[` renders plain-text m.text correctly should pillify a permalink to an event in another room with the label »Message in Room 2« 1`] = `
-"Visit
-Message in Room 2
-"
-`;
+exports[` renders plain-text m.text correctly should pillify a permalink to an event in another room with the label »Message in Room 2« 1`] = `"Visit Message in Room 2"`;
exports[` renders plain-text m.text correctly should pillify a permalink to an unknown message in the same room with the label »Message« 1`] = `
", () => {
getTimelineForEvent: () => ({
getEvents: () => localPins,
}),
- } as unknown as EventTimelineSet);
+ }) as unknown as EventTimelineSet;
// Return all pins over fetchRoomEvent
cli.fetchRoomEvent.mockImplementation((roomId, eventId) => {
diff --git a/test/components/views/right_panel/RoomSummaryCard-test.tsx b/test/components/views/right_panel/RoomSummaryCard-test.tsx
index 986b3de2cf..735b190b7f 100644
--- a/test/components/views/right_panel/RoomSummaryCard-test.tsx
+++ b/test/components/views/right_panel/RoomSummaryCard-test.tsx
@@ -255,7 +255,7 @@ describe("", () => {
"@ernie:sesame.st": ["some-other-room-id", room.roomId],
},
}),
- }[eventType]),
+ })[eventType],
);
getComponent();
diff --git a/test/components/views/rooms/RoomPreviewBar-test.tsx b/test/components/views/rooms/RoomPreviewBar-test.tsx
index 80359a8dee..3a52cf290e 100644
--- a/test/components/views/rooms/RoomPreviewBar-test.tsx
+++ b/test/components/views/rooms/RoomPreviewBar-test.tsx
@@ -68,7 +68,7 @@ const makeMockRoomMember = ({
getPrevContent: jest.fn().mockReturnValue({ membership: oldMembership, ...memberContent }),
},
},
- } as unknown as RoomMember);
+ }) as unknown as RoomMember;
describe("", () => {
const roomId = "RoomPreviewBar-test-room";
diff --git a/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx b/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx
index 68815b2e42..0b20cc61b2 100644
--- a/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx
+++ b/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx
@@ -48,7 +48,7 @@ const constructMockProvider = (data: ICompletion[]) =>
getCompletions: jest.fn().mockImplementation(async () => data),
getName: jest.fn().mockReturnValue("test provider"),
renderCompletions: jest.fn().mockImplementation((components) => components),
- } as unknown as AutocompleteProvider);
+ }) as unknown as AutocompleteProvider;
describe("WysiwygAutocomplete", () => {
beforeAll(() => {
diff --git a/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx b/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx
index cd008db2ea..5e3346b6c1 100644
--- a/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx
+++ b/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx
@@ -227,7 +227,7 @@ describe("WysiwygComposer", () => {
getCompletions: jest.fn().mockImplementation(async () => data),
getName: jest.fn().mockReturnValue("test provider"),
renderCompletions: jest.fn().mockImplementation((components) => components),
- } as unknown as AutocompleteProvider);
+ }) as unknown as AutocompleteProvider;
// for each test we will insert input simulating a user mention
const initialInput = "@abc";
diff --git a/test/models/Call-test.ts b/test/models/Call-test.ts
index 3b00e1cdd7..a43849c943 100644
--- a/test/models/Call-test.ts
+++ b/test/models/Call-test.ts
@@ -984,7 +984,7 @@ describe("ElementCall", () => {
});
describe("create call", () => {
function setRoomMembers(memberIds: string[]) {
- jest.spyOn(room, "getJoinedMembers").mockReturnValue(memberIds.map((id) => ({ userId: id } as RoomMember)));
+ jest.spyOn(room, "getJoinedMembers").mockReturnValue(memberIds.map((id) => ({ userId: id }) as RoomMember));
}
beforeEach(async () => {
setRoomMembers(["@user:example.com", "@user2:example.com", "@user4:example.com"]);
diff --git a/test/test-utils/call.ts b/test/test-utils/call.ts
index ed3eb82174..2d049c258e 100644
--- a/test/test-utils/call.ts
+++ b/test/test-utils/call.ts
@@ -25,7 +25,10 @@ export class MockedCall extends Call {
public static readonly EVENT_TYPE = "org.example.mocked_call";
public readonly STUCK_DEVICE_TIMEOUT_MS = 1000 * 60 * 60; // 1 hour
- private constructor(room: Room, public readonly event: MatrixEvent) {
+ private constructor(
+ room: Room,
+ public readonly event: MatrixEvent,
+ ) {
super(
{
id: event.getStateKey()!,
diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx
index de3dd8be88..20aae4a64e 100644
--- a/test/toasts/IncomingCallToast-test.tsx
+++ b/test/toasts/IncomingCallToast-test.tsx
@@ -136,7 +136,7 @@ describe("IncomingCallEvent", () => {
({
...notifyContent,
notify_type: "ring",
- } as any);
+ }) as any;
const playMock = jest.fn();
const audio = { play: playMock, paused: true };
diff --git a/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts b/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts
index f3295d4d16..4002d7de5a 100644
--- a/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts
+++ b/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts
@@ -85,7 +85,7 @@ describe("shouldDisplayAsVoiceBroadcastTile", () => {
user: senderId,
content: {},
});
- event.getContent = () => ({} as any);
+ event.getContent = () => ({}) as any;
});
itShouldReturnFalse();
@@ -119,7 +119,7 @@ describe("shouldDisplayAsVoiceBroadcastTile", () => {
redacted_because: {} as unknown as IEvent,
},
});
- event.getContent = () => ({} as any);
+ event.getContent = () => ({}) as any;
});
itShouldReturnTrue();
diff --git a/yarn.lock b/yarn.lock
index 492ace8750..839a2fc82a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3034,11 +3034,6 @@
resolved "https://registry.yarnpkg.com/@types/pbf/-/pbf-3.0.5.tgz#a9495a58d8c75be4ffe9a0bd749a307715c07404"
integrity sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==
-"@types/prettier@^2.7.0":
- version "2.7.3"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
- integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
-
"@types/prop-types@*":
version "15.7.11"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563"
@@ -8538,10 +8533,10 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
-prettier@2.8.8:
- version "2.8.8"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
- integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
+prettier@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
+ integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
pretty-bytes@^5.6.0:
version "5.6.0"