chore: replace eslint with biome (#14263)

This commit is contained in:
Kayla Washburn-Love
2024-08-15 13:26:29 -06:00
committed by GitHub
parent 7b09d98238
commit d15f16fa2e
592 changed files with 4160 additions and 6288 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { randomUUID } from "node:crypto";
import * as http from "node:http";
import { test } from "@playwright/test";
import { randomUUID } from "crypto";
import * as http from "http";
import {
createTemplate,
createWorkspace,
@@ -37,7 +37,7 @@ test("app", async ({ context, page }) => {
token,
apps: [
{
url: "http://localhost:" + addr.port,
url: `http://localhost:${addr.port}`,
displayName: appName,
order: 0,
},
+1 -1
View File
@@ -1,6 +1,6 @@
import type { Page } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { type DeploymentConfig, API } from "api/api";
import { API, type DeploymentConfig } from "api/api";
import {
findConfigOption,
setupApiCalls,
@@ -1,4 +1,4 @@
import { test, expect, type Page } from "@playwright/test";
import { type Page, expect, test } from "@playwright/test";
import { API } from "api/api";
import { setupApiCalls } from "../../api";
import { coderPort, workspaceProxyPort } from "../../constants";
@@ -23,7 +23,7 @@ test("default proxy is online", async ({ page }) => {
const workspaceProxyStatus = workspaceProxyPrimary.locator("td.status span");
await expect(workspaceProxyName).toHaveText("Default");
await expect(workspaceProxyURL).toHaveText("http://localhost:" + coderPort);
await expect(workspaceProxyURL).toHaveText(`http://localhost:${coderPort}`);
await expect(workspaceProxyStatus).toHaveText("Healthy");
});
@@ -50,7 +50,7 @@ test("custom proxy is online", async ({ page }) => {
waitUntil: "domcontentloaded",
});
const workspaceProxy = page.locator(`table.MuiTable-root tr`, {
const workspaceProxy = page.locator("table.MuiTable-root tr", {
hasText: proxyName,
});
@@ -82,7 +82,7 @@ const waitUntilWorkspaceProxyIsHealthy = async (
while (retries < maxRetries) {
await page.reload();
const workspaceProxy = page.locator(`table.MuiTable-root tr`, {
const workspaceProxy = page.locator("table.MuiTable-root tr", {
hasText: proxyName,
});
const workspaceProxyStatus = workspaceProxy.locator("td.status span");
+1 -2
View File
@@ -26,8 +26,7 @@ test.beforeAll(async ({ baseURL }) => {
});
srv.use(gitAuth.authPath, (req, res) => {
res.redirect(
`${baseURL}/external-auth/${gitAuth.webProvider}/callback?code=1234&state=` +
req.query.state,
`${baseURL}/external-auth/${gitAuth.webProvider}/callback?code=1234&state=${req.query.state}`,
);
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import {
createGroup,
createUser,
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { createUser, getCurrentOrgId, setupApiCalls } from "../../api";
import { requiresEnterpriseLicense } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { randomName, requiresEnterpriseLicense } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { createGroup, getCurrentOrgId, setupApiCalls } from "../../api";
import { requiresEnterpriseLicense } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { createGroup, getCurrentOrgId, setupApiCalls } from "../../api";
import { requiresEnterpriseLicense } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { API } from "api/api";
import {
createGroup,
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { setupApiCalls } from "../api";
import { expectUrl } from "../expectUrl";
import { requiresEnterpriseLicense } from "../helpers";
+2 -2
View File
@@ -1,5 +1,5 @@
import { randomUUID } from "node:crypto";
import { test } from "@playwright/test";
import { randomUUID } from "crypto";
import {
createTemplate,
createWorkspace,
@@ -16,7 +16,7 @@ const agentVersion = "v2.12.1";
test.beforeEach(({ page }) => beforeCoderTest(page));
test("ssh with agent " + agentVersion, async ({ page }) => {
test(`ssh with agent ${agentVersion}`, async ({ page }) => {
test.setTimeout(40_000); // This is a slow test, 20s may not be enough on Mac.
const token = randomUUID();
+2 -2
View File
@@ -1,5 +1,5 @@
import { randomUUID } from "node:crypto";
import { test } from "@playwright/test";
import { randomUUID } from "crypto";
import {
createTemplate,
createWorkspace,
@@ -16,7 +16,7 @@ const clientVersion = "v0.27.0";
test.beforeEach(({ page }) => beforeCoderTest(page));
test("ssh with client " + clientVersion, async ({ page }) => {
test(`ssh with client ${clientVersion}`, async ({ page }) => {
const token = randomUUID();
const template = await createTemplate(page, {
apply: [
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { beforeCoderTest } from "../../hooks";
test.beforeEach(({ page }) => beforeCoderTest(page));
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { randomName } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
+1 -1
View File
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { createUser, getCurrentOrgId, setupApiCalls } from "../../api";
import { beforeCoderTest } from "../../hooks";
+1 -1
View File
@@ -1,5 +1,5 @@
import { randomUUID } from "node:crypto";
import { test } from "@playwright/test";
import { randomUUID } from "crypto";
import {
createTemplate,
createWorkspace,
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import { username } from "../../constants";
import {
createTemplate,
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";
import {
StarterTemplates,
createTemplate,
@@ -10,14 +10,14 @@ import {
} from "../../helpers";
import { beforeCoderTest } from "../../hooks";
import {
secondParameter,
fourthParameter,
fifthParameter,
firstParameter,
thirdParameter,
fourthParameter,
randParamName,
secondParameter,
seventhParameter,
sixthParameter,
randParamName,
thirdParameter,
} from "../../parameters";
import type { RichParameter } from "../../provisionerGenerated";
@@ -12,9 +12,9 @@ import { beforeCoderTest } from "../../hooks";
import {
fifthParameter,
firstParameter,
secondBuildOption,
secondParameter,
sixthParameter,
secondBuildOption,
} from "../../parameters";
import type { RichParameter } from "../../provisionerGenerated";