mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-04 13:32:57 +00:00
Address following rules
- @typescript-eslint/no-redundant-type-constituents - @typescript-eslint/no-unnecessary-type-assertion
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ export const _requestToCouchDBFetch = async (
|
||||
username: string,
|
||||
password: string,
|
||||
path?: string,
|
||||
body?: string | any,
|
||||
body?: any,
|
||||
method?: string
|
||||
) => {
|
||||
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) {
|
||||
const storeFilePath = stripAllPrefixes(file.path as FilePath);
|
||||
const storeFilePath = stripAllPrefixes(file.path);
|
||||
const storageFilePath = file.path;
|
||||
if (await this.services.vault.isIgnoredByIgnoreFile(storageFilePath)) {
|
||||
return undefined;
|
||||
|
||||
@@ -391,7 +391,7 @@ Note: **Make sure to synchronise all devices before deletion.**
|
||||
.map((revInfo) => db.get(doc._id, { rev: revInfo.rev }))
|
||||
).then((docs) => docs.filter((doc) => doc));
|
||||
for (const oldDoc of oldDocs) {
|
||||
await processDoc(oldDoc as EntryDoc, false);
|
||||
await processDoc(oldDoc, false);
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
@@ -560,7 +560,7 @@ Success: ${successCount}, Errored: ${errored}`;
|
||||
});
|
||||
docMap.set(id, set);
|
||||
} else if (doc.type === EntryTypes.CHUNK) {
|
||||
const id = doc._id as DocumentID;
|
||||
const id = doc._id;
|
||||
if (chunkMap.has(id)) {
|
||||
return;
|
||||
}
|
||||
@@ -929,7 +929,7 @@ This may indicate that some devices have not completed synchronisation, which co
|
||||
usedChunks.add(chunkId);
|
||||
}
|
||||
} else if (doc.type === EntryTypes.CHUNK) {
|
||||
allChunks.set(doc._id as DocumentID, doc._rev);
|
||||
allChunks.set(doc._id, doc._rev);
|
||||
}
|
||||
}
|
||||
this._notice(
|
||||
|
||||
+1
-1
Submodule src/lib updated: faf5c55fd7...744d9bf5dd
Reference in New Issue
Block a user