From f7e46077e39465d4af5f7a3bfe7b09bde3707412 Mon Sep 17 00:00:00 2001 From: Elijah Duffy Date: Fri, 11 Jul 2025 11:55:22 -0700 Subject: [PATCH] fix eslint errors --- eslint.config.js | 16 +++++++++++++++- src/lib/ActionSelect.svelte | 9 ++++----- src/lib/DateInput.svelte | 4 ++-- src/lib/PinInput.svelte | 2 +- src/lib/RadioGroup.svelte | 2 +- src/lib/StateMachine.svelte | 2 +- src/lib/TimeInput.svelte | 2 +- src/lib/TimezoneInput.svelte | 1 + 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ef07d32..c16c9e6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -20,7 +20,21 @@ export default ts.config( languageOptions: { globals: { ...globals.browser, ...globals.node } }, - rules: { 'no-undef': 'off' } + rules: { + 'no-undef': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true + } + ] + } }, { files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], diff --git a/src/lib/ActionSelect.svelte b/src/lib/ActionSelect.svelte index 5617cfe..acfeaed 100644 --- a/src/lib/ActionSelect.svelte +++ b/src/lib/ActionSelect.svelte @@ -2,9 +2,7 @@ export type ActionSelectOption = { /** value is a convenience field, it has no internal use */ value?: string; - icon?: - | { component: Component; props: Record } - | Snippet<[opt: ActionSelectOption]>; + icon?: IconDef | Snippet<[opt: ActionSelectOption]>; label: string | Snippet<[opt: ActionSelectOption]>; disabled?: boolean; onchoose?: (opt: ActionSelectOption) => void; @@ -13,11 +11,12 @@ diff --git a/src/lib/TimezoneInput.svelte b/src/lib/TimezoneInput.svelte index 0826855..c27a74c 100644 --- a/src/lib/TimezoneInput.svelte +++ b/src/lib/TimezoneInput.svelte @@ -107,5 +107,6 @@ /> {#snippet timezoneLabel(item: ComboboxOption)} + {@html wbr(item.label ?? 'Missing label')} {/snippet}