Run lint & fmt

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

View file

@ -268,6 +268,7 @@ export class FileOperations {
let newName = path;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (true) {
currentCount++;
newName = `${directory}${stem} (${currentCount})${extension}`;

View file

@ -39,7 +39,7 @@ export class Settings {
private readonly onSettingsChangeHandlers: ((
newSettings: SyncSettings,
oldSettings: SyncSettings
) => Promise<unknown> | unknown)[] = [];
) => unknown)[] = [];
public constructor(
private readonly logger: Logger,
@ -86,7 +86,9 @@ export class Settings {
public async setSettings(value: Partial<SyncSettings>): Promise<void> {
await this.lock.withLock(async () => {
this.logger.debug(`Updating settings with: ${JSON.stringify(value)}`);
this.logger.debug(
`Updating settings with: ${JSON.stringify(value)}`
);
const oldSettings = this.settings;
this.settings = {
...this.settings,

View file

@ -4,6 +4,8 @@ import assert from "node:assert";
import { WebSocketManager } from "./websocket-manager";
import type { Logger } from "../tracing/logger";
import type { Settings } from "../persistence/settings";
// eslint-disable-next-line @typescript-eslint/no-require-imports
const WebSocket = require("ws") as typeof globalThis.WebSocket;
class MockCloseEvent extends Event {
public code: number;

View file

@ -173,7 +173,7 @@ export class Syncer {
// in that case, we mustn't move it again.
if (
this.database.getLatestDocumentByRelativePath(relativePath) ===
undefined ||
undefined ||
this.database.getLatestDocumentByRelativePath(relativePath)
?.isDeleted === true
) {