Files
TREK/client/scripts/size-baseline.json
T
Maurice 2f54f04380 ci(client): lint:size counts wrapped lines and covers tests and stylesheets
lint:size counted newlines, so a file could stay under its entry by
joining lines, and the trip planner page already carried one JSX element
on a single 3760 character line. A line now counts once per 120
characters it spans, the printWidth in .prettierrc, so formatted code
measures what it shows and packed code measures what it holds.

The check also covered only .ts and .tsx sources. Stylesheets now share
the 1000 line limit, and tests get a limit of their own at 2000: they
mirror the component they cover and carry fixtures, but the largest are
past 5000 lines and growing with the god components.

The baseline is measured again with the new rule and keyed by the path
from client/, since it now spans src/ and tests/. Entries are higher in
number than before because the metric changed, not because a file grew;
every file is held at exactly what it holds today. New entries are the
ten largest tests, index.css and studio.css, the generated
countryShapes.ts (305 lines of 2600 characters each) and
JourneyDetailPageEntryEditor.tsx, which was just under the old count.

The scanning, baseline reading and lowering move to scripts/lib/ so the
next ratchets share them. A baseline that is missing or misshapen, a
directory that is not there and a scan that finds nothing now fail the
run instead of reading as empty, and the command file always runs its
check: there is no entry point guard left that could skip it.
2026-10-08 13:04:39 +02:00

39 lines
1.8 KiB
JSON

{
"src/api/client.ts": 1916,
"src/components/Admin/AdminPluginsPanel.test.tsx": 2704,
"src/components/Admin/AdminPluginsPanel.tsx": 2431,
"src/components/Budget/CostsPanel.test.tsx": 2854,
"src/components/Budget/CostsPanel.tsx": 2366,
"src/components/Journey/JourneyDetailPageEntryEditor.tsx": 1014,
"src/components/Map/MapView.tsx": 1526,
"src/components/Map/MapViewGL.test.tsx": 2920,
"src/components/Map/MapViewGL.tsx": 2607,
"src/components/Map/RouteCalculator.ts": 1196,
"src/components/PDF/TripPDF.tsx": 1097,
"src/components/Planner/DayDetailPanel.test.tsx": 2333,
"src/components/Planner/DayPlanSidebar.test.tsx": 5400,
"src/components/Planner/DayPlanSidebar.tsx": 3319,
"src/components/Planner/PlaceFormModal.test.tsx": 2864,
"src/components/Planner/PlaceFormModal.tsx": 1669,
"src/components/Planner/PlaceInspector.tsx": 1357,
"src/components/Planner/TransportModal.tsx": 1254,
"src/components/Studio/TravelElements.tsx": 1747,
"src/components/Studio/autoLayout.ts": 1691,
"src/components/Studio/bookTemplates.data.ts": 1309,
"src/components/Studio/countryShapes.ts": 2595,
"src/index.css": 1636,
"src/mobile/screens/admin/MAdminPluginsPanel.tsx": 2262,
"src/mobile/screens/journey/MJourneyEntrySheet.tsx": 1122,
"src/mobile/screens/trip/sheets/MTransportFormSheet.tsx": 1194,
"src/mobile/screens/trip/tabs/MCostsTab.tsx": 1095,
"src/mobile/screens/trip/tabs/MPackingListTab.tsx": 1080,
"src/pages/JourneyDetailPage.test.tsx": 4030,
"src/pages/LoginPage.tsx": 1348,
"src/pages/TripPlannerPage.tsx": 1259,
"src/pages/TripPlannerPage.wiring.test.tsx": 2049,
"src/pages/atlas/useAtlas.ts": 1288,
"src/pages/tripPlanner/useTripPlanner.roadtrip.test.tsx": 3531,
"src/pages/tripPlanner/useTripPlanner.test.tsx": 3307,
"src/styles/studio.css": 2087
}