Centralize ESLint into a single root config

Replace the duplicated per-workspace eslint.config.mjs files in
apps/console, apps/trust, packages/ui, and packages/eslint-config with
one root eslint.config.mjs that reuses the shared @probo/eslint-config
rule sets and scopes them per directory. Linting now runs from the repo
root, so pin the type-checked project service root and broaden the
import-x resolver to every workspace tsconfig (the #/* aliases live in
each app's tsconfig.app.json).

Drop the now-redundant per-package lint scripts and lint-only devDeps,
and add a root lint script that runs eslint over the four dirs with
multithreading restored via --concurrency auto, then lints n8n-node
through a direct workspace call. packages/n8n-node keeps its own
external preset.

Collapse the redundant lint-js -> npm-lint Makefile chain into a single
lint-js target and update the make docs accordingly.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-19 16:36:09 +02:00
parent 652be7a984
commit 4d28dab2f4
14 changed files with 339 additions and 927 deletions

View File

@@ -1,15 +0,0 @@
import { defineConfig } from "eslint/config";
import { baseConfigs } from "#baseConfigs";
import { importsConfigs } from "#importsConfigs";
import { nodeLanguageOptionsConfigs } from "#languageOptionsConfigs";
import { stylisticConfigs } from "#stylisticConfigs";
import { tsConfigs } from "#tsConfigs";
export default defineConfig([
...baseConfigs,
...tsConfigs,
...importsConfigs,
...stylisticConfigs,
...nodeLanguageOptionsConfigs,
]);

View File

@@ -19,9 +19,7 @@
"#languageOptionsConfigs": "./src/languageOptionsConfigs.ts",
"#stylisticConfigs": "./src/stylisticConfigs.ts"
},
"scripts": {
"lint": "eslint src"
},
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",

View File

@@ -47,7 +47,12 @@ export const importsConfigs: FlatConfig.ConfigArray = [
settings: {
"import-x/resolver-next": createTypeScriptImportResolver({
alwaysTryTypes: true,
project: "tsconfig.json",
// Linting runs from the repo root, so resolve every workspace's
// tsconfig rather than a single cwd-relative one. The `#/*` path
// aliases live in the per-app `tsconfig.app.json`, so match all
// tsconfig variants, not just the references-only `tsconfig.json`.
project: ["apps/*/tsconfig*.json", "packages/*/tsconfig*.json"],
noWarnOnMultipleProjects: true,
}),
},
},

View File

@@ -1,21 +0,0 @@
import { configs } from "@probo/eslint-config";
import { defineConfig } from "eslint/config";
export default defineConfig([
configs.base,
configs.ts,
configs.imports,
configs.react,
configs.stylistic,
{
extends: [configs.languageOptions.browser],
ignores: ["./tailwind.config.js"],
},
{
extends: [configs.languageOptions.node],
files: ["./tailwind.config.js"],
languageOptions: {
sourceType: "commonjs",
},
},
]);

View File

@@ -6,7 +6,6 @@
"sideEffects": false,
"main": "src/index.ts",
"scripts": {
"lint": "eslint . --concurrency 2",
"dev": "storybook dev -p 6006 --no-open",
"check": "tsc --noEmit -p tsconfig.app.json",
"icons": "bun run src/Atoms/Icons/generator.ts"
@@ -48,7 +47,6 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^5.0.1",
"@probo/eslint-config": "1.0.0",
"@rollup/pluginutils": "^5.1.4",
"@storybook/addon-vitest": "^10.2.8",
"@storybook/react": "^10.2.8",
@@ -60,7 +58,6 @@
"@vitejs/plugin-react": "^6.0.2",
"@vitest/browser": "4.1.8",
"@vitest/coverage-v8": "4.1.8",
"eslint": "^10.5.0",
"playwright": "^1.55.1",
"react": "^19.2.7",
"react-docgen": "^7.1.1",