Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

2.0 KB
Raw Blame
// ESLint flat config for the whole UI package — not one directory tree.
//
// `next lint` was removed in Next 16, which left `npm run lint` erroring on
// "no such directory: ./lint" with nothing noticing, because CI only ran tsc.
// This config is what `eslint .` reads. It is deliberately package-wide: the
// app (src/**), the nav/config tests (scripts/**) and the root config files
// (next.config.ts, tailwind.config.ts, postcss.config.mjs) are all linted;
// only build output and dependencies are ignored. Narrowing it to src/ would
// recreate the blind spot this fixes.
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

export default defineConfig([
  globalIgnores([
    ".next/**",
    "out/**",
    "node_modules/**",
    "coverage/**",
    // Generated by Next on every build; not ours to lint.
    "next-env.d.ts",
  ]),
  ...nextVitals,
  ...nextTs,
  {
    rules: {
      // 54 effects in 25 files set loading/derived state synchronously —
      // the pattern predates this React-Compiler-era rule (react-hooks v7).
      // Rewriting them is a runtime change, not a lint fix, so new code is
      // warned and the migration is its own change. Everything else in the
      // react-hooks set (refs, purity, use-memo) stays an error.
      "react-hooks/set-state-in-effect": "warn",
      // `{ node: _node, ...props }` and `_unused` parameters are deliberate.
      "@typescript-eslint/no-unused-vars": [
        "warn",
        { argsIgnorePattern: "^_", varsIgnorePattern: "^_", ignoreRestSiblings: true },
      ],
    },
  },
  {
    // The node test runner scripts (`node --test scripts/*.test.mjs`) are
    // plain ESM run outside the browser: node globals, no React rules.
    files: ["scripts/**/*.mjs"],
    languageOptions: { globals: { process: "readonly", console: "readonly" } },
    rules: { "react-hooks/rules-of-hooks": "off" },
  },
]);