Skip to content

Commit 26787a3

Browse files
committed
chore: linting
1 parent d698152 commit 26787a3

File tree

101 files changed

+604
-682
lines changed

Some content is hidden

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

101 files changed

+604
-682
lines changed

components.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"$schema": "https://shadcn-svelte.com/schema.json",
3-
"style": "default",
4-
"tailwind": {
5-
"config": "tailwind.config.js",
6-
"css": "src/app.postcss",
7-
"baseColor": "gray"
8-
},
9-
"aliases": {
10-
"components": "$lib/components",
11-
"utils": "$lib/utils"
12-
}
13-
}
2+
"$schema": "https://shadcn-svelte.com/schema.json",
3+
"style": "default",
4+
"tailwind": {
5+
"config": "tailwind.config.js",
6+
"css": "src/app.postcss",
7+
"baseColor": "gray"
8+
},
9+
"aliases": {
10+
"components": "$lib/components",
11+
"utils": "$lib/utils"
12+
}
13+
}

src/app.postcss

+72-72
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
4+
55
@layer base {
6-
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 224 71.4% 4.1%;
9-
10-
--muted: 220 14.3% 95.9%;
11-
--muted-foreground: 220 8.9% 46.1%;
12-
13-
--popover: 0 0% 100%;
14-
--popover-foreground: 224 71.4% 4.1%;
15-
16-
--card: 0 0% 100%;
17-
--card-foreground: 224 71.4% 4.1%;
18-
19-
--border: 220 13% 91%;
20-
--input: 220 13% 91%;
21-
22-
--primary: 220.9 39.3% 11%;
23-
--primary-foreground: 210 20% 98%;
24-
25-
--secondary: 220 14.3% 95.9%;
26-
--secondary-foreground: 220.9 39.3% 11%;
27-
28-
--accent: 220 14.3% 95.9%;
29-
--accent-foreground: 220.9 39.3% 11%;
30-
31-
--destructive: 0 84.2% 60.2%;
32-
--destructive-foreground: 210 20% 98%;
33-
34-
--ring: 224 71.4% 4.1%;
35-
36-
--radius: 0.5rem;
37-
}
38-
39-
.dark {
40-
--background: 224 71.4% 4.1%;
41-
--foreground: 210 20% 98%;
42-
43-
--muted: 215 27.9% 16.9%;
44-
--muted-foreground: 217.9 10.6% 64.9%;
45-
46-
--popover: 224 71.4% 4.1%;
47-
--popover-foreground: 210 20% 98%;
48-
49-
--card: 224 71.4% 4.1%;
50-
--card-foreground: 210 20% 98%;
51-
52-
--border: 215 27.9% 16.9%;
53-
--input: 215 27.9% 16.9%;
54-
55-
--primary: 210 20% 98%;
56-
--primary-foreground: 220.9 39.3% 11%;
57-
58-
--secondary: 215 27.9% 16.9%;
59-
--secondary-foreground: 210 20% 98%;
60-
61-
--accent: 215 27.9% 16.9%;
62-
--accent-foreground: 210 20% 98%;
63-
64-
--destructive: 0 62.8% 30.6%;
65-
--destructive-foreground: 210 20% 98%;
66-
67-
--ring: 216 12.2% 83.9%;
68-
}
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 224 71.4% 4.1%;
9+
10+
--muted: 220 14.3% 95.9%;
11+
--muted-foreground: 220 8.9% 46.1%;
12+
13+
--popover: 0 0% 100%;
14+
--popover-foreground: 224 71.4% 4.1%;
15+
16+
--card: 0 0% 100%;
17+
--card-foreground: 224 71.4% 4.1%;
18+
19+
--border: 220 13% 91%;
20+
--input: 220 13% 91%;
21+
22+
--primary: 220.9 39.3% 11%;
23+
--primary-foreground: 210 20% 98%;
24+
25+
--secondary: 220 14.3% 95.9%;
26+
--secondary-foreground: 220.9 39.3% 11%;
27+
28+
--accent: 220 14.3% 95.9%;
29+
--accent-foreground: 220.9 39.3% 11%;
30+
31+
--destructive: 0 84.2% 60.2%;
32+
--destructive-foreground: 210 20% 98%;
33+
34+
--ring: 224 71.4% 4.1%;
35+
36+
--radius: 0.5rem;
37+
}
38+
39+
.dark {
40+
--background: 224 71.4% 4.1%;
41+
--foreground: 210 20% 98%;
42+
43+
--muted: 215 27.9% 16.9%;
44+
--muted-foreground: 217.9 10.6% 64.9%;
45+
46+
--popover: 224 71.4% 4.1%;
47+
--popover-foreground: 210 20% 98%;
48+
49+
--card: 224 71.4% 4.1%;
50+
--card-foreground: 210 20% 98%;
51+
52+
--border: 215 27.9% 16.9%;
53+
--input: 215 27.9% 16.9%;
54+
55+
--primary: 210 20% 98%;
56+
--primary-foreground: 220.9 39.3% 11%;
57+
58+
--secondary: 215 27.9% 16.9%;
59+
--secondary-foreground: 210 20% 98%;
60+
61+
--accent: 215 27.9% 16.9%;
62+
--accent-foreground: 210 20% 98%;
63+
64+
--destructive: 0 62.8% 30.6%;
65+
--destructive-foreground: 210 20% 98%;
66+
67+
--ring: 216 12.2% 83.9%;
68+
}
6969
}
70-
70+
7171
@layer base {
72-
* {
73-
@apply border-border;
74-
}
75-
body {
76-
@apply bg-background text-foreground;
77-
}
78-
}
72+
* {
73+
@apply border-border;
74+
}
75+
body {
76+
@apply bg-background text-foreground;
77+
}
78+
}

src/hooks.server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { Handle } from '@sveltejs/kit';
22
import { sequence } from '@sveltejs/kit/hooks';
3-
import { redirect, error } from '@sveltejs/kit';
3+
import { redirect } from '@sveltejs/kit';
44

55
const protectRoutes: Handle = async ({ event, resolve }) => {
66
if (event.url.pathname.startsWith('/app') || event.url.pathname.startsWith('/api/app')) {
7-
let refreshToken = event.cookies.get('refreshToken') ?? '';
7+
const refreshToken = event.cookies.get('refreshToken') ?? '';
88
if (refreshToken === '') {
99
throw redirect(303, '/');
1010
}

src/lib/Header.svelte

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// Header for (marketing) group
33
</script>
44

5-
<div class="p-8 md:px-24 lg:px-32 flex flex-col gap-1 w-full items-center justify-center text-gray-600 dark:text-gray-400">
5+
<div
6+
class="p-8 md:px-24 lg:px-32 flex flex-col gap-1 w-full items-center justify-center text-gray-600 dark:text-gray-400"
7+
>
68
<p>
79
Made with &hearts; by <a
810
href="https://github.com/ayushsehrawat"

src/lib/app/helpers.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ export function organizeVideosBySeason(videos: VideoType[]) {
8686
const seasonsDict: SeasonDictType = {};
8787

8888
videos.forEach((video) => {
89-
let seasonNum = video.season;
90-
91-
/*if (seasonNum === 0) {
92-
seasonNum = 'Specials';
93-
}*/
89+
const seasonNum = video.season;
9490

9591
if (!seasonsDict[seasonNum]) {
9692
seasonsDict[seasonNum] = [];

src/lib/app/types.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export type DownloadsType = {
2525
};
2626

2727
export interface TorrentsType {
28-
added: string;
29-
bytes: number;
30-
ended: string | null | undefined;
31-
filename: string;
32-
hash: string;
33-
host: string;
34-
id: string;
35-
links: string[];
36-
progress: number | null | undefined;
37-
split: number;
38-
status: string;
39-
}
28+
added: string;
29+
bytes: number;
30+
ended: string | null | undefined;
31+
filename: string;
32+
hash: string;
33+
host: string;
34+
id: string;
35+
links: string[];
36+
progress: number | null | undefined;
37+
split: number;
38+
status: string;
39+
}

src/lib/components/Logout.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
import { goto } from '$app/navigation';
33
import * as AlertDialog from '$lib/components/ui/alert-dialog';
44
import { Button } from '$lib/components/ui/button';
5-
import { Loader2 } from 'lucide-svelte';
65
import { LogOut } from 'lucide-svelte';
76
87
async function logout() {
98
const res = await fetch('/api/logout');
109
const data = await res.json();
1110
12-
if (data.hasOwnProperty('success')) {
11+
if ('success' in data) {
1312
goto('/', { invalidateAll: true });
1413
} else {
1514
alert('Error logging out..');

src/lib/components/ui/alert-dialog/alert-dialog-action.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script lang="ts">
2-
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
3-
import { buttonVariants } from "$lib/components/ui/button";
4-
import { cn } from "$lib/utils";
2+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3+
import { buttonVariants } from '$lib/components/ui/button';
4+
import { cn } from '$lib/utils';
55
66
type $$Props = AlertDialogPrimitive.ActionProps;
77
type $$Events = AlertDialogPrimitive.ActionEvents;
88
9-
let className: $$Props["class"] = undefined;
9+
let className: $$Props['class'] = undefined;
1010
export { className as class };
1111
</script>
1212

src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
<script lang="ts">
2-
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
3-
import { buttonVariants } from "$lib/components/ui/button";
4-
import { cn } from "$lib/utils";
2+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3+
import { buttonVariants } from '$lib/components/ui/button';
4+
import { cn } from '$lib/utils';
55
66
type $$Props = AlertDialogPrimitive.CancelProps;
77
type $$Events = AlertDialogPrimitive.CancelEvents;
88
9-
let className: $$Props["class"] = undefined;
9+
let className: $$Props['class'] = undefined;
1010
export { className as class };
1111
</script>
1212

1313
<AlertDialogPrimitive.Cancel
14-
class={cn(
15-
buttonVariants({ variant: "outline" }),
16-
"mt-2 sm:mt-0",
17-
className
18-
)}
14+
class={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)}
1915
{...$$restProps}
2016
on:click
2117
on:keydown

src/lib/components/ui/alert-dialog/alert-dialog-content.svelte

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<script lang="ts">
2-
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
3-
import * as AlertDialog from ".";
4-
import { cn, flyAndScale } from "$lib/utils";
2+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3+
import * as AlertDialog from '.';
4+
import { cn, flyAndScale } from '$lib/utils';
55
66
type $$Props = AlertDialogPrimitive.ContentProps;
77
8-
export let transition: $$Props["transition"] = flyAndScale;
9-
export let transitionConfig: $$Props["transitionConfig"] = undefined;
8+
export let transition: $$Props['transition'] = flyAndScale;
9+
export let transitionConfig: $$Props['transitionConfig'] = undefined;
1010
11-
let className: $$Props["class"] = undefined;
11+
let className: $$Props['class'] = undefined;
1212
export { className as class };
1313
</script>
1414

@@ -18,7 +18,7 @@
1818
{transition}
1919
{transitionConfig}
2020
class={cn(
21-
"fixed left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full",
21+
'fixed left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full',
2222
className
2323
)}
2424
{...$$restProps}

src/lib/components/ui/alert-dialog/alert-dialog-description.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script lang="ts">
2-
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
3-
import { cn } from "$lib/utils";
2+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3+
import { cn } from '$lib/utils';
44
55
type $$Props = AlertDialogPrimitive.DescriptionProps;
66
7-
let className: $$Props["class"] = undefined;
7+
let className: $$Props['class'] = undefined;
88
export { className as class };
99
</script>
1010

1111
<AlertDialogPrimitive.Description
12-
class={cn("text-sm text-muted-foreground", className)}
12+
class={cn('text-sm text-muted-foreground', className)}
1313
{...$$restProps}
1414
>
1515
<slot />

src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<script lang="ts">
2-
import { cn } from "$lib/utils";
3-
import type { HTMLAttributes } from "svelte/elements";
2+
import { cn } from '$lib/utils';
3+
import type { HTMLAttributes } from 'svelte/elements';
44
55
type $$Props = HTMLAttributes<HTMLDivElement>;
66
7-
let className: $$Props["class"] = undefined;
7+
let className: $$Props['class'] = undefined;
88
export { className as class };
99
</script>
1010

1111
<div
12-
class={cn(
13-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
14-
className
15-
)}
12+
class={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}
1613
{...$$restProps}
1714
>
1815
<slot />
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
<script lang="ts">
2-
import { cn } from "$lib/utils";
3-
import type { HTMLAttributes } from "svelte/elements";
2+
import { cn } from '$lib/utils';
3+
import type { HTMLAttributes } from 'svelte/elements';
44
55
type $$Props = HTMLAttributes<HTMLDivElement>;
66
7-
let className: $$Props["class"] = undefined;
7+
let className: $$Props['class'] = undefined;
88
export { className as class };
99
</script>
1010

11-
<div
12-
class={cn("flex flex-col space-y-2 text-center sm:text-left", className)}
13-
{...$$restProps}
14-
>
11+
<div class={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...$$restProps}>
1512
<slot />
1613
</div>

0 commit comments

Comments
 (0)