WS-3 sessie 1c: enable eslint-plugin-boundaries in apps/app/ #1
Reference in New Issue
Block a user
Delete Branch "ws3-session-1c-boundaries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Workstream WS-3, sessie 1c uit de architectuur consolidatie sprint
(
/dev-docs/ARCH-CONSOLIDATION-2026-04.md). Introduceert architecturaleimport-boundaries in
apps/app/viaeslint-plugin-boundaries.Scope
apps/app/only.apps/portal/blijft buiten scope tot WS-3 PR-B(na WS-6 sessie 2 merge).
Commits
403be99—docs(ws3): add session 1c audit report (boundaries plugin)Phase A read-only audit →
dev-docs/WS-3-SESSION-1C-AUDIT.mdmet zone-inventaris,voorgestelde matrix, forward-compat check vs §4.2.
af1c549—chore(deps): add eslint-plugin-boundaries to apps/appeslint-plugin-boundaries@6.0.2als directe devDep (TECH-PORTAL-ESLINT-DEPS lesson).de71d31—chore(tooling): enable eslint-plugin-boundaries in apps/appLayered-architecture matrix actief in
apps/app/.eslintrc.cjs.fe3a2e1—chore(apps/app): mark lib/axios store imports for deferred refactor4
lib → storesviolations inlib/axios.tsmet per-line disables + TODO referencesnaar nieuw backlog item.
9cccbe0—docs(ws3): record session 1c completion (boundaries enforcement)ARCH-CONSOLIDATION-2026-04.md, CLAUDE.md, BACKLOG.md.
Architecturele beslissingen (Phase B)
lib → stores): matrix blijft strict; 4 sites inlib/axios.tsgemarkeerd voordeferred structural decoupling (TECH-AXIOS-STORE-COUPLING). Optie A (rule loosening)
afgewezen — permanente escape hatch. Optie B-extract (refactor nu) afgewezen —
scope-creep richting architectuurwerk binnen een tooling-sessie.
views/): dood Vuexy-bestand toegevoegd aanboundaries/ignore; fysiekeverwijdering als TECH-DELETE-DEAD-VIEWS.
navigation): mag importeren uittypes,utils(forward-headroom).components/{organizer,portal,shared}enforcement uitgesteldtot WS-3 PR-B; TECH-WS3-BOUNDARIES-SUBZONES.
Acceptance
pnpm lint0 problems inapps/app/pnpm buildsucceedspnpm test49 passed (geen regressie)apps/portal/,api/,packages/,docs/Co-Authored-By: Claudeop alle commitsFollow-up backlog items
TECH-AXIOS-STORE-COUPLINGlib/raakt, of dedicated sessie na WS-6TECH-DELETE-DEAD-VIEWSTECH-WS3-BOUNDARIES-SUBZONESTECH-WS3-BOUNDARIES-ROUTER-ZONEplugins/1.router/→router/verhuizing landtTECH-BOUNDARIES-V6-SELECTOR-MIGRATIONMerge
--no-ff(web UI: kies "Create merge commit") per CLAUDE.md commit hygiene.Adds 'boundaries' to plugins, the layered-architecture matrix to rules, and the boundaries/elements + boundaries/ignore + boundaries/ include settings per the WS-3 1c audit (Phase A: dev-docs/WS-3-SESSION-1C-AUDIT.md). Phase B sign-off (Bert): - Q1=B — `lib → stores` is DISALLOWED in the matrix; lib/axios.ts is refactored in the next commit. - Q2 — src/views/** added to boundaries/ignore (dead Vuexy file; TECH-DELETE-DEAD-VIEWS backlog item lands with the docs commit). - Q3 — `navigation` allowed to import `types`, `utils` (forward headroom). - Q4 — sub-zone enforcement deferred to TECH-WS3-BOUNDARIES-SUBZONES (lands when WS-3 PR-B brings the §4.2 components/{organizer,portal, shared} + pages/{(auth),portal,…} structure). Forward-flag carried into the inline comment: when src/plugins/1.router/ migrates to a top-level src/router/ in a later WS-3 PR, add a { type: 'router', pattern: 'src/router/**' } element and a { from: 'router', allow: ['types','utils','lib','plugins','stores'] } rule. Doc-side flag also lands in the ARCH-CONSOLIDATION 1c entry. Boundaries plugin v6 emits a deprecation warning that the 'element-types' selector format is legacy (v5 syntax); the rule still works on v5-compatible config and migrating to v6 object- selector syntax is out of scope per the prompt's "only the two .eslintrc.cjs changes listed are permitted" constraint. Filing a TECH-BOUNDARIES-V6-SELECTOR-MIGRATION backlog item (in the docs commit) so the migration happens deliberately. Lint count after this commit: 4 errors, all in lib/axios.ts (lines 3, 4, 61, 72 — the 2 static + 2 dynamic store imports). The plugin treats both static AND dynamic `await import('@/stores/...')` as boundary edges; this is a deliberate intermediate state. The next commit (refactor) resolves all 4 to land at lint = 0. Tests + typecheck verified green (boundary errors are lint-only). Co-Authored-By: Claude <noreply@anthropic.com>WS-3 session 1c — Phase B Q1=B-revised (Bert's call after the plugin-reality discovery). eslint-plugin-boundaries treats both static `import` and dynamic `await import(...)` as boundary edges. The original Q1=B mechanism ("convert static→dynamic to satisfy the rule") doesn't actually satisfy the rule — all 4 store accesses in lib/axios.ts trip boundaries/element-types: lines 3, 4 (static, pre-1c) and lines 61, 72 (dynamic, from 1b-iii). Three options were on the table; Bert chose B-revised: - A-reversal (allow lib→stores in matrix) was rejected because it permanently loosens the boundary for 4 imports — exactly the silent exception the zero-compromise principle forbids. - B-extract (decouple axios.ts from stores via callback-injection) is real architectural work and deserves a focused session, not the tail-end of a tooling sprint. Filed as TECH-AXIOS-STORE- COUPLING in the next docs commit; the four sites carry per-line TODO references to it. - B-revised (this commit) preserves the strict matrix: boundaries/element-types stays at 'error' globally; the four axios.ts sites are explicit per-line exceptions, not a rule loosening. Future lib/X.ts writers still hit the wall. Behavior unchanged. Only lint visibility changed — 4 disable comments added at: - src/lib/axios.ts:3 (static useNotificationStore import) - src/lib/axios.ts:5 (static useOrganisationStore import; was line 4) - src/lib/axios.ts:63 (dynamic useImpersonationStore await import; was line 61) - src/lib/axios.ts:75 (dynamic useAuthStore await import; was line 72) Each comment is exactly: // eslint-disable-next-line boundaries/element-types -- TECH-AXIOS-STORE-COUPLING: deliberate HTTP↔state seam, refactor scheduled per backlog. Commit verb is `chore` not `refactor` per Bert: the code's behavior doesn't change, only its lint-visibility does. Honest naming. Tests + typecheck + build verified green: - apps/app vitest: 49 passed - apps/app vue-tsc: clean - apps/app pnpm build: succeeded in 11.24s Lint baseline: 4 → 0 errors. WS-3 1c acceptance criterion satisfied. Co-Authored-By: Claude <noreply@anthropic.com>Pull request closed