Skip to content

Commit 547d198

Browse files
committed
deno fmt + svelte files
1 parent 94e5c2f commit 547d198

22 files changed

+201
-153
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dev:
1818
deno run --watch --allow-env --allow-read --allow-run $(BUNDLE)
1919

2020
valid:
21-
deno fmt
21+
deno fmt --unstable-component
2222
deno lint
2323
pnpm exec svelte-check --no-tsconfig # only for *.svelte files
2424

src/view/components/ActiveTimers.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</script>
2222

2323
<table data-navigation-tag={caption}>
24-
<caption class="bc-invert ta-l"
25-
>{caption} <Variable value={metrics.length} /></caption
26-
>
24+
<caption class="bc-invert ta-l">
25+
{caption} <Variable value={metrics.length} />
26+
</caption>
2727
<tbody>
2828
<tr>
2929
<th>Delay</th>

src/view/components/Alert.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
}
2727
2828
if (e.newState === 'open') {
29-
document.addEventListener('keydown', onKeyboardEvent, { capture: true });
29+
document.addEventListener('keydown', onKeyboardEvent, {
30+
capture: true,
31+
});
3032
globalThis.addEventListener('click', onWindowClick);
3133
} else if (e.newState === 'closed') {
3234
document.removeEventListener('keydown', onKeyboardEvent, {
@@ -63,8 +65,8 @@
6365
onclick={(e) => {
6466
e.preventDefault();
6567
hide();
66-
}}><span class="icon -remove"></span></a
67-
>
68+
}}
69+
><span class="icon -remove"></span></a>
6870
{/if}
6971
</header>
7072
<footer>

src/view/components/AnimationCancelHistory.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import type { TCancelAnimationFrameHistory } from '../../wrapper/AnimationWrapper.ts';
33
import {
44
DEFAULT_SORT_CAF,
5+
ESortOrder,
56
getSettings,
67
setSettings,
7-
ESortOrder,
88
} from '../../api/settings.ts';
99
import { compareByFieldOrder } from '../../api/comparator.ts';
1010
import Variable from './Variable.svelte';
@@ -31,7 +31,7 @@
3131
});
3232
3333
function onChangeSort(_field: string, _order: ESortOrder) {
34-
sortField = <keyof TCancelAnimationFrameHistory>_field;
34+
sortField = <keyof TCancelAnimationFrameHistory> _field;
3535
sortOrder = _order;
3636
3737
setSettings({
@@ -45,8 +45,7 @@
4545

4646
<table data-navigation-tag={caption}>
4747
<caption class="bc-invert ta-l">
48-
{caption}
49-
<Variable value={cafHistory.length} />
48+
{caption} <Variable value={cafHistory.length} />
5049
</caption>
5150
<tbody>
5251
<tr>
@@ -56,16 +55,16 @@
5655
field="calls"
5756
currentField={sortField}
5857
currentFieldOrder={sortOrder}
59-
eventChangeSorting={onChangeSort}>Called</SortableColumn
60-
>
58+
eventChangeSorting={onChangeSort}
59+
>Called</SortableColumn>
6160
</th>
6261
<th class="ta-c">
6362
<SortableColumn
6463
field="handler"
6564
currentField={sortField}
6665
currentFieldOrder={sortOrder}
67-
eventChangeSorting={onChangeSort}>Handler</SortableColumn
68-
>
66+
eventChangeSorting={onChangeSort}
67+
>Handler</SortableColumn>
6968
</th>
7069
<th title="Bypass"><span class="icon -bypass"></span></th>
7170
<th title="Breakpoint"><span class="icon -breakpoint"></span></th>

src/view/components/AnimationRequestHistory.svelte

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
} from '../../wrapper/AnimationWrapper.ts';
66
import {
77
DEFAULT_SORT_RAF,
8+
ESortOrder,
89
getSettings,
910
setSettings,
10-
ESortOrder,
1111
} from '../../api/settings.ts';
1212
import { compareByFieldOrder } from '../../api/comparator.ts';
1313
import { CALLED_ABORTED_TOOLTIP } from '../../api/const.ts';
@@ -45,7 +45,7 @@
4545
});
4646
4747
function onChangeSort(_field: string, _order: ESortOrder) {
48-
sortField = <keyof TRequestAnimationFrameHistory>_field;
48+
sortField = <keyof TRequestAnimationFrameHistory> _field;
4949
sortOrder = _order;
5050
5151
setSettings({
@@ -101,8 +101,7 @@
101101

102102
<table data-navigation-tag={caption}>
103103
<caption class="bc-invert ta-l">
104-
{caption}
105-
<Variable value={rafHistory.length} />
104+
{caption} <Variable value={rafHistory.length} />
106105
</caption>
107106
<tbody>
108107
<tr>
@@ -112,33 +111,33 @@
112111
field="selfTime"
113112
currentField={sortField}
114113
currentFieldOrder={sortOrder}
115-
eventChangeSorting={onChangeSort}>Self</SortableColumn
116-
>
114+
eventChangeSorting={onChangeSort}
115+
>Self</SortableColumn>
117116
</th>
118117
<th class="ta-c" title="Calls per second">CPS</th>
119118
<th class="ta-c">
120119
<SortableColumn
121120
field="calls"
122121
currentField={sortField}
123122
currentFieldOrder={sortOrder}
124-
eventChangeSorting={onChangeSort}>Called</SortableColumn
125-
>
123+
eventChangeSorting={onChangeSort}
124+
>Called</SortableColumn>
126125
</th>
127126
<th class="ta-c">
128127
<SortableColumn
129128
field="handler"
130129
currentField={sortField}
131130
currentFieldOrder={sortOrder}
132-
eventChangeSorting={onChangeSort}>Handler</SortableColumn
133-
>
131+
eventChangeSorting={onChangeSort}
132+
>Handler</SortableColumn>
134133
</th>
135134
<th>
136135
<SortableColumn
137136
field="online"
138137
currentField={sortField}
139138
currentFieldOrder={sortOrder}
140-
eventChangeSorting={onChangeSort}>Set</SortableColumn
141-
>
139+
eventChangeSorting={onChangeSort}
140+
>Set</SortableColumn>
142141
</th>
143142
<th title="Bypass"><span class="icon -bypass"></span></th>
144143
<th title="Breakpoint"><span class="icon -breakpoint"></span></th>
@@ -153,17 +152,19 @@
153152
<td class="ta-r"><FrameSensitiveTime value={metric.selfTime} /></td>
154153
<td class="ta-c">{metric.cps || undefined}</td>
155154
<td class="ta-c">
156-
<Variable value={metric.calls} />{#if metric.canceledCounter}-<a
155+
<Variable value={metric.calls} />
156+
{#if metric.canceledCounter}-<a
157157
role="button"
158158
href="void(0)"
159159
title={CALLED_ABORTED_TOOLTIP}
160160
onclick={(e) => {
161161
e.preventDefault();
162162
onFindRegressors(metric.canceledByTraceIds);
163163
}}
164-
><Variable value={metric.canceledCounter} />/{metric
165-
.canceledByTraceIds?.length}</a
166-
>
164+
><Variable value={metric.canceledCounter} />/{
165+
metric
166+
.canceledByTraceIds?.length
167+
}</a>
167168
{/if}
168169
</td>
169170
<td class="ta-c"><Variable value={metric.handler} /></td>

src/view/components/Dialog.svelte

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
1818
export function show() {
1919
selfEl?.showModal();
20-
document.addEventListener('keydown', onKeyboardEvent, { capture: true });
20+
document.addEventListener('keydown', onKeyboardEvent, {
21+
capture: true,
22+
});
2123
selfEl?.addEventListener('click', onSelfClick);
2224
showContent = true;
2325
}
@@ -41,7 +43,9 @@
4143
}
4244
4345
function onClose() {
44-
document.removeEventListener('keydown', onKeyboardEvent, { capture: true });
46+
document.removeEventListener('keydown', onKeyboardEvent, {
47+
capture: true,
48+
});
4549
selfEl?.removeEventListener('click', onSelfClick);
4650
showContent = false;
4751
closeEvent?.();
@@ -65,8 +69,8 @@
6569
onclick={(e) => {
6670
e.preventDefault();
6771
hide();
68-
}}><span class="icon -remove"></span></a
69-
>
72+
}}
73+
><span class="icon -remove"></span></a>
7074
</header>
7175

7276
{#if showContent}

src/view/components/EvalMetrics.svelte

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
{#if evalHistory?.length}
2626
<table data-navigation-tag="Eval History">
27-
<caption class="ta-l bc-invert"
28-
>Eval History <Variable value={evalHistory.length} /></caption
29-
>
27+
<caption class="ta-l bc-invert">
28+
Eval History <Variable value={evalHistory.length} />
29+
</caption>
3030
<tbody>
3131
<tr>
3232
<th class="w-full">Callstack</th>
@@ -60,13 +60,11 @@
6060
{#if metric.usesLocalScope}
6161
<span
6262
title="Throwed an error while trying to get local scope variables, return value is unreliable"
63-
>⁉️ LOCAL & GLOBAL</span
64-
>
63+
>⁉️ LOCAL & GLOBAL</span>
6564
{:else}
6665
<span
6766
title="Had access to global scope (local scope usage has not been detected)"
68-
>GLOBAL</span
69-
>
67+
>GLOBAL</span>
7068
{/if}
7169
</td>
7270
<td><TraceBypass traceId={metric.traceId} /></td>

src/view/components/IdleCallbackCancelHistory.svelte

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script lang="ts">
22
import type { TCancelIdleCallbackHistory } from '../../wrapper/IdleWrapper.ts';
33
import {
4-
getSettings,
5-
setSettings,
64
DEFAULT_SORT_CIC,
75
type ESortOrder,
6+
getSettings,
7+
setSettings,
88
} from '../../api/settings.ts';
99
import { compareByFieldOrder } from '../../api/comparator.ts';
1010
import Variable from './Variable.svelte';
@@ -17,7 +17,8 @@
1717
let {
1818
cicHistory,
1919
caption = '',
20-
}: { cicHistory: TCancelIdleCallbackHistory[]; caption?: string } = $props();
20+
}: { cicHistory: TCancelIdleCallbackHistory[]; caption?: string } =
21+
$props();
2122
let sortField = $state(DEFAULT_SORT_CIC.field);
2223
let sortOrder = $state(DEFAULT_SORT_CIC.order);
2324
let sortedMetrics = $derived.by(() =>
@@ -30,7 +31,7 @@
3031
});
3132
3233
function onChangeSort(_field: string, _order: ESortOrder) {
33-
sortField = <keyof TCancelIdleCallbackHistory>_field;
34+
sortField = <keyof TCancelIdleCallbackHistory> _field;
3435
sortOrder = _order;
3536
3637
setSettings({
@@ -44,8 +45,7 @@
4445

4546
<table data-navigation-tag={caption}>
4647
<caption class="bc-invert ta-l">
47-
{caption}
48-
<Variable value={cicHistory.length} />
48+
{caption} <Variable value={cicHistory.length} />
4949
</caption>
5050
<tbody>
5151
<tr>
@@ -55,16 +55,16 @@
5555
field="calls"
5656
currentField={sortField}
5757
currentFieldOrder={sortOrder}
58-
eventChangeSorting={onChangeSort}>Called</SortableColumn
59-
>
58+
eventChangeSorting={onChangeSort}
59+
>Called</SortableColumn>
6060
</th>
6161
<th class="ta-c">
6262
<SortableColumn
6363
field="handler"
6464
currentField={sortField}
6565
currentFieldOrder={sortOrder}
66-
eventChangeSorting={onChangeSort}>Handler</SortableColumn
67-
>
66+
eventChangeSorting={onChangeSort}
67+
>Handler</SortableColumn>
6868
</th>
6969
<th title="Bypass"><span class="icon -bypass"></span></th>
7070
<th title="Breakpoint"><span class="icon -breakpoint"></span></th>

0 commit comments

Comments
 (0)