Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7f73875
chore(deps): update eslint monorepo to v10
guillaumejparis Oct 14, 2026
da4d841
fix(front): pin the React version for eslint-plugin-react on ESLint 10
guillaumejparis Oct 14, 2026
5d28599
fix(front): drop dead initial assignments flagged by no-useless-assig…
guillaumejparis Oct 13, 2026
0a64c85
test(front): use flat config in the classes-rule RuleTester
guillaumejparis Oct 13, 2026
9347969
chore(front): check module dependencies with dependency-cruiser
guillaumejparis Oct 14, 2026
4364210
chore(front): check declared dependencies with knip
guillaumejparis Oct 14, 2026
9b1699b
ci(front): run the custom ESLint rule tests
guillaumejparis Oct 14, 2026
6073170
chore(front): remove eslint-plugin-import
guillaumejparis Oct 14, 2026
d3034ef
chore(front): report unused eslint-disable directives
guillaumejparis Oct 14, 2026
177f530
Merge branch 'main' into renovate/major-eslint-monorepo
guillaumejparis Oct 14, 2026
66e14e3
chore(renovate): keep the React version pinned for eslint-plugin-reac…
guillaumejparis Oct 14, 2026
625c308
Merge remote-tracking branch 'origin/renovate/major-eslint-monorepo' …
guillaumejparis Oct 14, 2026
9b7a41a
Merge remote-tracking branch 'origin/main' into chore/front-dependenc…
guillaumejparis Oct 15, 2026
8344549
refactor(front): remove unused makeStyles classes
guillaumejparis Oct 15, 2026
64e0e74
refactor(front): rewrite the custom ESLint rules in TypeScript
guillaumejparis Oct 15, 2026
b7c66b3
chore(front): remove the legacy esbuild builder
guillaumejparis Oct 15, 2026
bd9dfad
chore(front): write the dependency-cruiser config in TypeScript
guillaumejparis Oct 15, 2026
6ae2787
fix(front): make classes-rule safe to run on save
guillaumejparis Oct 15, 2026
ec73d01
chore(front): explain a too old Node before loading TypeScript tooling
guillaumejparis Oct 15, 2026
b47097e
chore(front): lint and type-check the tooling sources
guillaumejparis Oct 15, 2026
64d950a
chore(front): refresh the ESLint cache when a local rule changes
guillaumejparis Oct 15, 2026
54dca77
chore(renovate): follow the front tooling changes
guillaumejparis Oct 15, 2026
f712c90
docs: document the front tooling checks
guillaumejparis Oct 15, 2026
634c910
Merge branch 'main' into chore/front-dependency-cruiser
guillaumejparis Oct 15, 2026
6f49ee8
chore(front): rely on the default report of unused disable directives
guillaumejparis Oct 15, 2026
b443c73
Merge remote-tracking branch 'origin/main' into chore/front-dependenc…
guillaumejparis Oct 15, 2026
0afa307
Merge remote-tracking branch 'origin/main' into chore/front-dependenc…
guillaumejparis Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/review-code/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If build fails: stop review, report build failure.

For frontend changes:
```bash
cd openaev-front && yarn check-ts && yarn lint
cd openaev-front && yarn check-ts && yarn lint && yarn depcruise && yarn knip --dependencies
```

## Step 4 — Review architecture alignment
Expand Down
16 changes: 15 additions & 1 deletion .github/actions/frontend-quality/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Frontend Quality & Unit Tests
description: >
Run TypeScript checks, ESLint, i18n validation, and Vitest unit tests.
Run TypeScript checks, ESLint, dependency-cruiser, knip, i18n validation, and Vitest unit tests.
Uploads coverage report as an artifact.

inputs:
Expand Down Expand Up @@ -28,6 +28,20 @@ runs:
run: yarn lint
shell: bash
working-directory: openaev-front
- name: Test custom ESLint rules
run: yarn test:eslint-rules
shell: bash
working-directory: openaev-front
- name: Check module dependencies
run: yarn depcruise
shell: bash
working-directory: openaev-front
- name: Check declared dependencies
# --dependencies only: the wider knip report (unused files and exports) still has a
# large pre-existing backlog, so only declaration drift is enforced.
run: yarn knip --dependencies
shell: bash
working-directory: openaev-front
- name: Check i18n translations
run: yarn i18n-checker
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/agents/frontend-reviewer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ These thresholds trigger automatic severity levels regardless of subjective asse
| **Hardcoded tokens** | Colors, spacing, border-radius, or typography not from `theme.*` or a design-system token (fixed `width` exempt) | 🟡 MEDIUM |
| **Dead props** | Props declared in `interface Props` but never passed by any call-site in the codebase | 🟡 MEDIUM |
| **`@ts-ignore`** | Any `@ts-ignore` without an explanatory comment | 🟡 MEDIUM |
| **Mutable export** | `export let` / `export var` instead of a `const` or a getter/setter function; lint enforces it (`custom-rules/no-mutable-exports`), so flag a new `eslint-disable` of that rule | 🟡 MEDIUM |
| **Main component export** | A module's main component exported only by name (helpers, constants and hooks modules may use named exports) | 🟢 LOW |
| **Button convention** | Affirmative confirm not `priority="primary"`, Cancel not `priority="secondary"`, or irreversible delete confirm not `variant="destructive"` (per `frontend.instructions.md`) | 🟡 MEDIUM |
| **Props count** | Component with >8 props → suggest decomposition or context | 🟢 LOW |

Expand Down
2 changes: 1 addition & 1 deletion .github/ci-pipeline-schema.d2
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pba: "📦 Prepare Bundled Assets\ntimeout 10 min · JFrog agents + implants\nca
quality: "STATIC QUALITY" {
class: lane
sc: "🔍 Spotless Check\ntimeout 10 min · Java format" {class: quality}
fq: "🧪 Frontend Quality & Unit Tests\ntimeout 20 min · ESLint + Vitest" {class: quality}
fq: "🧪 Frontend Quality & Unit Tests\ntimeout 20 min · ESLint + dependency-cruiser + knip + Vitest" {class: quality}
bom: "🔎 BOM Override Guard\ntimeout 15 min · Spring Boot BOM overrides\nadvisory in the Gate" {class: quality}
}

Expand Down
2 changes: 1 addition & 1 deletion .github/ci-pipeline-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The minutes column is each job's `timeout-minutes` ceiling, not its runtime.
| 🎨 **Frontend Build** | 15 min | Yarn build of `openaev-front` |
| 📦 **Prepare Bundled Assets** | 10 min | Agent/implant binaries from JFrog, patches `catalog-integrators.json`, uploads `release-assets` |
| 🔍 **Spotless Check** | 10 min | Java formatting |
| 🧪 **Frontend Quality & Unit Tests** | 20 min | ESLint + Vitest + coverage |
| 🧪 **Frontend Quality & Unit Tests** | 20 min | ESLint + dependency-cruiser + knip + Vitest + coverage |
| 🐳 **Docker Build** ×4 | 25 min | `standard`/`ubi9` × `amd64`/`arm64`, native runners, no QEMU. `fail-fast: false` |
| 🐳 **Merge Platforms** ×2 | 45 min | Multi-arch OCI index per variant, with artifact fallback when the registry is unavailable |
| 🔒 **Container Vulnerability Scan** | 25 min | CVE scan of both amd64 images, threshold `high` |
Expand Down
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The minimum Node.js version is specified in `openaev-front/package.json` (`engin
### Linting & Formatting

**Backend**: `mvn spotless:check` / `mvn spotless:apply` (Google Java Format)
**Frontend**: `yarn lint` (~60s), `yarn check-ts`, `yarn i18n-checker`
**Frontend**: `yarn lint` (~60s), `yarn check-ts`, `yarn depcruise` (import cycles, dependency rules), `yarn knip --dependencies` (unused or undeclared dependencies), `yarn i18n-checker`, `yarn test:eslint-rules` (when changing `packages/eslint-plugin-custom-rules`)
**Known Issue**: Pre-existing Spotless errors in `DetectionRemediationApiTest.java` and `InjectExpectationUtils.java` -
ignore unless your changes touch these.

Expand All @@ -56,7 +56,7 @@ ignore unless your changes touch these.
CI runs on GitHub Actions (see `.github/workflows/`):

1. **API Tests**: `mvn spotless:check`, `mvn clean install -DskipTests`, tests, `mvn jacoco:check`
2. **Frontend Tests**: `yarn install/build/check-ts/lint/i18n-checker/test`
2. **Frontend Tests**: `yarn install/build/check-ts/lint/test:eslint-rules/depcruise/knip/i18n-checker/test`
3. **E2E Tests**: Full app test with Playwright
4. **Type Check**: `yarn generate-types-from-api` verification

Expand Down Expand Up @@ -89,7 +89,7 @@ Before creating a pull request, validate locally:
1. **Formatting**: `mvn spotless:check` (or via Docker: `docker run --rm -v $(pwd):/app -w /app maven:3.9-eclipse-temurin-21-noble mvn spotless:check`)
2. **PR title**: Must match `type(scope?): description (#issue)` — no `[context]` prefix. The `openaev-pr-checks` GitHub App validates this pattern; titles with extra prefixes (e.g. `[backend]`) will be rejected.
3. **Compile**: `mvn compile -DskipTests` (or via Docker)
4. **Frontend** (if changed): `cd openaev-front && yarn check-ts && yarn lint`
4. **Frontend** (if changed): `cd openaev-front && yarn check-ts && yarn lint && yarn depcruise && yarn knip --dependencies`
5. **PR description**: Must follow [`.github/PULL_REQUEST_TEMPLATE.md`](/.github/PULL_REQUEST_TEMPLATE.md) — see [PR description format](#pr-description-format).

## Code Conventions
Expand Down
2 changes: 2 additions & 0 deletions .github/instructions/frontend.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ description: "Frontend React/TypeScript conventions: components, Filigran Design
- TypeScript strict mode, annotate API responses with generated types
- No `any` types, no `@ts-ignore` without explanatory comment
- Props defined via explicit `interface Props` (not inline)
- Prefer a default export for a module's main component; helpers, constants and hooks modules may use named exports
- Never export a mutable binding (`export let` / `export var`): export a `const`, or a getter/setter function (enforced by `custom-rules/no-mutable-exports`)

## Design System & Layout

Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ mvn spotless:apply # Format Java
mvn test # Tests (needs Docker services)
cd openaev-front && yarn build # Build frontend
yarn lint && yarn check-ts # Lint + type-check
yarn depcruise # Import cycles + dependency rules
yarn knip --dependencies # Unused or undeclared dependencies
yarn test:eslint-rules # Tests of the local ESLint rules (packages/eslint-plugin-custom-rules)
yarn generate-types-from-api # Sync API types
```

Expand Down
3 changes: 3 additions & 0 deletions docs/docs/development/platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ mvn jacoco:check # Verify coverage thresholds
cd openaev-front
yarn lint # ESLint (must pass with 0 warnings)
yarn check-ts # TypeScript type checking
yarn depcruise # Import cycles and dependency rules (dependency-cruiser)
yarn knip --dependencies # Unused or undeclared dependencies (knip)
yarn test:eslint-rules # Tests of the local ESLint rules (packages/eslint-plugin-custom-rules)
yarn test # Unit tests (Vitest)
yarn test:e2e # E2E tests (Playwright, requires running application)
```
Expand Down
32 changes: 32 additions & 0 deletions openaev-front/.dependency-cruiser-known-violations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"type": "cycle",
"from": "src/admin/components/common/form/TextFieldAskAI.tsx",
"to": "src/components/fields/SimpleRichTextField.jsx",
"unresolvedTo": "../../../../components/fields/SimpleRichTextField",
"dependencyTypes": [
"local",
"import"
],
"rule": {
"severity": "error",
"name": "no-circular"
},
"cycle": [
{
"name": "src/components/fields/SimpleRichTextField.jsx",
"dependencyTypes": [
"local",
"import"
]
},
{
"name": "src/admin/components/common/form/TextFieldAskAI.tsx",
"dependencyTypes": [
"local",
"import"
]
}
]
}
]
97 changes: 97 additions & 0 deletions openaev-front/.dependency-cruiser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Module graph checks: import cycles, dependencies missing from package.json or
// imported from the wrong place, and production code reaching into tests.
// Run with `yarn depcruise`. Pre-existing violations are listed in
// .dependency-cruiser-known-violations.json and ignored; once one is fixed, drop it from that
// file with `yarn depcruise --baseline --baseline-mode shrink-only`.

import type { IConfiguration } from 'dependency-cruiser';

// Files allowed to import devDependencies: unit tests, e2e tests and tooling.
const DEV_FILES = [
'\\.(test|spec)\\.(js|jsx|ts|tsx)$',
'^src/__tests__/',
'^tests_e2e/',
'^vite\\.config\\.ts$',
'^vitest\\.config\\.ts$',
'^playwright\\.config\\.ts$',
'^eslint\\.config\\.js$',
'^knip\\.ts$',
'^\\.dependency-cruiser\\.ts$',
'^scripts/',
];

const TEST_FILES = [
'\\.(test|spec)\\.(js|jsx|ts|tsx)$',
'^src/__tests__/',
'^tests_e2e/',
];

export default {
forbidden: [
{
name: 'no-circular',
severity: 'error',
comment: 'Import cycles make module initialisation order fragile. Move the shared code into a module both sides import.',
from: {},
to: { circular: true },
},
{
name: 'not-to-dev-dep',
severity: 'error',
comment: 'Production code must not import devDependencies: they are not part of the shipped bundle\'s dependency contract. Move the package to dependencies, or import it from a test or tooling file only.',
from: { pathNot: DEV_FILES },
to: { dependencyTypes: ['npm-dev'] },
},
{
name: 'no-non-package-json',
severity: 'error',
comment: 'This package is not declared in package.json: it only resolves because another dependency installs it. Add it to package.json.',
from: {},
to: { dependencyTypes: ['npm-no-pkg', 'npm-unknown'] },
},
{
name: 'not-to-unresolvable',
severity: 'error',
comment: 'This import does not resolve to a file or package on disk.',
from: {},
to: { couldNotResolve: true },
},
{
name: 'not-to-test',
severity: 'error',
comment: 'Production code must not import unit or e2e test code.',
from: {
path: '^src/',
pathNot: TEST_FILES,
},
to: { path: TEST_FILES },
},
],
options: {
doNotFollow: { path: ['node_modules'] },
exclude: {
path: [
'__generated__',
'^src/static/ext/',
'^coverage/',
'^playwright-report/',
'^test-results/',
],
},
moduleSystems: ['es6', 'cjs'],
// resolve imports the way tsc does
tsConfig: { fileName: 'tsconfig.json' },
// analyse the transpiled code: type-only imports and specifiers are erased, so the
// rules only see imports that exist at runtime
tsPreCompilationDeps: false,
enhancedResolveOptions: {
// same lookup order as vite.config.ts, plus declaration files
extensions: ['.tsx', '.ts', '.jsx', '.js', '.json', '.d.ts'],
// honour package.json "exports" so ESM-only packages resolve
exportsFields: ['exports'],
conditionNames: ['import', 'require', 'node', 'browser', 'module', 'types', 'default'],
mainFields: ['module', 'main', 'types', 'typings'],
},
skipAnalysisNotInRules: true,
},
} satisfies IConfiguration;
1 change: 0 additions & 1 deletion openaev-front/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ node_modules
/coverage

# production
/builder/dev/build
/builder/prod/build
/build

Expand Down
Loading