feat: update deps, replace radix and balancer

chore(deps): update dependency eslint to v9

Update linting workflow and scripts
This commit is contained in:
Bart van der Braak 2024-04-20 20:38:47 +02:00
parent 31bb213b5a
commit c985f1c407
12 changed files with 441 additions and 674 deletions

View file

@ -31,8 +31,5 @@ jobs:
- name: Install Node.js dependencies
run: pnpm install --frozen-lockfile
- name: Run linters
uses: wearerequired/lint-action@v2.3.0
with:
eslint: true
prettier: true
- name: Run linting
run: pnpm run lint-ci

View file

@ -10,53 +10,53 @@
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"lint-ci": "prettier --check . && eslint . --no-fix --max-warnings=0",
"format": "prettier --write .",
"prepare": "npx husky && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/adapter-vercel": "^5.1.0",
"@sveltejs/adapter-vercel": "^5.3.0",
"@sveltejs/enhanced-img": "^0.2.0",
"@sveltejs/kit": "^2.4.3",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/eslint": "^8.56.10",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"lint-staged": "^15.2.0",
"postcss": "^8.4.33",
"postcss-load-config": "^5.0.2",
"prettier": "^3.2.4",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"svelte": "^4.2.9",
"svelte-check": "^3.6.3",
"tailwindcss": "^3.4.1",
"eslint-plugin-svelte": "^2.37.0",
"lint-staged": "^15.2.2",
"postcss": "^8.4.38",
"postcss-load-config": "^5.0.3",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.14",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.0.12"
"typescript": "^5.4.5",
"vite": "^5.2.10"
},
"dependencies": {
"@resvg/resvg-js": "^2.6.0",
"@types/node": "^20.11.5",
"@vercel/analytics": "^1.1.2",
"@vercel/speed-insights": "^1.0.6",
"bits-ui": "^0.21.0",
"@resvg/resvg-js": "^2.6.2",
"@types/node": "^20.12.7",
"@vercel/analytics": "^1.2.2",
"@vercel/speed-insights": "^1.0.10",
"bits-ui": "^0.21.4",
"clsx": "^2.1.0",
"lucide-svelte": "^0.367.0",
"mode-watcher": "^0.3.0",
"radix-icons-svelte": "^1.2.1",
"satori": "^0.10.11",
"satori": "^0.10.13",
"satori-html": "^0.3.2",
"svelte-wrap-balancer": "^0.0.4",
"tailwind-merge": "^2.2.0",
"tailwind-variants": "^0.2.0"
"tailwind-merge": "^2.3.0",
"tailwind-variants": "^0.2.1"
},
"lint-staged": {
"*.{js,ts,svelte,css,scss,postcss,md,json}": [
"prettier --write --plugin-search-dir=.",
"prettier --check --plugin-search-dir=."
"prettier --write",
"prettier --check"
],
"*.{js,ts,svelte}": "eslint"
}

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,14 @@
<svg viewBox="0 0 24 24" {...$$restProps}>
<path d="M0 0h24v24H0z" />
<path d="M3 19h18l-9 -15z" />
</svg>
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$restProps}
><path
d="M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z"
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
></path></svg
>

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,16 +1,18 @@
import type { Icon as LucideIcon } from 'lucide-svelte';
import { GithubLogo, VercelLogo, LinkedinLogo } from 'radix-icons-svelte';
import Logo from './logo.svelte';
import Svelte from './svelte.svelte';
import LogoIcon from '$lib/assets/logo-icon.png';
import Github from './github.svelte';
import Svelte from './svelte.svelte';
import Vercel from './vercel.svelte';
import LinkedIn from './linkedin.svelte';
export type Icon = LucideIcon;
export const Icons = {
logo: Logo,
logoIcon: LogoIcon,
gitHub: GithubLogo,
gitHub: Github,
svelte: Svelte,
vercel: VercelLogo,
linkedIn: LinkedinLogo
vercel: Vercel,
linkedIn: LinkedIn
};

View file

@ -0,0 +1,14 @@
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$restProps}
><path
d="M2 1C1.44772 1 1 1.44772 1 2V13C1 13.5523 1.44772 14 2 14H13C13.5523 14 14 13.5523 14 13V2C14 1.44772 13.5523 1 13 1H2ZM3.05 6H4.95V12H3.05V6ZM5.075 4.005C5.075 4.59871 4.59371 5.08 4 5.08C3.4063 5.08 2.925 4.59871 2.925 4.005C2.925 3.41129 3.4063 2.93 4 2.93C4.59371 2.93 5.075 3.41129 5.075 4.005ZM12 8.35713C12 6.55208 10.8334 5.85033 9.67449 5.85033C9.29502 5.83163 8.91721 5.91119 8.57874 6.08107C8.32172 6.21007 8.05265 6.50523 7.84516 7.01853H7.79179V6.00044H6V12.0047H7.90616V8.8112C7.8786 8.48413 7.98327 8.06142 8.19741 7.80987C8.41156 7.55832 8.71789 7.49825 8.95015 7.46774H9.02258C9.62874 7.46774 10.0786 7.84301 10.0786 8.78868V12.0047H11.9847L12 8.35713Z"
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
></path></svg
>

After

Width:  |  Height:  |  Size: 885 B

View file

@ -1,15 +1,9 @@
<svg
class="inline-svg"
stroke="currentColor"
fill="currentColor"
stroke-width="0"
role="img"
viewBox="0 0 24 24"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
{...$$restProps}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...$$restProps}
><path
d="M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"
d="M416.9 93.1c-41.1-58.9-122.4-76.3-181.2-38.9L132.5 120c-28.2 17.7-47.6 46.5-53.5 79.3-4.9 27.3-.6 55.5 12.3 80-8.8 13.4-14.9 28.5-17.7 44.2-5.9 33.4 1.8 67.8 21.6 95.4 41.2 58.9 122.4 76.3 181.2 38.9L379.6 392c28.2-17.7 47.6-46.5 53.5-79.3 4.9-27.3.6-55.5-12.3-80 8.8-13.4 14.9-28.4 17.7-44.2 5.8-33.4-1.9-67.8-21.6-95.4"
style="fill:#ff3e00"
/><path
d="M225.6 424.5c-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4.6-3.3 1.4-6.5 2.5-9.6l1.9-5.9 5.3 3.9c12.2 9 25.9 15.8 40.4 20.2l3.8 1.2-.4 3.8c-.5 5.4 1 10.9 4.2 15.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8l103.2-65.8c5.1-3.2 8.6-8.4 9.7-14.4 1.1-6.1-.3-12.3-3.9-17.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8L252 291c-6.5 4.1-13.5 7.2-21 9.2-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4 3.5-19.7 15.2-37 32.2-47.7l103.2-65.8c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-.6 3.3-1.4 6.5-2.5 9.6L383 193l-5.3-3.9c-12.2-9-25.9-15.8-40.4-20.2l-3.8-1.2.4-3.8c.5-5.4-1-10.9-4.2-15.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8l-103.2 65.8c-5.1 3.2-8.6 8.4-9.7 14.4-1.1 6.1.3 12.3 3.9 17.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8L260 221c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-3.5 19.7-15.2 37-32.2 47.7l-103.2 65.8c-6.5 4.1-13.6 7.2-21 9.2"
style="fill:#fff"
/></svg
>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,4 +1,14 @@
<svg viewBox="0 0 24 24" {...$$restProps}>
<path stroke="none" d="M0 0h24v24H0z" />
<path d="M3 19h18l-9 -15z" />
</svg>
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$restProps}
><path
d="M7.49998 1L6.92321 2.00307L1.17498 12L0.599976 13H1.7535H13.2464H14.4L13.825 12L8.07674 2.00307L7.49998 1ZM7.49998 3.00613L2.3285 12H12.6714L7.49998 3.00613Z"
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
></path></svg
>

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 373 B

View file

@ -1,6 +1,6 @@
<script lang="ts">
import * as Sheet from '$lib/components/ui/sheet/';
import { HamburgerMenu } from 'radix-icons-svelte';
import { Menu } from 'lucide-svelte';
import { Button } from '$lib/components/ui/button';
import { navConfig } from '$lib/config/nav';
import { siteConfig } from '$lib/config/site';
@ -17,7 +17,7 @@
variant="ghost"
class="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
>
<HamburgerMenu class="h-5 w-5" />
<Menu class="h-5 w-5" />
<span class="sr-only">Toggle Menu</span>
</Button>
</Sheet.Trigger>

View file

@ -1,5 +1,4 @@
<script lang="ts">
import Balancer from 'svelte-wrap-balancer';
import { cn } from '$lib/utils';
let className: string | undefined | null = undefined;
@ -7,10 +6,11 @@
</script>
<p
class={cn('max-w-[750px] text-center text-lg text-muted-foreground sm:text-xl', className)}
class={cn(
'max-w-[750px] text-balance text-center text-lg text-muted-foreground sm:text-xl',
className
)}
{...$$restProps}
>
<Balancer>
<slot />
</Balancer>
</p>

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { Circle, GithubLogo, Globe } from 'radix-icons-svelte';
import { Circle, Globe } from 'lucide-svelte';
import { Icons } from '$lib/components/site/icons';
import { Calendar, Scale } from 'lucide-svelte';
import * as Card from '$lib/components/ui/card';
import type { Project } from '$lib/content/projects';
@ -43,12 +44,12 @@
<div class="flex items-center">
{#if gitHubUrl}
<Button variant="ghost" size="icon" href={gitHubUrl} target="_blank">
<GithubLogo />
<Icons.gitHub />
</Button>
{/if}
{#if projectUrl}
<Button variant="ghost" size="icon" href={projectUrl} target="_blank">
<Globe />
<Globe class="h-[1rem] w-[1rem]" />
</Button>
{/if}
</div>

View file

@ -1,8 +1,7 @@
<script lang="ts">
import { Blocks, Cloud } from 'lucide-svelte';
import { Blocks, Cloud, CodeXml } from 'lucide-svelte';
import { siteConfig } from '$lib/config/site';
import Separator from '$lib/components/ui/separator/separator.svelte';
import { Code } from 'radix-icons-svelte';
</script>
<footer class="container py-6">
@ -38,7 +37,7 @@
<Separator orientation="vertical" />
<div>
<span class="hidden sm:inline">Source code at</span>
<Code class="inline h-[1rem] w-[1rem] sm:hidden" />
<CodeXml class="inline h-[1rem] w-[1rem] sm:hidden" />
<a
href={siteConfig.links.gitHubProject}
target="_blank"