chore(workspace): tsconfig composite refs + axe-linter false-positive config
CI / scan (pull_request) Successful in 2m20s
CI / commits (pull_request) Successful in 2m42s
CI / check (pull_request) Successful in 3m38s
CI / a11y (pull_request) Successful in 1m19s
CI / perf (pull_request) Successful in 5m24s

Three editor-noise sources, three matching tame:

* Add `composite: true` to lib tsconfig.lib.json files (shared/ui,
  shared/state, feature/auth) and let `nx sync` redirect consumer
  references in apps/portal-{shell,admin}/tsconfig.app.json to point
  at the .lib.json directly. Silences TS6306 ("Referenced project
  must have setting composite: true") that the TS service raises on
  the project references our Nx 22 lib generator emits.

* Add `ignoreDeprecations: "5.0"` on apps/portal-bff/tsconfig.{app,
  spec}.json. Both inherit `moduleResolution: node` / `node10` which
  TS 7.0 will remove; the diagnostic itself suggests the opt-out
  knob. The TS 5.9 we run only accepts "5.0" as the value (the
  warning text mentions "6.0" but TS rejects it). Migration to
  nodenext/node16 is a separate chantier — too entangled with Nest
  CJS semantics for a drive-by.

* Add a repo-level .axe-linter.yml that disables the `list` rule
  globally. axe Linter (VS Code) doesn't understand Angular 17+
  `@for` blocks and flags `@for (...) { <li>… }` as a non-<li>
  child of <ul>/<ol>. Compiler erases the syntax at build time;
  axe-playwright (ADR-0016) operates on the rendered DOM and is
  unaffected.
This commit is contained in:
Julien Gautier
2026-05-15 12:05:16 +02:00
parent 636a1661f5
commit 879390f016
8 changed files with 25 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
# Deque axe Linter config — silences false positives the static
# HTML scanner emits against Angular 17+ control-flow blocks
# (`@for`, `@if`, `@switch`) used inline in templates.
#
# The `list` rule (WCAG 1.3.1) flags `@for (item of …) { <li>… }`
# constructs as if the `@for` text were a non-<li> child of <ul>/<ol>.
# At build time, the Angular compiler erases those tokens — the
# rendered DOM only contains <li> children. The axe-playwright suite
# wired into CI per ADR-0016 runs against the rendered DOM, so the
# real accessibility contract is enforced there; this file only
# tames the editor-side noise.
global-disable:
- list
+2 -2
View File
@@ -8,10 +8,10 @@
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"], "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"],
"references": [ "references": [
{ {
"path": "../../libs/shared/ui" "path": "../../libs/shared/ui/tsconfig.lib.json"
}, },
{ {
"path": "../../libs/feature/auth" "path": "../../libs/feature/auth/tsconfig.lib.json"
} }
] ]
} }
+2 -1
View File
@@ -7,7 +7,8 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"target": "es2021", "target": "es2021",
"moduleResolution": "node" "moduleResolution": "node",
"ignoreDeprecations": "5.0"
}, },
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "jest.config.cts", "src/**/*.spec.ts", "src/**/*.test.ts"] "exclude": ["jest.config.ts", "jest.config.cts", "src/**/*.spec.ts", "src/**/*.test.ts"]
+1
View File
@@ -4,6 +4,7 @@
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node10", "moduleResolution": "node10",
"ignoreDeprecations": "5.0",
"types": ["jest", "node"] "types": ["jest", "node"]
}, },
"include": [ "include": [
+3 -3
View File
@@ -8,13 +8,13 @@
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"], "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"],
"references": [ "references": [
{ {
"path": "../../libs/shared/state" "path": "../../libs/shared/state/tsconfig.lib.json"
}, },
{ {
"path": "../../libs/shared/ui" "path": "../../libs/shared/ui/tsconfig.lib.json"
}, },
{ {
"path": "../../libs/feature/auth" "path": "../../libs/feature/auth/tsconfig.lib.json"
} }
] ]
} }
+1
View File
@@ -1,6 +1,7 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"composite": true,
"outDir": "../../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
+1
View File
@@ -1,6 +1,7 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"composite": true,
"outDir": "../../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
+1
View File
@@ -1,6 +1,7 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"composite": true,
"outDir": "../../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,