Run lint & fmt

This commit is contained in:
Andras Schmelczer 2025-11-30 14:52:20 +00:00
commit 9349afc00f
7 changed files with 74 additions and 48 deletions

View file

@ -43,12 +43,14 @@ export default class VaultLinkPlugin extends Plugin {
public async onload(): Promise<void> {
this.app.workspace.onLayoutReady(async () => {
// eslint-disable-next-line
if ((globalThis as any).VAULT_LINK_RUNNING_INSTANCE) {
new Notice(
"Another instance of VaultLink is already running. Please disable the duplicate instance."
);
throw new Error("VaultLink instance already running");
}
// eslint-disable-next-line
(globalThis as any).VAULT_LINK_RUNNING_INSTANCE = this;
const client = await this.createSyncClient();
@ -199,6 +201,7 @@ export default class VaultLinkPlugin extends Plugin {
});
this.register(() => {
// eslint-disable-next-line
(globalThis as any).VAULT_LINK_RUNNING_INSTANCE = null;
});
}