chore: finish frontend ESLint migration #18
Enable every plugin recommended preset and replace Biome with ESLint formatting. Preserve API contracts and JSX whitespace; verify source, tests, builds and tooling.
This commit is contained in:
+21
-21
@@ -1,6 +1,6 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { playwright } from "@vitest/browser-playwright";
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { configDefaults, defineConfig } from "vitest/config";
|
||||
|
||||
const CI_TEST_TIMEOUT_MS = 15_000;
|
||||
@@ -10,61 +10,61 @@ const LAYOUT_WIDE_WIDTH = 1280;
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } },
|
||||
resolve: { alias: { "@": fileURLToPath(new URL("src", import.meta.url)) } },
|
||||
test: {
|
||||
// CI runs the UI scenarios with coverage on a slower runner.
|
||||
testTimeout: process.env.CI ? CI_TEST_TIMEOUT_MS : undefined,
|
||||
coverage: {
|
||||
exclude: ["src/test/**", "**/*.test.{ts,tsx}", "**/*.stories.tsx"],
|
||||
include: ["src/**/*.{ts,tsx}", "packages/*/src/**/*.{ts,tsx}"],
|
||||
reporter: ["text", "html", "lcov"],
|
||||
thresholds: {
|
||||
branches: 75,
|
||||
functions: 75,
|
||||
lines: 83,
|
||||
statements: 82,
|
||||
},
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
extends: true,
|
||||
test: {
|
||||
name: "unit",
|
||||
environment: "jsdom",
|
||||
exclude: [...configDefaults.exclude, "**/*.browser.test.tsx"],
|
||||
name: "unit",
|
||||
setupFiles: "./src/test/setup.ts",
|
||||
},
|
||||
},
|
||||
{
|
||||
extends: true,
|
||||
test: {
|
||||
name: "browser",
|
||||
include: ["src/**/*.browser.test.tsx"],
|
||||
browser: {
|
||||
enabled: true,
|
||||
provider: playwright(),
|
||||
headless: true,
|
||||
instances: [
|
||||
{
|
||||
browser: "chromium",
|
||||
name: "browser-narrow",
|
||||
viewport: {
|
||||
width: LAYOUT_NARROW_WIDTH,
|
||||
height: LAYOUT_VIEWPORT_HEIGHT,
|
||||
width: LAYOUT_NARROW_WIDTH,
|
||||
},
|
||||
},
|
||||
{
|
||||
browser: "chromium",
|
||||
name: "browser-wide",
|
||||
viewport: {
|
||||
width: LAYOUT_WIDE_WIDTH,
|
||||
height: LAYOUT_VIEWPORT_HEIGHT,
|
||||
width: LAYOUT_WIDE_WIDTH,
|
||||
},
|
||||
},
|
||||
],
|
||||
provider: playwright(),
|
||||
},
|
||||
include: ["src/**/*.browser.test.tsx"],
|
||||
name: "browser",
|
||||
},
|
||||
},
|
||||
],
|
||||
coverage: {
|
||||
include: ["src/**/*.{ts,tsx}", "packages/*/src/**/*.{ts,tsx}"],
|
||||
exclude: ["src/test/**", "**/*.test.{ts,tsx}", "**/*.stories.tsx"],
|
||||
reporter: ["text", "html", "lcov"],
|
||||
thresholds: {
|
||||
statements: 82,
|
||||
branches: 75,
|
||||
functions: 75,
|
||||
lines: 83,
|
||||
},
|
||||
},
|
||||
// CI runs the UI scenarios with coverage on a slower runner.
|
||||
testTimeout: process.env.CI ? CI_TEST_TIMEOUT_MS : undefined,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user