From fc07d2a3bb6b498bb1f7a2a2fcb23114b5aefd04 Mon Sep 17 00:00:00 2001 From: Ashwin Date: Fri, 7 Aug 2026 22:42:57 +0530 Subject: [PATCH] chore: clean up code formatting and improve readability across multiple files --- frontend/.prettierignore | 3 +++ .../lib/components/contacts/ContactImportDrawer.svelte | 4 ++-- .../lib/components/tickets/TicketImportDrawer.svelte | 4 ++-- frontend/src/lib/server/log-safe.js | 4 +++- frontend/src/lib/server/v2/escalation.test.js | 8 ++------ frontend/src/lib/server/v2/lead-custom-fields.js | 4 +--- frontend/src/lib/server/v2/reopen.js | 7 +------ frontend/src/lib/server/v2/templates.test.js | 10 +++++----- frontend/src/lib/server/v2/ticket-approvals.test.js | 9 +++------ frontend/src/lib/v2/components/ConfirmAction.svelte | 8 +------- .../src/lib/v2/components/SettingsFormPanel.svelte | 10 +--------- frontend/src/lib/v2/filters.test.js | 10 +--------- .../(app)/invoices/templates/[id]/edit/+page.server.js | 5 +---- .../src/routes/(app)/settings/api-tokens/+page.svelte | 10 +++++----- frontend/src/routes/(app)/settings/macros/+page.svelte | 4 ++-- .../src/routes/(app)/settings/routing/+page.svelte | 7 +++---- 16 files changed, 36 insertions(+), 71 deletions(-) diff --git a/frontend/.prettierignore b/frontend/.prettierignore index 06201ecc..66354938 100644 --- a/frontend/.prettierignore +++ b/frontend/.prettierignore @@ -5,6 +5,9 @@ yarn.lock bun.lock bun.lockb +# Local session artifacts +.remember/ + # Generated API schema. drf-spectacular writes YAML, and the file name says # .json, so prettier picks the JSON parser and dies on line 1 instead of # reporting a formatting diff. That aborts `pnpm run lint` before eslint runs. diff --git a/frontend/src/lib/components/contacts/ContactImportDrawer.svelte b/frontend/src/lib/components/contacts/ContactImportDrawer.svelte index a6287271..b74f83b1 100644 --- a/frontend/src/lib/components/contacts/ContactImportDrawer.svelte +++ b/frontend/src/lib/components/contacts/ContactImportDrawer.svelte @@ -372,8 +372,8 @@

- {preview.errors.length} error{preview.errors.length === 1 ? '' : 's'}, fix the CSV before - importing + {preview.errors.length} error{preview.errors.length === 1 ? '' : 's'}, fix the CSV + before importing

diff --git a/frontend/src/routes/(app)/settings/macros/+page.svelte b/frontend/src/routes/(app)/settings/macros/+page.svelte index 069f5b04..1a6bdca7 100644 --- a/frontend/src/routes/(app)/settings/macros/+page.svelte +++ b/frontend/src/routes/(app)/settings/macros/+page.svelte @@ -231,8 +231,8 @@

These seven are the whole set. Anything else between percent signs is left exactly as - written and goes out that way. The server does not guess, on purpose, so a typo is - visible in the composer rather than a blank in the customer's inbox. + written and goes out that way. The server does not guess, on purpose, so a typo is visible + in the composer rather than a blank in the customer's inbox.

diff --git a/frontend/src/routes/(app)/settings/routing/+page.svelte b/frontend/src/routes/(app)/settings/routing/+page.svelte index 5d1c7c9b..69b8fd73 100644 --- a/frontend/src/routes/(app)/settings/routing/+page.svelte +++ b/frontend/src/routes/(app)/settings/routing/+page.svelte @@ -47,9 +47,7 @@ // The repeating condition rows being edited, as `{ field, op, value }`. // Held here, rather than read off `editing`, so a row can be added or // removed before submitting. - let conditionRows = $state( - /** @type {{ field: string, op: string, value: string }[]} */ ([]) - ); + let conditionRows = $state(/** @type {{ field: string, op: string, value: string }[]} */ ([])); function openCreate() { editing = 'new'; @@ -378,7 +376,8 @@ class="v2-btn v2-btn-sm" type="button" style="align-self:flex-start" - onclick={() => (conditionRows = [...conditionRows, { field: '', op: 'eq', value: '' }])} + onclick={() => + (conditionRows = [...conditionRows, { field: '', op: 'eq', value: '' }])} > Add a condition