Skip to content

Commit 81886b2

Browse files
committed
format lint
1 parent 167fb73 commit 81886b2

49 files changed

Lines changed: 1089 additions & 1109 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/app/app/app.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default defineAppConfig({
22
ui: {
33
colors: {
4-
primary: 'sky',
4+
primary: "sky",
55
},
66
},
7-
})
7+
});

packages/app/app/app.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<script setup>
22
useHead({
33
htmlAttrs: {
4-
lang: 'en',
4+
lang: "en",
55
},
66
link: [
7-
{ rel: 'icon', href: '/favicon.png' },
8-
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
7+
{ rel: "icon", href: "/favicon.png" },
8+
{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
99
],
10-
})
10+
});
1111
1212
useSeoMeta({
13-
title: 'pkg.pr.new',
13+
title: "pkg.pr.new",
1414
description:
15-
'Search repositories on GitHub to list their continuous releases.',
16-
})
15+
"Search repositories on GitHub to list their continuous releases.",
16+
});
1717
</script>
1818

1919
<template>

packages/app/app/assets/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ summary {
120120

121121
code > pre {
122122
@apply rounded-lg overflow-x-scroll bg-transparent! text-sm;
123-
}
123+
}

packages/app/app/components/AppFooter.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
width="117"
1010
height="24"
1111
class="not-dark:hidden"
12-
>
12+
/>
1313
<img
1414
src="/stackblitz-black.svg"
1515
alt="StackBlitz"
1616
width="117"
1717
height="24"
1818
class="dark:hidden"
19-
>
19+
/>
2020
</a>
2121
<div class="flex gap-3 items-center">
2222
<div>
@@ -25,12 +25,15 @@
2525
href="https://github.com/stackblitz-labs"
2626
target="_blank"
2727
class="text-primary"
28-
>StackBlitz Labs</a>
28+
>StackBlitz Labs</a
29+
>
2930
</div>
3031
<UIcon name="ph-dot" />
3132
<div>
3233
UI by
33-
<a href="https://github.com/Akryum" target="_blank" class="text-primary">Akryum</a>
34+
<a href="https://github.com/Akryum" target="_blank" class="text-primary"
35+
>Akryum</a
36+
>
3437
</div>
3538
</div>
3639
</footer>

packages/app/app/components/CodeSnippet.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<script lang="ts" setup>
22
const props = defineProps<{
3-
code: string
4-
}>()
3+
code: string;
4+
}>();
55
6-
const { copy, isSupported } = useClipboard()
6+
const { copy, isSupported } = useClipboard();
77
8-
const toast = useToast()
8+
const toast = useToast();
99
1010
function copyCode() {
11-
copy(props.code)
11+
copy(props.code);
1212
toast.add({
13-
title: 'Copied to clipboard',
14-
color: 'success',
15-
icon: 'ph-check',
16-
})
13+
title: "Copied to clipboard",
14+
color: "success",
15+
icon: "ph-check",
16+
});
1717
}
1818
</script>
1919

packages/app/app/components/Commits.vue

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
<script lang="ts" setup>
2-
import type { RendererObject } from 'marked'
3-
import bash from '@shikijs/langs/bash'
4-
import githubDark from '@shikijs/themes/github-dark'
5-
import githubLight from '@shikijs/themes/github-light'
6-
import { marked } from 'marked'
7-
import { createHighlighterCoreSync, type HighlighterCore } from 'shiki/core'
8-
import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'
2+
import type { RendererObject } from "marked";
3+
import bash from "@shikijs/langs/bash";
4+
import githubDark from "@shikijs/themes/github-dark";
5+
import githubLight from "@shikijs/themes/github-light";
6+
import { marked } from "marked";
7+
import { createHighlighterCoreSync, type HighlighterCore } from "shiki/core";
8+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
99
1010
const props = defineProps<{
11-
owner: string
12-
repo: string
13-
}>()
11+
owner: string;
12+
repo: string;
13+
}>();
1414
15-
const data = await $fetch('/api/repo/commits', {
15+
const data = await $fetch("/api/repo/commits", {
1616
query: {
1717
owner: props.owner,
1818
repo: props.repo,
1919
},
20-
})
20+
});
2121
2222
if (!data) {
23-
throw createError('Could not load Commits')
23+
throw createError("Could not load Commits");
2424
}
2525
26-
const branch = shallowReactive(data)
26+
const branch = shallowReactive(data);
2727
2828
const commitsWithRelease = computed(() =>
2929
branch.target.history.nodes
30-
.filter(commit =>
30+
.filter((commit) =>
3131
commit.statusCheckRollup?.contexts.nodes.some(
32-
context => context.name === 'Continuous Releases',
32+
(context) => context.name === "Continuous Releases",
3333
),
3434
)
35-
.map(commit => ({
35+
.map((commit) => ({
3636
...commit,
3737
release: commit.statusCheckRollup.contexts.nodes.find(
38-
context => context.name === 'Continuous Releases',
38+
(context) => context.name === "Continuous Releases",
3939
)!,
4040
})),
41-
)
41+
);
4242
4343
const selectedCommit = shallowRef<
4444
(typeof commitsWithRelease.value)[number] | null
45-
>(null)
45+
>(null);
4646
4747
// Markdown
4848
4949
// Add target to links
5050
51-
const colorMode = useColorMode()
52-
let shiki: HighlighterCore
51+
const colorMode = useColorMode();
52+
let shiki: HighlighterCore;
5353
5454
onBeforeMount(async () => {
5555
// if (typeof window === 'undefined') {
@@ -62,55 +62,58 @@ onBeforeMount(async () => {
6262
themes: [githubDark, githubLight],
6363
langs: [bash],
6464
engine: createJavaScriptRegexEngine(),
65-
})
65+
});
6666
6767
const renderer: RendererObject = {
6868
link(originalLink) {
69-
const link = marked.Renderer.prototype.link.call(this, originalLink)
70-
return link.replace('<a', '<a target=\'_blank\' rel=\'noreferrer\' class=\'text-primary underline\'')
69+
const link = marked.Renderer.prototype.link.call(this, originalLink);
70+
return link.replace(
71+
"<a",
72+
"<a target='_blank' rel='noreferrer' class='text-primary underline'",
73+
);
7174
},
7275
code({ text }) {
7376
return `<code class="language-bash">${shiki.codeToHtml(text, {
74-
theme: colorMode.preference === 'dark' ? 'github-dark' : 'github-light',
75-
lang: 'bash',
76-
})}</code>`
77+
theme: colorMode.preference === "dark" ? "github-dark" : "github-light",
78+
lang: "bash",
79+
})}</code>`;
7780
},
78-
}
81+
};
7982
80-
marked.use({ renderer })
81-
})
83+
marked.use({ renderer });
84+
});
8285
8386
onBeforeUnmount(() => {
84-
shiki?.dispose()
85-
})
87+
shiki?.dispose();
88+
});
8689
8790
// Pagination
88-
const fetching = ref(false)
89-
const fetchMoreForceDisabled = ref(!commitsWithRelease.value.length)
91+
const fetching = ref(false);
92+
const fetchMoreForceDisabled = ref(!commitsWithRelease.value.length);
9093
9194
async function fetchMore() {
9295
if (!branch.target.history.pageInfo.hasNextPage) {
93-
return
96+
return;
9497
}
9598
9699
if (fetching.value) {
97-
return
100+
return;
98101
}
99102
100103
try {
101-
fetching.value = true
104+
fetching.value = true;
102105
103-
const cursor = branch.target.history.pageInfo.endCursor
106+
const cursor = branch.target.history.pageInfo.endCursor;
104107
105-
const result = await $fetch('/api/repo/commits', {
108+
const result = await $fetch("/api/repo/commits", {
106109
query: {
107110
owner: props.owner,
108111
repo: props.repo,
109112
cursor,
110113
},
111-
})
114+
});
112115
113-
const count = commitsWithRelease.value.length
116+
const count = commitsWithRelease.value.length;
114117
115118
branch.target = {
116119
...branch.target,
@@ -119,14 +122,13 @@ async function fetchMore() {
119122
nodes: [...branch.target.history.nodes, ...result.target.history.nodes],
120123
pageInfo: result.target.history.pageInfo,
121124
},
122-
}
125+
};
123126
124127
if (count === commitsWithRelease.value.length) {
125-
fetchMoreForceDisabled.value = true
128+
fetchMoreForceDisabled.value = true;
126129
}
127-
}
128-
finally {
129-
fetching.value = false
130+
} finally {
131+
fetching.value = false;
130132
}
131133
}
132134
</script>
@@ -196,16 +198,15 @@ async function fetchMore() {
196198
class="flex flex-col items-center gap-4 border border-gray-100 dark:border-gray-800 rounded-xl p-8"
197199
>
198200
<UIcon name="i-ph-crane-tower-light" class="text-6xl opacity-50" />
199-
<p class="text-center text-lg">
200-
No Continuous Releases found
201-
</p>
201+
<p class="text-center text-lg">No Continuous Releases found</p>
202202
<p class="text-center">
203203
Setup continuous releases with
204204
<a
205205
href="https://github.com/stackblitz-labs/pkg.pr.new"
206206
target="_blank"
207207
class="text-primary"
208-
>pkg.pr.new</a>
208+
>pkg.pr.new</a
209+
>
209210
first!
210211
</p>
211212
</div>

packages/app/app/components/GettingStarted.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<GettingStartedStep step="3">
5050
<div>Done! Enjoy continuous releases on your Pull Requests!</div>
5151

52-
<img src="/pr-screenshot.png" alt="PR Screenshot" class="rounded-lg">
52+
<img src="/pr-screenshot.png" alt="PR Screenshot" class="rounded-lg" />
5353
</GettingStartedStep>
5454
</div>
5555
</template>

packages/app/app/components/GettingStartedStep.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup>
22
defineProps<{
3-
step: number | string
4-
}>()
3+
step: number | string;
4+
}>();
55
</script>
66

77
<template>

packages/app/app/components/RepoButton.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script lang="ts" setup>
22
defineProps<{
3-
owner: string
4-
name: string
5-
avatar?: string
6-
}>()
3+
owner: string;
4+
name: string;
5+
avatar?: string;
6+
}>();
77
</script>
88

99
<template>

0 commit comments

Comments
 (0)