From 5a7b8f1dccf202e9968231aa87f2c8e4dfdf3016 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Tue, 9 Jun 2026 14:33:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20oxlint=20=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E7=9A=84=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.ts | 1 - src/core/scanner.ts | 2 +- tests/cli/map-error.test.ts | 8 +------- tests/cli/output.test.ts | 2 +- tests/integration/flow.test.ts | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 index.ts diff --git a/index.ts b/index.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/core/scanner.ts b/src/core/scanner.ts index 713df68..13c8217 100644 --- a/src/core/scanner.ts +++ b/src/core/scanner.ts @@ -29,7 +29,7 @@ export async function scanChanges( const fileName = `${docConfig.name}.md`; const completed = mdFiles.has(fileName); const deps = docConfig.depend ?? []; - const dependMet = deps.length === 0 || deps.every((dep) => mdFiles.has(`${dep}.md`)); + const dependMet = deps.every((dep) => mdFiles.has(`${dep}.md`)); return { name: docConfig.name, completed, dependMet }; }); } else { diff --git a/tests/cli/map-error.test.ts b/tests/cli/map-error.test.ts index 0b3dcad..149a96f 100644 --- a/tests/cli/map-error.test.ts +++ b/tests/cli/map-error.test.ts @@ -1,11 +1,5 @@ import { describe, it, expect } from "bun:test"; -import { - CliError, - UsageError, - ConfigError, - CommandError, - InternalError, -} from "../../src/cli/errors.ts"; +import { UsageError, ConfigError, InternalError } from "../../src/cli/errors.ts"; import { mapError } from "../../src/cli.ts"; describe("mapError", () => { diff --git a/tests/cli/output.test.ts b/tests/cli/output.test.ts index b5996e1..6a43fa9 100644 --- a/tests/cli/output.test.ts +++ b/tests/cli/output.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from "bun:test"; import { formatError } from "../../src/cli/output.ts"; -import { UsageError, ConfigError, CommandError, InternalError } from "../../src/cli/errors.ts"; +import { UsageError, ConfigError, InternalError } from "../../src/cli/errors.ts"; describe("formatError", () => { it("只输出错误行(无 hint/usage)", () => { diff --git a/tests/integration/flow.test.ts b/tests/integration/flow.test.ts index 79a9f20..167d288 100644 --- a/tests/integration/flow.test.ts +++ b/tests/integration/flow.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import { existsSync } from "node:fs"; -import { mkdir, writeFile, rm, readFile, rename } from "node:fs/promises"; +import { mkdir, writeFile, rm, rename } from "node:fs/promises"; import { join } from "node:path"; import { runInit } from "../../src/commands/init.ts"; import { loadConfig, getChangeDir, getArchiveDir } from "../../src/core/config.ts";