From eab0c546632def43bcec509a471c2d2ada8730f9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 25 Sep 2021 20:47:59 -0600 Subject: [PATCH] Appease the linter --- spec/unit/models/MSC3089Branch.spec.ts | 4 ++-- spec/unit/models/MSC3089TreeSpace.spec.ts | 4 ++-- src/models/MSC3089Branch.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/unit/models/MSC3089Branch.spec.ts b/spec/unit/models/MSC3089Branch.spec.ts index ceee73406..85e1adead 100644 --- a/spec/unit/models/MSC3089Branch.spec.ts +++ b/spec/unit/models/MSC3089Branch.spec.ts @@ -247,7 +247,7 @@ describe("MSC3089Branch", () => { const fileContents = "contents go here"; const canaryContents = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); const canaryFile = {} as IEncryptedFile; - const canaryAddl = {canary: true}; + const canaryAddl = { canary: true }; indexEvent.getContent = () => ({ active: true, retained: true }); const stateKeyOrder = [fileEventId2, fileEventId]; const stateFn = jest.fn() @@ -316,7 +316,7 @@ describe("MSC3089Branch", () => { replacingEventId: () => null, getId: () => "$unknown", }]; - staticRoom.getLiveTimeline = () => ({getEvents: () => events}) as EventTimeline; + staticRoom.getLiveTimeline = () => ({ getEvents: () => events }) as EventTimeline; directory.getFile = (evId: string) => { expect(evId).toEqual(fileEventId); diff --git a/spec/unit/models/MSC3089TreeSpace.spec.ts b/spec/unit/models/MSC3089TreeSpace.spec.ts index 5c45f18e5..bf05a7914 100644 --- a/spec/unit/models/MSC3089TreeSpace.spec.ts +++ b/spec/unit/models/MSC3089TreeSpace.spec.ts @@ -933,7 +933,7 @@ describe("MSC3089TreeSpace", () => { const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); // We clone the file info just to make sure it doesn't get mutated for the test. - const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), {metadata: true}); + const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), { metadata: true }); expect(result).toMatchObject({ event_id: fileEventId }); expect(uploadFn).toHaveBeenCalledTimes(1); @@ -1000,7 +1000,7 @@ describe("MSC3089TreeSpace", () => { const buf = Uint8Array.from(Array.from(fileContents).map((_, i) => fileContents.charCodeAt(i))); // We clone the file info just to make sure it doesn't get mutated for the test. - const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), {"m.new_content": true}); + const result = await tree.createFile(fileName, buf, Object.assign({}, fileInfo), { "m.new_content": true }); expect(result).toMatchObject({ event_id: fileEventId }); expect(uploadFn).toHaveBeenCalledTimes(1); diff --git a/src/models/MSC3089Branch.ts b/src/models/MSC3089Branch.ts index bd817611d..d8f62579f 100644 --- a/src/models/MSC3089Branch.ts +++ b/src/models/MSC3089Branch.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { MatrixClient } from "../client"; -import { EventType, IEncryptedFile, RelationType, UNSTABLE_MSC3089_BRANCH } from "../@types/event"; +import { IEncryptedFile, RelationType, UNSTABLE_MSC3089_BRANCH } from "../@types/event"; import { IContent, MatrixEvent } from "./event"; import { MSC3089TreeSpace } from "./MSC3089TreeSpace"; @@ -211,7 +211,7 @@ export class MSC3089Branch { break; // prevent infinite loop } } - } while(!!childEvent); + } while (childEvent); return fileHistory; }