additional lint fixes

This commit is contained in:
Timo
2024-09-03 17:11:52 +02:00
parent 55f01ee0d5
commit ab457be4bb
4 changed files with 23 additions and 14 deletions

View File

@@ -362,7 +362,7 @@ export function Grid<
// Because we're using react-spring in imperative mode, we're responsible for
// firing animations manually whenever the tiles array updates
useEffect(() => {
springRef.start();
void springRef.start();
}, [placedTiles, springRef]);
const animateDraggedTile = (
@@ -372,7 +372,7 @@ export function Grid<
const { tileId, tileX, tileY } = dragState.current!;
const tile = placedTiles.find((t) => t.id === tileId)!;
springRef.current
void springRef.current
.find((c) => (c.item as Tile<TileModel>).id === tileId)
?.start(
endOfGesture

View File

@@ -31,7 +31,7 @@ describe("CallList", () => {
);
};
it("should show room", async () => {
it("should show room", () => {
const rooms = [
{
roomName: "Room #1",

View File

@@ -22,6 +22,7 @@ import {
useMemo,
} from "react";
import { IWidgetApiRequest } from "matrix-widget-api";
import { logger } from "matrix-js-sdk/src/logger";
import { MediaDevice, useMediaDevices } from "../livekit/MediaDevicesContext";
import { useReactiveState } from "../useReactiveState";
@@ -83,10 +84,14 @@ export function useMuteStates(): MuteStates {
const video = useMuteState(devices.videoInput, () => true);
useEffect(() => {
widget?.api.transport.send(ElementWidgetActions.DeviceMute, {
audio_enabled: audio.enabled,
video_enabled: video.enabled,
});
widget?.api.transport
.send(ElementWidgetActions.DeviceMute, {
audio_enabled: audio.enabled,
video_enabled: video.enabled,
})
.catch((e) =>
logger.warn("Could not send DeviceMute action to widget", e),
);
}, [audio, video]);
const onMuteStateChangeRequest = useCallback(

View File

@@ -20,17 +20,21 @@ import posthog from "posthog-js";
import { initReactI18next } from "react-i18next";
import { afterEach, beforeEach } from "vitest";
import { cleanup } from "@testing-library/react";
import { logger } from "matrix-js-sdk/src/logger";
import { Config } from "./config/Config";
// Bare-minimum i18n config
i18n.use(initReactI18next).init({
lng: "en-GB",
fallbackLng: "en-GB",
interpolation: {
escapeValue: false, // React has built-in XSS protections
},
});
i18n
.use(initReactI18next)
.init({
lng: "en-GB",
fallbackLng: "en-GB",
interpolation: {
escapeValue: false, // React has built-in XSS protections
},
})
.catch((e) => logger.warn("Failed to init i18n for testing", e));
Config.initDefault();
posthog.opt_out_capturing();