chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -15,16 +15,14 @@ vi.mock("../config/paths.js", () => ({
describe("github-copilot token", () => {
it("derives baseUrl from token", async () => {
const { deriveCopilotApiBaseUrlFromToken } = await import(
"./github-copilot-token.js"
);
const { deriveCopilotApiBaseUrlFromToken } = await import("./github-copilot-token.js");
expect(
deriveCopilotApiBaseUrlFromToken("token;proxy-ep=proxy.example.com;"),
).toBe("https://api.example.com");
expect(
deriveCopilotApiBaseUrlFromToken("token;proxy-ep=https://proxy.foo.bar;"),
).toBe("https://api.foo.bar");
expect(deriveCopilotApiBaseUrlFromToken("token;proxy-ep=proxy.example.com;")).toBe(
"https://api.example.com",
);
expect(deriveCopilotApiBaseUrlFromToken("token;proxy-ep=https://proxy.foo.bar;")).toBe(
"https://api.foo.bar",
);
});
it("uses cache when token is still valid", async () => {
@@ -35,9 +33,7 @@ describe("github-copilot token", () => {
updatedAt: now,
});
const { resolveCopilotApiToken } = await import(
"./github-copilot-token.js"
);
const { resolveCopilotApiToken } = await import("./github-copilot-token.js");
const fetchImpl = vi.fn();
const res = await resolveCopilotApiToken({
@@ -63,9 +59,7 @@ describe("github-copilot token", () => {
}),
});
const { resolveCopilotApiToken } = await import(
"./github-copilot-token.js"
);
const { resolveCopilotApiToken } = await import("./github-copilot-token.js");
const res = await resolveCopilotApiToken({
githubToken: "gh",