style: fix no-unused-vars -- prefix unused catch bindings, remove dead code, suppress template-use false positives

This commit is contained in:
2026-06-25 15:10:07 +01:00
parent f3436ac37a
commit a099f84d1b
18 changed files with 121 additions and 206 deletions
@@ -146,8 +146,6 @@
!customServiceErrors.minimum_age_required
);
function toggleCustomForm(show: boolean) {
showCustomCreateForm = show;
if (show) {
newCustomService = {
name: '',
@@ -326,7 +324,6 @@
: !!(guestName.trim() && guestPhone.trim() && isValidUKPhone(guestPhone))
);
const canProceedStep2 = $derived(selectedServices.length > 0);
const canProceedStep3 = $derived(true); // Overrides are optional
const canProceedStep4 = $derived(!!(selectedDate && selectedTime));
/** Whether the currently selected time slot is out-of-hours */
@@ -487,7 +484,7 @@
(user: { account_role: string }) => !excludedRoles.includes(user.account_role)
);
}
} catch (err) {
} catch (_err) {
toast.error('Failed to load users');
} finally {
loadingUsers = false;
@@ -508,7 +505,7 @@
if (response.ok) {
services = await response.json();
}
} catch (err) {
} catch (_err) {
toast.error('Failed to load services');
} finally {
loadingServices = false;
@@ -582,7 +579,7 @@
workingHours = { ...workingHours, ...whMap };
availableHours = { ...availableHours, ...ahMap };
}
} catch (err) {
} catch (_err) {
toast.error('Failed to load availability');
} finally {
_loadingWorkingHours = false;
@@ -652,7 +649,7 @@
workingHours = { ...workingHours, ...whMap };
availableHours = { ...availableHours, ...ahMap };
}
} catch (err) {
} catch (_err) {
toast.error('Failed to load availability');
} finally {
_loadingWorkingHours = false;
@@ -742,7 +739,7 @@
toast.error(`Failed to reserve slot: ${errorText}`);
return false;
}
} catch (err) {
} catch (_err) {
toast.error('Failed to reserve slot');
return false;
} finally {
@@ -1042,7 +1039,7 @@
const errorText = await res.text();
toast.error(`Failed to create booking: ${errorText}`);
}
} catch (err) {
} catch (_err) {
toast.error('An error occurred while creating booking');
} finally {
submitting = false;