import { defineConfig, globalIgnores } from "eslint/config"; import js from "@eslint/js"; import tseslint from "typescript-eslint"; // One flat config for the whole monorepo. Run with `npm run lint` at the root. export default defineConfig([ js.configs.recommended, ...tseslint.configs.recommended, { files: ["**/*.cjs", "**/jest.config.js"], languageOptions: { sourceType: "commonjs", globals: { module: "writable", require: "readonly", __dirname: "readonly", process: "readonly", console: "readonly" } }, rules: { "@typescript-eslint/no-require-imports": "off" }, }, { rules: { "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], "@typescript-eslint/consistent-type-imports": "error", }, }, // Cross Events keeps its own lint (frontend/eslint.config.mjs, tsc for the backend) for now. globalIgnores(["**/node_modules/**", "**/dist/**", "**/coverage/**", "**/schemas/**", "apps/events/**"]), ]);