feat(eslint): add boundaries/dependencies rule preventing cross-domain imports
Adds eslint-plugin-boundaries with one element type per Tier-1 domain and an explicit allow-list encoding the architectural dependency graph: - document may import from: shared, person, tag, ocr, activity, conversation - geschichte may import from: shared, person, document - ocr may import from: shared, document - activity may import from: shared, notification - all others (person, tag, user, notification, conversation): shared only - routes may import from any domain Default is 'disallow', so any unlisted cross-domain import is an error. Two eslint-disable-next-line comments remain in shared/discussion where person-domain helpers (getInitials, formatLifeDateRange) are needed to render participant metadata; moving them to shared would lose the person-type context. Closes #410 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
import type { FlatMessage } from '$lib/shared/types';
|
||||
import { extractQuote } from '$lib/shared/discussion/comment';
|
||||
// eslint-disable-next-line boundaries/dependencies -- discussion UI needs person initials for avatars; move to shared if getInitials becomes generic
|
||||
import { getInitials } from '$lib/person/personFormat';
|
||||
import { relativeTime } from '$lib/shared/utils/time';
|
||||
import { renderBody } from '$lib/shared/discussion/mention';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { components } from '$lib/generated/api';
|
||||
// eslint-disable-next-line boundaries/dependencies -- mention dropdown needs person date formatting; extract to shared if it becomes reusable
|
||||
import { formatLifeDateRange } from '$lib/person/personLifeDates';
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user