fix(ci): prepare plugin sdk dts before lint

This commit is contained in:
Vincent Koc
2026-04-16 13:50:23 -07:00
parent f835da1667
commit c9103c2e47
2 changed files with 93 additions and 22 deletions

View File

@@ -0,0 +1,17 @@
import { describe, expect, it } from "vitest";
import { shouldPrepareExtensionPackageBoundaryArtifacts } from "../../scripts/run-oxlint.mjs";
describe("run-oxlint", () => {
it("prepares extension package boundary artifacts for normal lint runs", () => {
expect(shouldPrepareExtensionPackageBoundaryArtifacts([])).toBe(true);
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["src/index.ts"])).toBe(true);
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--type-aware"])).toBe(true);
});
it("skips artifact preparation for metadata-only oxlint commands", () => {
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--help"])).toBe(false);
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--version"])).toBe(false);
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--print-config"])).toBe(false);
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--rules"])).toBe(false);
});
});