mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
fix(ci): keep the photo picker within lint limits
Pass through the optional sheet coverage state and narrow the pending photo group before accessing it. Lower the test ratchet after removing a non-null assertion.
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"tests": {
|
||||
"@typescript-eslint/no-explicit-any": 484,
|
||||
"@typescript-eslint/no-non-null-assertion": 1849,
|
||||
"@typescript-eslint/no-non-null-assertion": 1848,
|
||||
"@typescript-eslint/no-misused-promises": 22,
|
||||
"@typescript-eslint/no-unused-vars": 48,
|
||||
"@typescript-eslint/no-floating-promises": 33,
|
||||
|
||||
@@ -186,11 +186,11 @@ export function useJourneyEntryForm({
|
||||
const next = [...previous];
|
||||
for (const group of groups) {
|
||||
const index = next.findIndex((pick) => pick.provider === provider && pick.passphrase === group.passphrase);
|
||||
if (index < 0) {
|
||||
const existing = next[index];
|
||||
if (!existing) {
|
||||
next.push({ ...group, provider });
|
||||
continue;
|
||||
}
|
||||
const existing = next[index]!;
|
||||
const assets = new Map(existing.assetIds.map((id, i) => [id, existing.mediaTypes?.[i] ?? 'image']));
|
||||
group.assetIds.forEach((id, i) => {
|
||||
if (!assets.has(id)) assets.set(id, group.mediaTypes?.[i] ?? 'image');
|
||||
|
||||
@@ -185,7 +185,7 @@ export default function MSheet({
|
||||
variant = 'card',
|
||||
dimTransparent = false,
|
||||
ariaLabel,
|
||||
covered = false,
|
||||
covered,
|
||||
className = '',
|
||||
children,
|
||||
discardGuard,
|
||||
@@ -294,8 +294,8 @@ export default function MSheet({
|
||||
<div
|
||||
className="m-root fixed inset-0 z-[60]"
|
||||
role="presentation"
|
||||
aria-hidden={covered || undefined}
|
||||
inert={covered || undefined}
|
||||
aria-hidden={covered}
|
||||
inert={covered}
|
||||
onClick={(e) => {
|
||||
if (e.target === e.currentTarget) requestClose()
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user