Skip to content

Commit 69cedb7

Browse files
authored
fix/remove imports (#2569)
1 parent ab51422 commit 69cedb7

File tree

14 files changed

+17
-37
lines changed

14 files changed

+17
-37
lines changed

src/lib/components/event/event-summary-row.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
32
import { fade, slide } from 'svelte/transition';
43
54
import { page } from '$app/stores';
@@ -46,7 +45,7 @@
4645
export let expandAll = false;
4746
export let typedError = false;
4847
export let active = false;
49-
export let onRowClick: () => void = noop;
48+
export let onRowClick: () => void = () => {};
5049
5150
$: selectedId = isEventGroup(event)
5251
? Array.from(event.events.keys()).shift()

src/lib/components/event/pending-activity-summary-row.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
3-
42
import { page } from '$app/stores';
53
64
import Icon from '$lib/holocene/icon/icon.svelte';
@@ -19,7 +17,7 @@
1917
export let index: number;
2018
export let expandAll = false;
2119
export let active = false;
22-
export let onRowClick: () => void = noop;
20+
export let onRowClick: () => void = () => {};
2321
2422
$: expanded = expandAll;
2523
$: ({ workflow, run, namespace } = $page.params);

src/lib/components/event/pending-nexus-summary-row.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
3-
42
import { page } from '$app/stores';
53
64
import Icon from '$lib/holocene/icon/icon.svelte';
@@ -18,7 +16,7 @@
1816
export let index: number;
1917
export let expandAll = false;
2018
export let active = false;
21-
export let onRowClick: () => void = noop;
19+
export let onRowClick: () => void = () => {};
2220
2321
$: expanded = expandAll;
2422
$: ({ workflow, run, namespace } = $page.params);

src/lib/components/search-attribute-filter/index.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<script lang="ts" context="module">
2-
import { afterUpdate } from 'svelte/internal';
32
import { writable, type Writable } from 'svelte/store';
43
import { fly } from 'svelte/transition';
54
6-
import { setContext } from 'svelte';
5+
import { afterUpdate, setContext } from 'svelte';
76
87
export const FILTER_CONTEXT = 'filter-context';
98

src/lib/components/timezone-select.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { onMount } from 'svelte/internal';
2+
import { onMount } from 'svelte';
33
44
import Icon from '$lib/holocene/icon/icon.svelte';
55
import Input from '$lib/holocene/input/input.svelte';

src/lib/components/workflow/workflows-summary-configurable-table/table-row.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
3-
42
import { getContext } from 'svelte';
53
64
import { page } from '$app/stores';
@@ -24,7 +22,7 @@
2422
2523
export let workflow: WorkflowExecution | undefined = undefined;
2624
export let empty = false;
27-
export let viewChildren: (workflow?: WorkflowExecution) => void = noop;
25+
export let viewChildren: (workflow?: WorkflowExecution) => void = () => {};
2826
export let childCount: number | undefined = undefined;
2927
export let child = false;
3028

src/lib/holocene/accordion/accordion.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import type { HTMLAttributes } from 'svelte/elements';
3-
import { noop } from 'svelte/internal';
43
54
import { twMerge as merge } from 'tailwind-merge';
65
import { v4 } from 'uuid';
@@ -28,7 +27,7 @@
2827
export let open = false;
2928
export let expandable = true;
3029
export let error = '';
31-
export let onToggle = noop;
30+
export let onToggle = () => {};
3231
3332
let className = '';
3433
export { className as class };

src/lib/holocene/calendar.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
3-
42
import { createEventDispatcher } from 'svelte';
53
64
import { getDateRows, weekDays } from '$lib/utilities/calendar';
@@ -41,7 +39,7 @@
4139
{#if value}
4240
<button
4341
type="button"
44-
on:click={allowed && value ? () => onChange(value) : noop}
42+
on:click={allowed && value ? () => onChange(value) : () => {}}
4543
class="cell"
4644
class:highlight={allowed && value}
4745
class:disabled={!allowed}

src/lib/holocene/filter-or-copy-buttons.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { noop } from 'svelte/internal';
3-
42
import { twMerge as merge } from 'tailwind-merge';
53
64
import Icon from '$lib/holocene/icon/icon.svelte';
@@ -10,7 +8,7 @@
108
export let filterable = true;
119
export let copyable = true;
1210
export let content: string;
13-
export let onFilter: () => void = noop;
11+
export let onFilter: () => void = () => {};
1412
export let filtered = false;
1513
export let copyIconTitle: string;
1614
export let copySuccessIconTitle: string;

src/lib/holocene/pill-container/pill.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import type { HTMLButtonAttributes } from 'svelte/elements';
3-
import { noop } from 'svelte/internal';
43
54
import { getContext } from 'svelte';
65
import { twMerge as merge } from 'tailwind-merge';
@@ -24,7 +23,7 @@
2423
} & HTMLButtonAttributes;
2524
2625
export let id: string;
27-
export let onClick: () => void = noop;
26+
export let onClick: () => void = () => {};
2827
export let disabled = false;
2928
export let loading = false;
3029
export let active: boolean = null;

src/lib/holocene/select/select.svelte

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121

2222
<script lang="ts">
2323
import type { HTMLInputAttributes } from 'svelte/elements';
24-
import { noop, onMount } from 'svelte/internal';
2524
import { writable, type Writable } from 'svelte/store';
2625
27-
import { setContext } from 'svelte';
26+
import { onMount, setContext } from 'svelte';
2827
2928
import type { ButtonStyles } from '$lib/holocene/button.svelte';
3029
import type { IconName } from '$lib/holocene/icon';
@@ -56,7 +55,7 @@
5655
export let placeholder = '';
5756
export let disabled = false;
5857
export let leadingIcon: IconName = null;
59-
export let onChange: (value: T) => void = noop;
58+
export let onChange: (value: T) => void = () => {};
6059
export let menuClass: string | undefined = undefined;
6160
export let variant: ButtonStyles['variant'] = 'secondary';
6261
export let required = false;

src/lib/holocene/tab/tab.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import type { HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
3-
import { noop } from 'svelte/internal';
43
54
import { getContext } from 'svelte';
65
@@ -29,7 +28,7 @@
2928
export let panelId: string = null;
3029
export let disabled = false;
3130
export let active: boolean = null;
32-
export let onClick: () => void = noop;
31+
export let onClick: () => void = () => {};
3332
3433
const { registerTab, selectTab, activeTab } = getContext<TabContext>(TABS);
3534

src/lib/services/workflow-counts.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { noop } from 'svelte/internal';
2-
31
import type { CountWorkflowExecutionsResponse } from '$lib/types/workflows';
42
import { requestFromAPI } from '$lib/utilities/request-from-api';
53
import { routeForApi } from '$lib/utilities/route-for-api';
@@ -14,8 +12,8 @@ export const fetchWorkflowCount = async (
1412
const countRoute = routeForApi('workflows.count', { namespace });
1513
const result = await requestFromAPI<{ count: string }>(countRoute, {
1614
params: query ? { query } : {},
17-
onError: noop,
18-
handleError: noop,
15+
onError: () => {},
16+
handleError: () => {},
1917
request,
2018
});
2119
count = parseInt(result?.count || '0');

vitest-setup.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { noop } from 'svelte/internal';
2-
31
import i18next from 'i18next';
42
import { vi } from 'vitest';
53

@@ -21,8 +19,8 @@ i18next.init({
2119
});
2220

2321
const BroadcastChannelMock = vi.fn(() => ({
24-
addEventListener: noop,
25-
postMessage: noop,
22+
addEventListener: () => {},
23+
postMessage: () => {},
2624
}));
2725

2826
vi.stubGlobal('BroadcastChannel', BroadcastChannelMock);

0 commit comments

Comments
 (0)