Skip to content

Commit c7218d1

Browse files
committed
fix lint
1 parent 38f265b commit c7218d1

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

docs-svelte-kit/src/lib/footer/Footer.svelte

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
export let frontmatter = {};
77
88
let prev, next;
9+
$: ({
10+
url: { pathname }
11+
} = $page);
912
$: {
1013
let prevItem, currItem;
1114
for (const item of iterateMenuItem($menuItems)) {
@@ -39,10 +42,10 @@
3942

4043
<footer class:hidden-menu={frontmatter.hiddenMenu}>
4144
<div class="footer-tools">
42-
<div class="edit-link">
45+
<div>
4346
<a
4447
href="https://github.com/sveltejs/eslint-plugin-svelte/edit/main/docs/{markdownPath(
45-
$page.url.pathname
48+
pathname
4649
)}"
4750
target="_blank"
4851
rel="noopener noreferrer">Edit this page</a
@@ -57,7 +60,6 @@
5760
viewBox="0 0 100 100"
5861
width="15"
5962
height="15"
60-
class="icon outbound"
6163
><path
6264
fill="currentColor"
6365
d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"
@@ -71,14 +73,14 @@
7173
</div>
7274
{#if fileInfo.lastUpdated}
7375
<div class="last-updated">
74-
<span class="prefix">Last Updated:</span>
75-
<span class="time">{fileInfo.lastUpdated}</span>
76+
<span>Last Updated:</span>
77+
<span>{fileInfo.lastUpdated}</span>
7678
</div>
7779
{/if}
7880
</div>
7981
<div class="footer-move">
8082
{#if prev}
81-
<span class="prev">←<a href="{baseUrl}{prev.path}">{prev.title}</a></span>
83+
<span>←<a href="{baseUrl}{prev.path}">{prev.title}</a></span>
8284
{/if}
8385
{#if next}
8486
<span class="next"><a href="{baseUrl}{next.path}">{next.title}</a>→ </span>

docs-svelte-kit/src/lib/header/Header.svelte

+2-14
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@
2121
on:click={handleToggleSidebar}
2222
on:keydown={(e) => (e.code === 'Enter' || e.code === 'Space') && handleToggleSidebar()}
2323
>
24-
<svg
25-
xmlns="http://www.w3.org/2000/svg"
26-
aria-hidden="true"
27-
role="img"
28-
viewBox="0 0 448 512"
29-
class="icon"
30-
>
24+
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512">
3125
<path
3226
fill="currentColor"
3327
d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"
@@ -79,13 +73,7 @@
7973
rel="noopener noreferrer"
8074
aria-label="GitHub"
8175
>
82-
<svg
83-
version="1.1"
84-
width="16"
85-
height="16"
86-
viewBox="0 0 16 16"
87-
class="octicon octicon-mark-github"
88-
aria-hidden="true"
76+
<svg version="1.1" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"
8977
><path
9078
style:fill="#2c3e50"
9179
fill-rule="evenodd"

docs-svelte-kit/src/lib/sidemenu/UlMenu.svelte

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
import { base as baseUrl } from '$app/paths';
55
export let children;
66
export let level = 1;
7+
8+
$: sidebarMenuLevelClass = `sidebar-menu--level${level}`;
9+
10+
$: ({
11+
url: { pathname }
12+
} = $page);
713
</script>
814

9-
<ul class="sidebar-menu sidebar-menu--level{level}">
10-
{#each children as item}
15+
<ul class={sidebarMenuLevelClass}>
16+
{#each children as item (item)}
1117
<li
1218
class="sidebar-menu-item"
1319
class:active={item.active || (item.path && isActive(item.path, $page))}
@@ -16,9 +22,10 @@
1622
<a
1723
class="sidebar-menu-item-title"
1824
class:active={item.active || (item.path && isActive(item.path, $page))}
19-
href="{baseUrl}{item.path || `${stripBaseUrl($page.url.pathname)}#${item.id}`}"
20-
>{item.title}</a
25+
href="{baseUrl}{item.path || `${stripBaseUrl(pathname)}#${item.id}`}"
2126
>
27+
{item.title}
28+
</a>
2229
{:else}
2330
<span class="sidebar-menu-item-title">{item.title}</span>
2431
{/if}
+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<script>
22
import { base as baseUrl } from '$app/paths';
33
import { page } from '$app/stores';
4+
5+
$: ({
6+
status,
7+
error: { message }
8+
} = $page);
49
</script>
510

6-
<h1>{$page.status}</h1>
11+
<h1>{status}</h1>
712
<blockquote>
8-
<p>{$page.error.message}</p>
13+
<p>{message}</p>
914
<p>Take me <a href="{baseUrl}/">home</a></p>
1015
</blockquote>

0 commit comments

Comments
 (0)