Files
probo/eslint.config.mjs
Émile Ré c9cc46d359 Migrate compliance-portal to the global ESLint config
The compliance-portal app still carried the per-workspace ESLint
scaffold that the rest of the monorepo dropped when linting was
centralized into the root eslint.config.mjs. It defined its own
local config, lint script, and lint-only devDeps, and was not
covered by the root lint script, so it was never linted.

Remove the local eslint.config.mjs, the lint script, and the
eslint/@probo/eslint-config devDeps, then add the app to the root
appDirs so the shared ts, react, and relay rule sets apply to it.

Replace the explicit per-directory list in the root lint script
with a bare `eslint .`, which the root config was already designed
for via its globalIgnores. Ignore pkg/** so the vendored minified
JS under the Go tree is not linted.

Signed-off-by: Émile Ré <emile@probo.com>
2026-06-26 18:52:04 +02:00

68 lines
2.0 KiB
JavaScript

import { configs } from "@probo/eslint-config";
import { defineConfig, globalIgnores } from "eslint/config";
// Workspaces that are linted by this root config. Each gets the shared rule
// sets below; everything else is ignored so a bare `eslint .` keeps the same
// scope as the previous per-workspace configs.
const appDirs = ["apps/console/**", "apps/trust/**", "apps/compliance-portal/**"];
const reactDirs = [...appDirs, "packages/ui/**"];
const lintedDirs = [...reactDirs, "packages/eslint-config/**"];
export default defineConfig([
// Keep `configs.base` global so its `globalIgnores` (dist, __generated__,
// *.d.ts, ...) stay global rather than being scoped by a wrapping `files`.
configs.base,
globalIgnores([
"examples/**",
"pkg/**",
"packages/coredata/**",
"packages/cookie-banner/**",
"packages/emails/**",
"packages/eslint-relay-plugin-types/**",
"packages/helpers/**",
"packages/hooks/**",
"packages/i18n/**",
"packages/n8n-node/**",
"packages/prosemirror/**",
"packages/react-lazy/**",
"packages/relay/**",
"packages/routes/**",
"packages/tsconfig/**",
]),
{
files: lintedDirs,
extends: [configs.ts, configs.imports, configs.stylistic],
// Linting runs from the repo root, so pin the project service root and let
// it resolve each file to its nearest package tsconfig.json.
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: reactDirs,
extends: [configs.react],
},
{
files: appDirs,
extends: [configs.relay],
},
{
files: reactDirs,
ignores: ["packages/ui/tailwind.config.js"],
extends: [configs.languageOptions.browser],
},
{
files: ["packages/eslint-config/**"],
extends: [configs.languageOptions.node],
},
{
files: ["packages/ui/tailwind.config.js"],
extends: [configs.languageOptions.node],
languageOptions: {
sourceType: "commonjs",
},
},
]);