Skip to content

Commit 4889958

Browse files
committed
chore: linting
1 parent 25667cc commit 4889958

31 files changed

+128
-233
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
4-
extends: [
5-
'plugin:svelte/recommended',
6-
'plugin:svelte/prettier',
7-
'eslint:recommended',
8-
'plugin:@typescript-eslint/recommended',
9-
'prettier'
10-
],
4+
extends: ['plugin:svelte/recommended', 'plugin:svelte/prettier', 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
115
plugins: ['@typescript-eslint', 'prettier'],
126
ignorePatterns: ['*.cjs'],
137
rules: {
148
'prettier/prettier': 'error',
159
'@typescript-eslint/no-non-null-assertion': 'off',
1610
'svelte/no-at-html-tags': 'off',
17-
'svelte/html-self-closing': 'off'
11+
'svelte/html-self-closing': 'off',
1812
},
1913
parserOptions: {
2014
sourceType: 'module',
21-
ecmaVersion: 2020
15+
ecmaVersion: 2020,
2216
},
2317
overrides: [
2418
{
@@ -27,13 +21,13 @@ module.exports = {
2721

2822
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
2923
parserOptions: {
30-
parser: '@typescript-eslint/parser'
31-
}
32-
}
24+
parser: '@typescript-eslint/parser',
25+
},
26+
},
3327
],
3428
env: {
3529
browser: true,
3630
es2017: true,
37-
node: true
38-
}
31+
node: true,
32+
},
3933
};

mdsvex.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import rehypeAutolinkHeadings from 'rehype-autolink-headings';
55
const config = defineMDSveXConfig({
66
extensions: ['.md', '.svx'],
77
smartypants: {
8-
dashes: 'oldschool'
8+
dashes: 'oldschool',
99
},
1010

1111
rehypePlugins: [
1212
rehypeSlug,
1313
[
1414
rehypeAutolinkHeadings,
1515
{
16-
behavior: 'wrap'
17-
}
18-
]
19-
]
16+
behavior: 'wrap',
17+
},
18+
],
19+
],
2020
});
2121

2222
export default config;

postcss.config.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const config = {
66
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
77
tailwindcss(),
88
//But others, like autoprefixer, need to run after,
9-
autoprefixer
10-
]
9+
autoprefixer,
10+
],
1111
};
1212

1313
module.exports = config;

src/components/art/CommissionCard.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
<div
99
class="flex flex-col overflow-clip rounded-lg border-[1px] border-neutral-300 bg-neutral-100 bg-opacity-70 transition-all hover:scale-[101%] dark:border-neutral-700 dark:bg-neutral-800"
1010
>
11-
<img
12-
src={getURL(commission.images[0])}
13-
alt={commission.title}
14-
class="aspect-square object-cover object-top"
15-
/>
11+
<img src={getURL(commission.images[0])} alt={commission.title} class="aspect-square object-cover object-top" />
1612

1713
<div class="p-4">
1814
<h2 class="font-medium text-blue-400">{commission.title}</h2>

src/components/art/CommissionImage.svelte

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
href={src}
1414
target="_blank"
1515
rel="noopener noreferrer"
16-
class={clsx(
17-
'relative overflow-clip rounded-3xl transition-all hover:scale-[101%] hover:shadow-2xl',
18-
className
19-
)}
16+
class={clsx('relative overflow-clip rounded-3xl transition-all hover:scale-[101%] hover:shadow-2xl', className)}
2017
>
2118
<img {src} alt={title} class="aspect-auto h-full w-full object-cover" />
2219

src/components/art/CommissionPage.svelte

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,17 @@
66
export let commission: CommissionData;
77
</script>
88

9-
<div
10-
class={clsx(
11-
'flex flex-col content-between gap-6',
12-
commission.layout === 'horizontal' ? 'lg:flex-row' : ''
13-
)}
14-
>
9+
<div class={clsx('flex flex-col content-between gap-6', commission.layout === 'horizontal' ? 'lg:flex-row' : '')}>
1510
<div class="flex flex-col gap-6">
1611
<h1 class="text-4xl font-bold">{commission.title}</h1>
1712

1813
<div class="flex flex-row gap-4">
1914
{#if commission.artist.icon}
20-
<img
21-
src={commission.artist.icon}
22-
alt={commission.artist.name}
23-
class="h-12 w-12 rounded-full object-cover"
24-
/>
15+
<img src={commission.artist.icon} alt={commission.artist.name} class="h-12 w-12 rounded-full object-cover" />
2516
{/if}
2617

2718
{#if commission.artist.link}
28-
<a
29-
href={commission.artist.link}
30-
class="group flex flex-col"
31-
target="_blank"
32-
rel="noopener noreferrer"
33-
>
19+
<a href={commission.artist.link} class="group flex flex-col" target="_blank" rel="noopener noreferrer">
3420
<span>By {commission.artist.name}</span>
3521
<IconLink href={commission.artist.link} />
3622
</a>
@@ -53,12 +39,7 @@
5339
<ul class="flex flex-col gap-4 sm:flex-row">
5440
{#each commission.links as link}
5541
<li>
56-
<a
57-
href={link.href}
58-
class="group flex flex-col"
59-
target="_blank"
60-
rel="noopener noreferrer"
61-
>
42+
<a href={link.href} class="group flex flex-col" target="_blank" rel="noopener noreferrer">
6243
<span>{link.text}</span>
6344
<IconLink href={link.href} />
6445
</a>

src/components/base/GradientCanvas.svelte

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@
1414
ctx.fillRect(x, y, 1, 1);
1515
};
1616
17-
const calcR = (x: number, y: number, t: number) =>
18-
Math.floor(192 + 64 * Math.cos((x * x - y * y) / 300 + t));
17+
const calcR = (x: number, y: number, t: number) => Math.floor(192 + 64 * Math.cos((x * x - y * y) / 300 + t));
1918
20-
const calcG = (x: number, y: number, t: number) =>
21-
Math.floor(70 + (64 * (x * x * Math.cos(t / 4) + y * y * Math.sin(t / 3))) / 300);
19+
const calcG = (x: number, y: number, t: number) => Math.floor(70 + (64 * (x * x * Math.cos(t / 4) + y * y * Math.sin(t / 3))) / 300);
2220
2321
const calcB = (x: number, y: number, t: number) =>
24-
Math.floor(
25-
192 +
26-
64 *
27-
Math.sin(5 * Math.sin(t / 9) + ((x - 100) * (x - 100) + (y - 100) * (y - 100)) / 1100)
28-
);
22+
Math.floor(192 + 64 * Math.sin(5 * Math.sin(t / 9) + ((x - 100) * (x - 100) + (y - 100) * (y - 100)) / 1100));
2923
3024
const draw = () => {
3125
for (let x = 0; x <= 35; x++) {
@@ -46,9 +40,4 @@
4640
});
4741
</script>
4842

49-
<canvas
50-
bind:this={canvas}
51-
width="32"
52-
height="32"
53-
class="h-full w-full opacity-0 transition-all duration-500"
54-
/>
43+
<canvas bind:this={canvas} width="32" height="32" class="h-full w-full opacity-0 transition-all duration-500" />

src/components/base/NavBar.svelte

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111
}[] = [
1212
{ label: 'Home', to: '/', mode: 'exact' },
1313
{ label: 'Art', to: '/art' },
14-
{ label: 'Blog', to: '/blog' }
14+
{ label: 'Blog', to: '/blog' },
1515
];
1616
</script>
1717

1818
<div class="flex flex-row justify-between">
1919
<div class="flex flex-row items-center gap-6">
20-
<img
21-
src="https://avatars.githubusercontent.com/u/23714764?v=4"
22-
alt="Stella"
23-
class="h-10 w-10 rounded-full"
24-
/>
20+
<img src="https://avatars.githubusercontent.com/u/23714764?v=4" alt="Stella" class="h-10 w-10 rounded-full" />
2521

2622
{#each links as { label, to, mode }}
2723
<NavLink {to} {mode}>{label}</NavLink>

src/components/generic/IconLink.svelte

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66
export let suffix: string | undefined = `${domain} →`;
77
</script>
88

9-
<div
10-
class="flex flex-row items-center gap-1 text-neutral-400 transition-all group-hover:text-neutral-200"
11-
>
9+
<div class="flex flex-row items-center gap-1 text-neutral-400 transition-all group-hover:text-neutral-200">
1210
{#if prefix}<span>{prefix}</span>{/if}
13-
<img
14-
src={`https://www.google.com/s2/favicons?domain=${domain}&sz=64`}
15-
alt={domain}
16-
class="h-4 w-4 object-cover"
17-
/>
11+
<img src={`https://www.google.com/s2/favicons?domain=${domain}&sz=64`} alt={domain} class="h-4 w-4 object-cover" />
1812
{#if suffix}<span>{suffix}</span>{/if}
1913
</div>

src/components/home/Client.svelte

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
<script lang="ts">
2-
import type {
3-
DateProperty,
4-
NotionPage,
5-
RichTextProperty,
6-
TitleProperty,
7-
UrlProperty
8-
} from '$lib/notion';
2+
import type { DateProperty, NotionPage, RichTextProperty, TitleProperty, UrlProperty } from '$lib/notion';
93
import NotionRichText from '$lib/notion/blocks/NotionRichText.svelte';
104
115
export let client: NotionPage;
@@ -21,7 +15,7 @@
2115
const formatDate = (date: Date) =>
2216
date.toLocaleDateString('en-US', {
2317
month: 'long',
24-
year: 'numeric'
18+
year: 'numeric',
2519
});
2620
2721
const start = formatDate(new Date(date.date.start));
@@ -34,11 +28,7 @@
3428
>
3529
{#if client.cover}
3630
<div class="relative">
37-
<img
38-
src={client.cover[client.cover.type].url}
39-
class="h-40 w-full object-cover"
40-
alt="Company cover"
41-
/>
31+
<img src={client.cover[client.cover.type].url} class="h-40 w-full object-cover" alt="Company cover" />
4232

4333
{#if client.icon}
4434
<img

0 commit comments

Comments
 (0)