Skip to content

Commit 47f4567

Browse files
committed
chore(eslint): fix all eslint errors
1 parent a402132 commit 47f4567

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

app/app.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const handleRequestFormSubmit = async ({
2929
});
3030
3131
error.value = null;
32-
// TODO(serhalp) nuxt doesn't appear to re-export the `FetchError` types from ofetch. Look into
33-
// this.
32+
// TODO(serhalp) nuxt doesn't appear to re-export the `FetchError` types from ofetch. Look into this.
33+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3434
} catch (err: any) {
3535
error.value =
3636
err?.data?.message ??
@@ -64,7 +64,7 @@ const handleClickClear = (): void => {
6464
</div>
6565

6666
<div class="flex-btwn run-panels">
67-
<RunPanel v-for="run in runs" v-bind="run" />
67+
<RunPanel v-for="(run, i) in runs" v-bind="run" :key="i" />
6868
</div>
6969
</main>
7070

app/components/CacheAnalysis.vue

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const formatDate = (date: Date): string =>
2424
timeZoneName: "short",
2525
});
2626
27-
let now = ref(Date.now());
27+
const now = ref(Date.now());
2828
2929
const cacheAnalysis = computed(() =>
3030
getCacheAnalysis(props.cacheHeaders, now.value),
@@ -62,19 +62,20 @@ onUnmounted(() => {
6262
6363
</h4>
6464
</dt>
65-
<dd></dd>
65+
<dd />
6666

67-
<template v-for="(
67+
<template
68+
v-for="(
6869
{ cacheName, parameters }, cacheIndex
69-
) in cacheAnalysis.cacheStatus">
70+
) in cacheAnalysis.cacheStatus" :key="cacheIndex">
7071
<!-- This is a bit of a hack to use the pretty <dt> styling but with sections. -->
7172
<!-- I should probably just do something custom instead. -->
7273
<dt class="cache-heading">
7374
<h4>
7475
↳ <em>{{ cacheName }}</em> cache
7576
</h4>
7677
</dt>
77-
<dd></dd>
78+
<dd />
7879

7980
<dt>Hit</dt>
8081
<dd>{{ parameters.hit ? "✅" : "❌" }}</dd>
@@ -124,7 +125,7 @@ onUnmounted(() => {
124125
🏁 Response to client
125126
</h4>
126127
</dt>
127-
<dd></dd>
128+
<dd />
128129

129130
<dt>Cacheable</dt>
130131
<dd>{{ cacheAnalysis.cacheControl.isCacheable ? "✅" : "❌" }}</dd>
@@ -156,27 +157,23 @@ onUnmounted(() => {
156157
</template>
157158

158159
<template v-if="cacheAnalysis.cacheControl.ttl">
159-
<dt>
160-
TTL{{
160+
<dt>TTL{{
161161
cacheAnalysis.cacheControl.netlifyCdnTtl ||
162162
cacheAnalysis.cacheControl.cdnTtl
163163
? " (browser)"
164164
: ""
165-
}}
166-
</dt>
165+
}}</dt>
167166
<dd :title="formatHumanSeconds(cacheAnalysis.cacheControl.ttl)">
168167
{{ formatSeconds(cacheAnalysis.cacheControl.ttl) }}
169168
</dd>
170169
</template>
171170

172171
<template v-if="cacheAnalysis.cacheControl.cdnTtl">
173-
<dt>
174-
TTL ({{
172+
<dt>TTL ({{
175173
cacheAnalysis.cacheControl.netlifyCdnTtl
176174
? "other CDNs"
177175
: "Netlify CDN"
178-
}})
179-
</dt>
176+
}})</dt>
180177
<dd :title="formatHumanSeconds(cacheAnalysis.cacheControl.cdnTtl)">
181178
{{ formatSeconds(cacheAnalysis.cacheControl.cdnTtl) }}
182179
</dd>

app/components/RunPanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const props = defineProps<{
1313

1414
<small>HTTP {{ props.status }} ({{ props.durationInMs }} ms)</small>
1515

16-
<CacheAnalysis :cacheHeaders="props.cacheHeaders" />
17-
<RawCacheHeaders :cacheHeaders="props.cacheHeaders" />
16+
<CacheAnalysis :cache-headers="props.cacheHeaders" />
17+
<RawCacheHeaders :cache-headers="props.cacheHeaders" />
1818
</div>
1919
</template>
2020

0 commit comments

Comments
 (0)