Address following rules

- @typescript-eslint/no-redundant-type-constituents
- @typescript-eslint/no-unnecessary-type-assertion
This commit is contained in:
vorotamoroz
2026-06-01 03:37:55 +01:00
parent b887269fc1
commit f710f03380
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ export const _requestToCouchDBFetch = async (
username: string, username: string,
password: string, password: string,
path?: string, path?: string,
body?: string | any, body?: any,
method?: string method?: string
) => { ) => {
const utf8str = String.fromCharCode.apply(null, [...writeString(`${username}:${password}`)]); const utf8str = String.fromCharCode.apply(null, [...writeString(`${username}:${password}`)]);
@@ -1500,7 +1500,7 @@ Offline Changed files: ${files.length}`;
} }
async storeInternalFileToDatabase(file: InternalFileInfo | UXFileInfo, forceWrite = false) { async storeInternalFileToDatabase(file: InternalFileInfo | UXFileInfo, forceWrite = false) {
const storeFilePath = stripAllPrefixes(file.path as FilePath); const storeFilePath = stripAllPrefixes(file.path);
const storageFilePath = file.path; const storageFilePath = file.path;
if (await this.services.vault.isIgnoredByIgnoreFile(storageFilePath)) { if (await this.services.vault.isIgnoredByIgnoreFile(storageFilePath)) {
return undefined; return undefined;
@@ -391,7 +391,7 @@ Note: **Make sure to synchronise all devices before deletion.**
.map((revInfo) => db.get(doc._id, { rev: revInfo.rev })) .map((revInfo) => db.get(doc._id, { rev: revInfo.rev }))
).then((docs) => docs.filter((doc) => doc)); ).then((docs) => docs.filter((doc) => doc));
for (const oldDoc of oldDocs) { for (const oldDoc of oldDocs) {
await processDoc(oldDoc as EntryDoc, false); await processDoc(oldDoc, false);
} }
} }
} catch (ex) { } catch (ex) {
@@ -560,7 +560,7 @@ Success: ${successCount}, Errored: ${errored}`;
}); });
docMap.set(id, set); docMap.set(id, set);
} else if (doc.type === EntryTypes.CHUNK) { } else if (doc.type === EntryTypes.CHUNK) {
const id = doc._id as DocumentID; const id = doc._id;
if (chunkMap.has(id)) { if (chunkMap.has(id)) {
return; return;
} }
@@ -929,7 +929,7 @@ This may indicate that some devices have not completed synchronisation, which co
usedChunks.add(chunkId); usedChunks.add(chunkId);
} }
} else if (doc.type === EntryTypes.CHUNK) { } else if (doc.type === EntryTypes.CHUNK) {
allChunks.set(doc._id as DocumentID, doc._rev); allChunks.set(doc._id, doc._rev);
} }
} }
this._notice( this._notice(
+1 -1
Submodule src/lib updated: faf5c55fd7...744d9bf5dd