From 9d66176f94951704f71cd2ac2562c2bfaf603699 Mon Sep 17 00:00:00 2001 From: Yusen <1274899438@qq.com> Date: Sat, 13 Jun 2026 20:14:48 +0800 Subject: [PATCH] Fix review errors: eslint descriptions, minAppVersion, trashFile args - Add descriptions to eslint-disable comments (-- required by linter) - Bump minAppVersion to 1.4.0 (trashFile and setDisabled require it) - Fix trashFile calls: remove extra boolean argument (only takes file) --- git-operations.ts | 8 ++++---- github-api.ts | 2 +- manifest.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/git-operations.ts b/git-operations.ts index 5f9cccd..780c474 100644 --- a/git-operations.ts +++ b/git-operations.ts @@ -49,7 +49,7 @@ export class GitOperations { */ private run(args: string[]): Promise { return new Promise((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call -- Required to spawn git process, Node.js module not available via ES import const cp = require("child_process") as { spawn: (cmd: string, args: string[], opts: unknown) => ChildProcess }; const child = cp.spawn("git", args, { cwd: this.cwd }); let stdout = ""; @@ -100,9 +100,9 @@ export class GitOperations { */ private cleanStaleLocks(): void { try { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call -- Required to clean stale git lock files, Node.js module not available via ES import const fs = require("fs") as NodeFs; - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call -- Required to construct file paths, Node.js module not available via ES import const path = require("path") as NodePath; const lockFile = path.join(this.cwd, ".git", "config.lock"); if (fs.existsSync(lockFile)) { @@ -226,7 +226,7 @@ export class GitOperations { async deleteConflictFile(vault: Vault): Promise { const file = vault.getAbstractFileByPath(CONFLICT_FILE); if (file) { - await this.app.fileManager.trashFile(file, true); + await this.app.fileManager.trashFile(file); } } diff --git a/github-api.ts b/github-api.ts index 833b6aa..c752054 100644 --- a/github-api.ts +++ b/github-api.ts @@ -178,7 +178,7 @@ export class GitHubApiClient { // 删除本地文件 const existing = vault.getAbstractFileByPath(file.filename); if (existing) { - await this.app.fileManager.trashFile(existing, true); + await this.app.fileManager.trashFile(existing); } count++; } else if ( diff --git a/manifest.json b/manifest.json index 881c442..e25e819 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "moving-note", "name": "Moving Note", "version": "1.0.0", - "minAppVersion": "1.2.0", + "minAppVersion": "1.4.0", "description": "Sync your notes via Git on desktop and GitHub API on mobile. Simple, reliable, cross-device.", "author": "Yusen", "authorUrl": "https://github.com/zhou-yusen",