- Prettier 3.6.2: .prettierrc.json + .prettierignore + format/format:check scripts; formatted the web/ tree. - ESLint 9 flat config (@eslint/js + typescript-eslint + react-hooks + react-refresh, eslint-config-prettier last so Prettier owns formatting); lint script; src/components/ui/** opts out of react-refresh (shadcn primitives co-export their cva variants). 0 problems. - Playwright 1.61.1: playwright.config.ts (build+preview webServer) + an e2e Board-renders smoke against a mocked /api; test:e2e script. Reusable workflow installs chromium itself. - ci-web.yaml: required-scripts -> format:check,lint,build,test,test:e2e; run-format-check/lint/e2e -> true; e2e-browser chromium. All five scripts verified green locally.
51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
import js from "@eslint/js";
|
|
import globals from "globals";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
import tseslint from "typescript-eslint";
|
|
import prettier from "eslint-config-prettier";
|
|
|
|
// Flat config for the agent-team dashboard SPA (Vite + React + TS). Lints the
|
|
// `src/` tree only; build/test config files are excluded. `eslint-config-prettier`
|
|
// is applied LAST so Prettier owns all formatting (no rule conflicts with
|
|
// `format:check`).
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
"dist",
|
|
"coverage",
|
|
"node_modules",
|
|
"playwright-report",
|
|
"test-results",
|
|
],
|
|
},
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
globals: globals.browser,
|
|
},
|
|
plugins: {
|
|
"react-hooks": reactHooks,
|
|
"react-refresh": reactRefresh,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
"react-refresh/only-export-components": [
|
|
"warn",
|
|
{ allowConstantExport: true },
|
|
],
|
|
},
|
|
},
|
|
{
|
|
// shadcn/ui primitives intentionally co-export their `cva` variants
|
|
// (e.g. `buttonVariants`) alongside the component — the documented pattern;
|
|
// they are static library primitives, not HMR-sensitive app screens.
|
|
files: ["src/components/ui/**/*.{ts,tsx}"],
|
|
rules: {
|
|
"react-refresh/only-export-components": "off",
|
|
},
|
|
},
|
|
prettier,
|
|
);
|