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
- {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
({ apiRequest: (...a) => apiRequest(...a) }));
-const {
- createEscalationPolicy,
- updateEscalationPolicy,
- deleteEscalationPolicy,
- UPDATE_FIELDS
-} = await import('./escalation.js');
+const { createEscalationPolicy, updateEscalationPolicy, deleteEscalationPolicy, UPDATE_FIELDS } =
+ await import('./escalation.js');
const cookies = /** @type {any} */ ({ get: () => 'token' });
const event = /** @type {any} */ ({ cookies });
diff --git a/frontend/src/lib/server/v2/lead-custom-fields.js b/frontend/src/lib/server/v2/lead-custom-fields.js
index 49ee9036..1c2a77a4 100644
--- a/frontend/src/lib/server/v2/lead-custom-fields.js
+++ b/frontend/src/lib/server/v2/lead-custom-fields.js
@@ -77,9 +77,7 @@ export function displayValue(definition, value) {
case 'number':
return typeof value === 'number' ? value.toLocaleString() : String(value);
case 'dropdown': {
- const match = (definition.options ?? []).find(
- (/** @type {any} */ o) => o.value === value
- );
+ const match = (definition.options ?? []).find((/** @type {any} */ o) => o.value === value);
return match?.label ?? String(value);
}
default:
diff --git a/frontend/src/lib/server/v2/reopen.js b/frontend/src/lib/server/v2/reopen.js
index ad5fed42..2d711757 100644
--- a/frontend/src/lib/server/v2/reopen.js
+++ b/frontend/src/lib/server/v2/reopen.js
@@ -29,12 +29,7 @@ export async function getReopenPolicy({ cookies }) {
/** The four fields the serializer accepts. Everything else in the GET
* response is a computed metric and is not writable. */
-const EDITABLE_FIELDS = [
- 'is_enabled',
- 'reopen_window_days',
- 'reopen_to_status',
- 'notify_assigned'
-];
+const EDITABLE_FIELDS = ['is_enabled', 'reopen_window_days', 'reopen_to_status', 'notify_assigned'];
/**
* Update the org's reopen policy.
diff --git a/frontend/src/lib/server/v2/templates.test.js b/frontend/src/lib/server/v2/templates.test.js
index d9c50f32..761fb86a 100644
--- a/frontend/src/lib/server/v2/templates.test.js
+++ b/frontend/src/lib/server/v2/templates.test.js
@@ -208,11 +208,11 @@ describe('updateInvoiceTemplate', () => {
});
it('does send the markup, unlike create', async () => {
- await updateInvoiceTemplate(
- { cookies },
- 't1',
- { name: 'Clean', template_html: 'x ', template_css: 'h1{}' }
- );
+ await updateInvoiceTemplate({ cookies }, 't1', {
+ name: 'Clean',
+ template_html: 'x ',
+ template_css: 'h1{}'
+ });
const [, options] = apiRequest.mock.calls[0];
expect(options.body.template_html).toBe('x ');
expect(options.body.template_css).toBe('h1{}');
diff --git a/frontend/src/lib/server/v2/ticket-approvals.test.js b/frontend/src/lib/server/v2/ticket-approvals.test.js
index 94081455..b1a32c93 100644
--- a/frontend/src/lib/server/v2/ticket-approvals.test.js
+++ b/frontend/src/lib/server/v2/ticket-approvals.test.js
@@ -3,9 +3,8 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
const apiRequest = vi.fn();
vi.mock('$lib/api-helpers.js', () => ({ apiRequest: (...a) => apiRequest(...a) }));
-const { createApprovalRule, updateApprovalRule, deleteApprovalRule } = await import(
- './ticket-approvals.js'
-);
+const { createApprovalRule, updateApprovalRule, deleteApprovalRule } =
+ await import('./ticket-approvals.js');
const cookies = /** @type {any} */ ({ get: () => 'token' });
const event = /** @type {any} */ ({ cookies });
@@ -96,9 +95,7 @@ describe('createApprovalRule', () => {
});
it('refuses a rule with no name before making a request', async () => {
- await expect(createApprovalRule(event, { ...base, name: '' })).rejects.toThrow(
- /needs a name/i
- );
+ await expect(createApprovalRule(event, { ...base, name: '' })).rejects.toThrow(/needs a name/i);
expect(apiRequest).not.toHaveBeenCalled();
});
});
diff --git a/frontend/src/lib/v2/components/ConfirmAction.svelte b/frontend/src/lib/v2/components/ConfirmAction.svelte
index 4efffdd3..a528d64c 100644
--- a/frontend/src/lib/v2/components/ConfirmAction.svelte
+++ b/frontend/src/lib/v2/components/ConfirmAction.svelte
@@ -20,13 +20,7 @@
* explain?: string,
* hidden?: Record
* }} */
- let {
- action,
- label = 'Delete',
- confirmLabel = 'Confirm',
- explain = '',
- hidden = {}
- } = $props();
+ let { action, label = 'Delete', confirmLabel = 'Confirm', explain = '', hidden = {} } = $props();
let armed = $state(false);
let busy = $state(false);
diff --git a/frontend/src/lib/v2/components/SettingsFormPanel.svelte b/frontend/src/lib/v2/components/SettingsFormPanel.svelte
index fe66972e..aba8841d 100644
--- a/frontend/src/lib/v2/components/SettingsFormPanel.svelte
+++ b/frontend/src/lib/v2/components/SettingsFormPanel.svelte
@@ -30,15 +30,7 @@
* ondone?: () => void,
* fields: import('svelte').Snippet
* }} */
- let {
- title,
- action,
- error = null,
- submitLabel = 'Save',
- oncancel,
- ondone,
- fields
- } = $props();
+ let { title, action, error = null, submitLabel = 'Save', oncancel, ondone, fields } = $props();
// Disables submit while a request is in flight so a double-click cannot
// fire two writes.
diff --git a/frontend/src/lib/v2/filters.test.js b/frontend/src/lib/v2/filters.test.js
index 178a1c2e..47875290 100644
--- a/frontend/src/lib/v2/filters.test.js
+++ b/frontend/src/lib/v2/filters.test.js
@@ -56,15 +56,7 @@ describe('every descriptor agrees with its module allow-list', () => {
// Params a page's own `load` interprets rather than forwarding to the
// API. `archived` is documents' opt-in to seeing archived rows, the
// same shape as contacts' `inactive`.
- const VIEW_PARAMS = [
- 'all',
- 'inactive',
- 'archived',
- 'visibility',
- 'view',
- 'open',
- 'rotten'
- ];
+ const VIEW_PARAMS = ['all', 'inactive', 'archived', 'visibility', 'view', 'open', 'rotten'];
for (const preset of FILTERS[pageKey].presets) {
for (const key of Object.keys(preset.params)) {
if (VIEW_PARAMS.includes(key)) continue;
diff --git a/frontend/src/routes/(app)/invoices/templates/[id]/edit/+page.server.js b/frontend/src/routes/(app)/invoices/templates/[id]/edit/+page.server.js
index f44fd65f..923ba465 100644
--- a/frontend/src/routes/(app)/invoices/templates/[id]/edit/+page.server.js
+++ b/frontend/src/routes/(app)/invoices/templates/[id]/edit/+page.server.js
@@ -1,8 +1,5 @@
import { fail, redirect, error } from '@sveltejs/kit';
-import {
- getInvoiceTemplateForEdit,
- updateInvoiceTemplate
-} from '$lib/server/v2/templates.js';
+import { getInvoiceTemplateForEdit, updateInvoiceTemplate } from '$lib/server/v2/templates.js';
import { readableError } from '$lib/server/v2/form-errors.js';
/**
diff --git a/frontend/src/routes/(app)/settings/api-tokens/+page.svelte b/frontend/src/routes/(app)/settings/api-tokens/+page.svelte
index a913b37f..e4bfa12b 100644
--- a/frontend/src/routes/(app)/settings/api-tokens/+page.svelte
+++ b/frontend/src/routes/(app)/settings/api-tokens/+page.svelte
@@ -311,7 +311,7 @@
{#if (t.scopes ?? []).length === 0}
Everything {(owner.name ?? '').split(' ')[0]} can
- {:else if (t.scopes ?? []).every((/** @type {string} */ s) => s.endsWith(':read'))}
+ {:else if (t.scopes ?? []).every( (/** @type {string} */ s) => s.endsWith(':read') )}
Read only
{:else}
{(t.scopes ?? []).join(', ')}
@@ -364,10 +364,10 @@
A token is the whole account
- A token authenticates as its owner and inherits their role and organisation. There is
- no narrower permission to give it. Issue one per integration so a single revocation
- stops a single thing, set an expiry, and revoke anything you cannot name a use for. The
- value is shown once when the token is created and cannot be recovered afterwards.
+ A token authenticates as its owner and inherits their role and organisation. There is no
+ narrower permission to give it. Issue one per integration so a single revocation stops a
+ single thing, set an expiry, and revoke anything you cannot name a use for. The value is
+ shown once when the token is created and cannot be recovered afterwards.
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