From 99ad1781a51ec54fae3e2f876b0243abe1c10cf1 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 13 Nov 2023 19:54:04 +0100 Subject: [PATCH] Appease the linter --- __mocks__/workerFactoryMock.js | 2 +- src/audio/recorderWorkletFactory.ts | 8 ++++---- src/utils/createMatrixClient.ts | 1 + src/workers/blurhashWorkerFactory.ts | 4 ++-- src/workers/indexeddbWorkerFactory.ts | 4 ++-- src/workers/playbackWorkerFactory.ts | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/__mocks__/workerFactoryMock.js b/__mocks__/workerFactoryMock.js index d86d2f0f5f..56dc085cd3 100644 --- a/__mocks__/workerFactoryMock.js +++ b/__mocks__/workerFactoryMock.js @@ -15,5 +15,5 @@ limitations under the License. */ export default function workerFactory(options) { - return jest.fn; + return jest.fn; } diff --git a/src/audio/recorderWorkletFactory.ts b/src/audio/recorderWorkletFactory.ts index 697d8bd7d2..925c9e911f 100644 --- a/src/audio/recorderWorkletFactory.ts +++ b/src/audio/recorderWorkletFactory.ts @@ -21,8 +21,8 @@ limitations under the License. import mxRecorderWorkletPath from "./RecorderWorklet"; export default function recorderWorkletFactory(context: AudioContext): Promise { - // The context.audioWorklet.addModule syntax is required for Webpack 5 to correctly recognise - // this as a worklet rather than an asset. This also requires the parser.javascript.worker - // configuration described in https://github.com/webpack/webpack.js.org/issues/6869. - return context.audioWorklet.addModule(new URL("./RecorderWorklet.ts", import.meta.url)); + // The context.audioWorklet.addModule syntax is required for Webpack 5 to correctly recognise + // this as a worklet rather than an asset. This also requires the parser.javascript.worker + // configuration described in https://github.com/webpack/webpack.js.org/issues/6869. + return context.audioWorklet.addModule(new URL("./RecorderWorklet.ts", import.meta.url)); } diff --git a/src/utils/createMatrixClient.ts b/src/utils/createMatrixClient.ts index 1569231bda..cdc9616426 100644 --- a/src/utils/createMatrixClient.ts +++ b/src/utils/createMatrixClient.ts @@ -23,6 +23,7 @@ import { IndexedDBStore, LocalStorageCryptoStore, } from "matrix-js-sdk/src/matrix"; + import indexeddbWorkerFactory from "../workers/indexeddbWorkerFactory"; const localStorage = window.localStorage; diff --git a/src/workers/blurhashWorkerFactory.ts b/src/workers/blurhashWorkerFactory.ts index ba66a27ef1..422b8ab6af 100644 --- a/src/workers/blurhashWorkerFactory.ts +++ b/src/workers/blurhashWorkerFactory.ts @@ -15,5 +15,5 @@ limitations under the License. */ export default function blurhashWorkerFactory(options?: WorkerOptions | undefined): Worker { - return new Worker(new URL("./workers/blurhash.worker.ts", import.meta.url), options); -} \ No newline at end of file + return new Worker(new URL("./workers/blurhash.worker.ts", import.meta.url), options); +} diff --git a/src/workers/indexeddbWorkerFactory.ts b/src/workers/indexeddbWorkerFactory.ts index a2cb9c6591..a2f6287cbe 100644 --- a/src/workers/indexeddbWorkerFactory.ts +++ b/src/workers/indexeddbWorkerFactory.ts @@ -15,5 +15,5 @@ limitations under the License. */ export default function blurhashWorkerFactory(options?: WorkerOptions | undefined): Worker { - return new Worker(new URL("../workers/indexeddb.worker.ts", import.meta.url), options) -} \ No newline at end of file + return new Worker(new URL("../workers/indexeddb.worker.ts", import.meta.url), options); +} diff --git a/src/workers/playbackWorkerFactory.ts b/src/workers/playbackWorkerFactory.ts index 6cca41841a..1d9ebc33d9 100644 --- a/src/workers/playbackWorkerFactory.ts +++ b/src/workers/playbackWorkerFactory.ts @@ -15,5 +15,5 @@ limitations under the License. */ export default function blurhashWorkerFactory(options?: WorkerOptions | undefined): Worker { - return new Worker(new URL("../workers/playback.worker.ts", import.meta.url), options) -} \ No newline at end of file + return new Worker(new URL("../workers/playback.worker.ts", import.meta.url), options); +}