chore(lint): lower verified client warning counts

Match the three reduced warning counts reported by GitHub CI. Preserve the existing gap above the place image field and align the extracted settings markup.
This commit is contained in:
Maurice
2026-12-04 10:37:13 +01:00
parent 34b9b7b0d0
commit 9599a4d895
3 changed files with 76 additions and 75 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
"@typescript-eslint/no-non-null-assertion": 338,
"@typescript-eslint/no-misused-promises": 750,
"no-console": 81,
"complexity": 214,
"complexity": 213,
"@typescript-eslint/no-explicit-any": 113,
"trek/no-swallowed-catch": 124,
"max-params": 31,
@@ -14,8 +14,8 @@
"react-hooks/exhaustive-deps": 112,
"@typescript-eslint/no-unused-vars": 95,
"react-hooks/immutability": 26,
"max-lines-per-function": 126,
"react-hooks/static-components": 35,
"max-lines-per-function": 125,
"react-hooks/static-components": 34,
"react-hooks/preserve-manual-memoization": 12,
"no-useless-assignment": 7,
"no-empty": 18,
@@ -109,83 +109,83 @@ export default function MJourneySettingsSheet({
switch (area) {
case null:
return (
<nav aria-label={t('journey.settings.title')} className="space-y-4">
{groups.map(({ title, ids }) => (
<FormSheetSection key={title} title={title}>
<div className="divide-y divide-m-rowbr">
{ids.map(id => {
const { label, Icon, count } = areas[id]
return (
<button key={id} type="button" onClick={() => setArea(id)} className="flex min-h-11 w-full items-center gap-3 py-1.5 text-start first:pt-0 last:pb-0">
<span className="grid size-8 flex-none place-items-center rounded-lg bg-m-sheetop text-m-muted" aria-hidden><Icon size={16} /></span>
<span className="min-w-0 flex-1 break-words text-control font-semibold">{label}</span>
{count != null && <span className="text-caption tabular-nums text-m-muted">{count}</span>}
<ChevronRight size={16} className="flex-none text-m-muted rtl:rotate-180" aria-hidden />
</button>
)
})}
</div>
</FormSheetSection>
))}
</nav>
)
<nav aria-label={t('journey.settings.title')} className="space-y-4">
{groups.map(({ title, ids }) => (
<FormSheetSection key={title} title={title}>
<div className="divide-y divide-m-rowbr">
{ids.map(id => {
const { label, Icon, count } = areas[id]
return (
<button key={id} type="button" onClick={() => setArea(id)} className="flex min-h-11 w-full items-center gap-3 py-1.5 text-start first:pt-0 last:pb-0">
<span className="grid size-8 flex-none place-items-center rounded-lg bg-m-sheetop text-m-muted" aria-hidden><Icon size={16} /></span>
<span className="min-w-0 flex-1 break-words text-control font-semibold">{label}</span>
{count != null && <span className="text-caption tabular-nums text-m-muted">{count}</span>}
<ChevronRight size={16} className="flex-none text-m-muted rtl:rotate-180" aria-hidden />
</button>
)
})}
</div>
</FormSheetSection>
))}
</nav>
)
case 'profile':
return <JourneyProfileFields formId={formId} coverSrc={coverSrc} settings={settings} />
case 'trips':
return <JourneyLinkedTrips trips={journey.trips} onUnlink={setUnlinkTarget} />
case 'linkTrip':
return (
<FormSheetSection>
{loadingTrips || unlinkedTrips.length === 0 ? (
<p role="status" className="py-2 text-center text-control text-m-muted">
{t(loadingTrips ? 'common.loading' : 'journey.trips.noTripsAvailable')}
</p>
) : (
<div className="divide-y divide-m-rowbr">
{unlinkedTrips.map(trip => (
<div key={trip.id} className="flex min-h-12 items-center gap-2.5 py-1.5">
<span className={LIST_ICON}><Luggage size={17} aria-hidden /></span>
<bdi className="min-w-0 flex-1 break-words text-control font-semibold">{trip.title}</bdi>
<button
type="button"
onClick={() => linkTrip(trip.id)}
disabled={linkingTripId != null}
className={SHEET_SECONDARY}
>
{t('journey.trips.link')}
</button>
</div>
))}
</div>
)}
</FormSheetSection>
)
<FormSheetSection>
{loadingTrips || unlinkedTrips.length === 0 ? (
<p role="status" className="py-2 text-center text-control text-m-muted">
{t(loadingTrips ? 'common.loading' : 'journey.trips.noTripsAvailable')}
</p>
) : (
<div className="divide-y divide-m-rowbr">
{unlinkedTrips.map(trip => (
<div key={trip.id} className="flex min-h-12 items-center gap-2.5 py-1.5">
<span className={LIST_ICON}><Luggage size={17} aria-hidden /></span>
<bdi className="min-w-0 flex-1 break-words text-control font-semibold">{trip.title}</bdi>
<button
type="button"
onClick={() => linkTrip(trip.id)}
disabled={linkingTripId != null}
className={SHEET_SECONDARY}
>
{t('journey.trips.link')}
</button>
</div>
))}
</div>
)}
</FormSheetSection>
)
case 'people':
return (
<>
<div className={LIST_PANEL}>
{journey.contributors.map(c => (
<div key={c.user_id} className="flex min-h-14 items-center gap-3 py-2.5">
<JourneyPersonAvatar username={c.username} avatar={c.avatar} />
<div className="min-w-0 flex-1">
<bdi className="block break-words text-control font-semibold">{c.username}</bdi>
<span className="text-caption text-m-muted">{t(c.role === 'owner' ? 'members.owner' : c.role === 'editor' ? 'journey.invite.editor' : 'journey.invite.viewer')}</span>
<>
<div className={LIST_PANEL}>
{journey.contributors.map(c => (
<div key={c.user_id} className="flex min-h-14 items-center gap-3 py-2.5">
<JourneyPersonAvatar username={c.username} avatar={c.avatar} />
<div className="min-w-0 flex-1">
<bdi className="block break-words text-control font-semibold">{c.username}</bdi>
<span className="text-caption text-m-muted">{t(c.role === 'owner' ? 'members.owner' : c.role === 'editor' ? 'journey.invite.editor' : 'journey.invite.viewer')}</span>
</div>
{c.role !== 'owner' && (
<MIconBtn variant="neutral" size={36}
onClick={() => setPendingContributor(c)}
ariaLabel={t('journey.contributors.remove')}
>
<UserMinus size={15} strokeWidth={2} aria-hidden />
</MIconBtn>
)}
</div>
))}
</div>
{c.role !== 'owner' && (
<MIconBtn variant="neutral" size={36}
onClick={() => setPendingContributor(c)}
ariaLabel={t('journey.contributors.remove')}
>
<UserMinus size={15} strokeWidth={2} aria-hidden />
</MIconBtn>
)}
</div>
))}
</div>
<MTripAccessList access={journey.trip_access} />
</>
)
<MTripAccessList access={journey.trip_access} />
</>
)
case 'share':
return <MShareSection journeyId={journey.id} />
case 'entries':
@@ -238,7 +238,6 @@ export default function MPlaceEditSheet({ planner, onOpenExpense }: MPlaceEditSh
} finally {
setIsSaving(false)
}
return
}
const handleSubmit = async () => {
@@ -384,8 +383,8 @@ export default function MPlaceEditSheet({ planner, onOpenExpense }: MPlaceEditSh
<PlaceContactAndCoordinates form={form} onChange={handleChange} onCoordinatePaste={handleCoordPaste}
detailsHours={detailsHours} t={t} locale={locale} />
{placesEnrichEnabled ? (
<div className="mt-3">
<div className="mt-3">
{placesEnrichEnabled ? (
<PlaceDetailsColumn
selection={detailsSelection}
selectedImageUrl={form.image_url}
@@ -401,8 +400,10 @@ export default function MPlaceEditSheet({ planner, onOpenExpense }: MPlaceEditSh
variant="mobile"
t={t}
/>
</div>
) : <PlaceImageSection image={image} onPickUrl={pickImage} mobile t={t} />}
) : (
<PlaceImageSection image={image} onPickUrl={pickImage} mobile t={t} />
)}
</div>
{/* COSTS — same block, same flow as the booking sheet (#1298) */}
{isBudgetEnabled && (