Files
TREK/client/scripts/layers-baseline.json
T
Maurice 798553b13b ci(client): lint:layers holds the import direction between src/ trees
Components reach up into pages/ for models and helpers (28 imports in
25 files: the journey detail helpers, the collections, atlas and
dashboard models) and sideways into mobile/ for phone hooks and sheets
(36 in 30 files), and a few stores and a repo import from components/.
Nothing stopped the next one, and every such import ties two trees
together that should move and split independently.

lint:layers reads each source file's imports from its syntax tree
(multi-line imports, re-exports, import() and type imports included,
nothing inside comments or strings) and checks them against a small
rule table: a component imports neither pages/ nor mobile/, a shared
hook no view, nothing under the views (store, repo, sync, api, db,
utils and the other helpers) any view, a repo no store, and the Dexie
schema none of the layers above it. mobile/ and pages/ stay free, since
the phone screens reuse the page hooks by design.

The 80 imports that break a rule today are counted per file in
scripts/layers-baseline.json, and a file may hold no more than its
entry. Type imports count: a type the lower layer needs belongs below
it. Tests are not checked.
2026-10-08 13:04:39 +02:00

66 lines
3.1 KiB
JSON

{
"src/api/client.ts": 1,
"src/components/Atlas/AtlasCountryPlaces.tsx": 1,
"src/components/Budget/ReceiptScanModal.tsx": 1,
"src/components/Collab/CollabLinks.tsx": 1,
"src/components/Collab/CollabNotes.tsx": 1,
"src/components/Collections/AddPlaceToCollectionModal.tsx": 1,
"src/components/Collections/CollectionFilterBar.tsx": 2,
"src/components/Collections/CollectionLabelFilter.tsx": 1,
"src/components/Collections/CollectionMap.tsx": 1,
"src/components/Collections/CollectionPicker.tsx": 1,
"src/components/Collections/CollectionPlaceDetail.tsx": 1,
"src/components/Collections/ListEditorModal.tsx": 1,
"src/components/Collections/MSaveToCollectionSheet.tsx": 3,
"src/components/Collections/StatusBadge.tsx": 1,
"src/components/Dawarich/DawarichAcceptDialog.tsx": 3,
"src/components/Dawarich/DawarichAtlasDialog.tsx": 3,
"src/components/Dawarich/DawarichSuggestionsPanel.tsx": 1,
"src/components/Journey/ContributorInviteDialog.tsx": 1,
"src/components/Journey/JourneyDetailPageAddTripDialog.tsx": 1,
"src/components/Journey/JourneyDetailPageChips.tsx": 1,
"src/components/Journey/JourneyDetailPageEntryCard.tsx": 2,
"src/components/Journey/JourneyDetailPageEntryEditor.tsx": 3,
"src/components/Journey/JourneyDetailPageGalleryView.tsx": 1,
"src/components/Journey/JourneyDetailPageMapView.tsx": 1,
"src/components/Journey/JourneyDetailPagePhotoGrid.tsx": 1,
"src/components/Journey/JourneyDetailPageProviderPicker.tsx": 2,
"src/components/Journey/JourneyDetailPageSettingsDialog.tsx": 1,
"src/components/Journey/JourneyEntryCover.tsx": 2,
"src/components/Journey/MobileEntryView.tsx": 1,
"src/components/Map/MapView.tsx": 1,
"src/components/Map/MapViewGL.tsx": 1,
"src/components/Packing/packingPrintDocument.ts": 1,
"src/components/Packing/usePackingExport.ts": 1,
"src/components/Planner/IcsSubscribeModal.tsx": 1,
"src/components/Planner/TransitJourneyModal.tsx": 1,
"src/components/Planner/TransitSearchPanel.tsx": 1,
"src/components/Planner/TripWarningsBanner.tsx": 1,
"src/components/Planner/bookings/bookingsModel.ts": 2,
"src/components/Planner/transitDisplay.tsx": 1,
"src/components/Plugins/PluginFrame.tsx": 1,
"src/components/Roadtrip/RoadtripSidebarDriveBands.tsx": 1,
"src/components/Roadtrip/RoadtripSidebarRefuelBand.tsx": 1,
"src/components/Studio/StudioShell.tsx": 1,
"src/components/Studio/StudioSidebar.tsx": 1,
"src/components/Studio/TravelElements.tsx": 1,
"src/components/Todo/useTodoList.ts": 1,
"src/components/Trips/TripMembersModal.tsx": 1,
"src/components/shared/ConfirmDialog.tsx": 1,
"src/components/shared/CountryFlag.tsx": 1,
"src/components/shared/EmptyState.tsx": 1,
"src/components/shared/TripLoadingSplash.tsx": 1,
"src/components/shared/dialogFocus.ts": 1,
"src/hooks/useDawarichConnection.ts": 1,
"src/hooks/useDawarichJournalTrail.ts": 1,
"src/hooks/useDawarichSuggestions.ts": 1,
"src/hooks/useDayNotes.ts": 1,
"src/hooks/useRouteCalculation.ts": 4,
"src/hooks/useTransportRoutes.ts": 1,
"src/hooks/useWebPush.ts": 1,
"src/repo/pluginPoiRepo.ts": 1,
"src/store/slices/budgetSlice.ts": 1,
"src/store/studioStore.ts": 2,
"src/store/vacayStore.ts": 1
}