diff --git a/pro/src/account.ts b/pro/src/account.ts index b21c5e3..0702c1c 100644 --- a/pro/src/account.ts +++ b/pro/src/account.ts @@ -191,13 +191,14 @@ export const getAndSaveProFeatures = async ( featureName: i, enableAtTimeMs: 1e12, expireAtTimeMs: 3e12, - } as FeatureInfo) + }) as FeatureInfo ), }; config.enabledProFeatures = res.proFeatures; await saveUpdatedConfigFunc?.(); return res; + // biome-ignore lint/correctness/noUnreachable: original upstream flow kept for reference (the fake-license shortcut above is intentional) const access = await getAccessToken(config, saveUpdatedConfigFunc); const resp1 = await fetch(`${site}/api/v1/pro/list`, { diff --git a/pro/src/fsGoogleDrive.ts b/pro/src/fsGoogleDrive.ts index 227da10..7e8ba6d 100644 --- a/pro/src/fsGoogleDrive.ts +++ b/pro/src/fsGoogleDrive.ts @@ -358,7 +358,7 @@ export class FakeFsGoogleDrive extends FakeFs { } while (nextPageToken !== undefined); const allFolderRes = allFileRes.filter( - (i) => i.mimeType == FOLDER_MIME_TYPE + (i) => i.mimeType === FOLDER_MIME_TYPE ); const allFolders = [ @@ -368,7 +368,7 @@ export class FakeFsGoogleDrive extends FakeFs { }, ]; - for (let targetFolder of allFolders) { + for (const targetFolder of allFolders) { allFolderRes .filter((i) => i.parents?.includes(targetFolder.id)) .forEach((i) => { @@ -384,7 +384,7 @@ export class FakeFsGoogleDrive extends FakeFs { for (const file of allFileRes) { if (!file.parents) continue; file.parents.forEach((parent) => { - const folder = allFolders.find((folder) => folder.id == parent); + const folder = allFolders.find((folder) => folder.id === parent); if (!folder) return; const entity = fromFileToGDEntity(file, folder.id, folder.folderPath); allFiles.push(entity); @@ -600,7 +600,7 @@ export class FakeFsGoogleDrive extends FakeFs { modifiedTime: unixTimeToStr(mtime, true), createdTime: unixTimeToStr(ctime, true), }; - if(!targetFileId) meta.parents = [parentID] + if (!targetFileId) meta.parents = [parentID]; if (content.byteLength <= 5 * 1024 * 1024) { const formData = new FormData(); diff --git a/src/misc.ts b/src/misc.ts index 4e21266..428f109 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -90,7 +90,10 @@ export const mkdirpInVault = async (thePath: string, vault: Vault) => { export const bufferToArrayBuffer = ( b: Buffer | Uint8Array | ArrayBufferView ) => { - return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength) as ArrayBuffer; + return b.buffer.slice( + b.byteOffset, + b.byteOffset + b.byteLength + ) as ArrayBuffer; }; /**