Format & lint

This commit is contained in:
Andras Schmelczer 2026-04-25 17:55:46 +01:00
parent fefac224b0
commit 7f62273e72
179 changed files with 2210 additions and 1319 deletions

View file

@ -231,9 +231,9 @@ export default class VaultLinkPlugin extends Plugin {
}
}
),
this.app.vault.on("create", async (file: TAbstractFile) => {
this.app.vault.on("create", (file: TAbstractFile) => {
if (file instanceof TFile) {
await client.syncLocallyCreatedFile(file.path);
client.syncLocallyCreatedFile(file.path);
}
}),
this.app.vault.on("modify", async (file: TAbstractFile) => {
@ -241,14 +241,14 @@ export default class VaultLinkPlugin extends Plugin {
await this.rateLimitedUpdate(file.path, client);
}
}),
this.app.vault.on("delete", async (file: TAbstractFile) => {
await client.syncLocallyDeletedFile(file.path);
this.app.vault.on("delete", (file: TAbstractFile) => {
client.syncLocallyDeletedFile(file.path);
}),
this.app.vault.on(
"rename",
async (file: TAbstractFile, oldPath: string) => {
(file: TAbstractFile, oldPath: string) => {
if (file instanceof TFile) {
await client.syncLocallyUpdatedFile({
client.syncLocallyUpdatedFile({
oldPath,
relativePath: file.path
});
@ -267,13 +267,11 @@ export default class VaultLinkPlugin extends Plugin {
if (!this.rateLimitedUpdatesPerFile.has(path)) {
this.rateLimitedUpdatesPerFile.set(
path,
rateLimit(
async () =>
{ client.syncLocallyUpdatedFile({
relativePath: path
}); },
MIN_WAIT_BETWEEN_UPDATES_IN_MS
)
rateLimit(async () => {
client.syncLocallyUpdatedFile({
relativePath: path
});
}, MIN_WAIT_BETWEEN_UPDATES_IN_MS)
);
}
await this.rateLimitedUpdatesPerFile.get(path)?.();