Run lint & fmt
This commit is contained in:
parent
c7c96b787a
commit
9349afc00f
7 changed files with 73 additions and 47 deletions
|
|
@ -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}`;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue