fix(lint): mode:'file' for the components-foundation Icon.vue bridge

Plan-1 Task-4 added { type:'components-foundation', pattern:
'src/components/Icon.vue' } without mode:'file'. eslint-plugin-boundaries
defaults to folder mode, so the single-file pattern never matched and
Icon.vue fell through to the generic `components` catch-all — breaking
the sanctioned components-v2 -> Icon bridge (RFC AD-G5) for every v2
shell component. Plan-1's boundary test only exercised the forms/**
folder-glob edge so the gap was latent. Adds mode:'file' + a regression
test locking the components-v2 -> Icon.vue edge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 19:23:00 +02:00
parent 3976c0cf0c
commit 4e9eeb99c4
2 changed files with 19 additions and 1 deletions

View File

@@ -306,7 +306,13 @@ module.exports = {
// same `type` so both src/components/forms/** and src/components/Icon.vue
// are captured before the generic `components` catch-all.
{ type: 'components-foundation', pattern: 'src/components/forms/**' },
{ type: 'components-foundation', pattern: 'src/components/Icon.vue' },
// mode:'file' is REQUIRED for a single-file pattern. Without it
// eslint-plugin-boundaries matches in the default 'folder' mode,
// so 'src/components/Icon.vue' never matches and Icon.vue falls
// through to the generic `components` catch-all below — breaking
// the sanctioned components-v2 → Icon bridge (RFC AD-G5). The
// forms/** entry above is a folder glob so it is unaffected.
{ type: 'components-foundation', pattern: 'src/components/Icon.vue', mode: 'file' },
{ type: 'components-v2', pattern: 'src/components-v2/**' },
{ type: 'components', pattern: 'src/components/**' },
{ type: 'layouts', pattern: 'src/layouts/**' },