Skip to content

Commit 2a308f2

Browse files
committed
update linting and fix dead links
1 parent a07db3a commit 2a308f2

File tree

17 files changed

+75
-63
lines changed

17 files changed

+75
-63
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ on:
99

1010
jobs:
1111
tests:
12-
uses: janosh/workflows/.github/workflows/npm-test-release.yml@main
12+
uses: janosh/workflows/.github/workflows/npm-test.yml@main
1313
with:
1414
working-directory: site

.pre-commit-config.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ci:
22
autoupdate_schedule: quarterly
33
skip: [eslint]
44

5-
default_stages: [commit]
5+
default_stages: [pre-commit]
66

77
default_install_hook_types: [pre-commit, commit-msg]
88

@@ -37,7 +37,7 @@ repos:
3737
args: [--config-file, .github/yamllint.yml]
3838

3939
- repo: https://github.com/igorshubovych/markdownlint-cli
40-
rev: v0.42.0
40+
rev: v0.44.0
4141
hooks:
4242
- id: markdownlint
4343
# MD013: line too long
@@ -46,26 +46,28 @@ repos:
4646
args: [--disable, MD013, MD033, MD041, '--']
4747

4848
- repo: https://github.com/codespell-project/codespell
49-
rev: v2.3.0
49+
rev: v2.4.1
5050
hooks:
5151
- id: codespell
5252
exclude: ^site/src/sites.yml$
5353
args: [--ignore-words-list, 'ons,linz', --check-filenames]
54-
stages: [commit, commit-msg]
54+
stages: [pre-commit, commit-msg]
5555

5656
- repo: https://github.com/pre-commit/mirrors-eslint
57-
rev: v9.15.0
57+
rev: v9.19.0
5858
hooks:
5959
- id: eslint
6060
types: [file]
6161
args: [--fix, --config, site/eslint.config.js]
6262
files: \.(js|ts|svelte)$
6363
additional_dependencies:
64+
- 'typescript-eslint'
6465
- eslint
6566
- eslint-plugin-svelte
67+
- globals
6668
- svelte
6769
- typescript
68-
- typescript-eslint
70+
- '@stylistic/eslint-plugin'
6971

7072
- repo: local
7173
hooks:

readme.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
5959
uses: [PNPM], [TypeScript], [Tailwind], [sveltekit-i18n], [PostCSS], [Husky]
6060

6161
1. **[Official SvelteKit docs](https://kit.svelte.dev)** 
62-
[[code](https://github.com/sveltejs/kit/blob/-/sites/kit.svelte.dev)] 
62+
[[code](https://github.com/sveltejs/kit/tree/main/documentation/docs)] 
6363
<a href="https://github.com/sveltejs/kit/stargazers">
6464
<img src="https://img.shields.io/github/stars/sveltejs/kit?logo=github" alt="GitHub stars" valign="middle">
6565
</a>
@@ -109,7 +109,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
109109
uses: [Vitest], [PostCSS], [highlight.js], [Tailwind], [Typescript], [jsdom]
110110

111111
1. **[shadcn-svelte](https://shadcn-svelte.com)**&nbsp;
112-
[[code](https://github.com/huntabyte/shadcn-svelte/blob/-/apps/www)]&ensp;
112+
[[code](https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs)]&ensp;
113113
<a href="https://github.com/huntabyte/shadcn-svelte/stargazers">
114114
<img src="https://img.shields.io/github/stars/huntabyte/shadcn-svelte?logo=github" alt="GitHub stars" valign="middle">
115115
</a>
@@ -188,7 +188,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
188188

189189
uses: [TypeScript], [Three.js], [Tailwind], [PostCSS], [Algolia], [Iconify]
190190

191-
1. **[svelte-realworld](https://realworld.svelte.dev)**&nbsp;
191+
1. **[svelte-realworld](https://github.com/gothinkster/realworld)**&nbsp;
192192
[[code](https://github.com/sveltejs/realworld)]&ensp;
193193
<a href="https://github.com/sveltejs/realworld/stargazers">
194194
<img src="https://img.shields.io/github/stars/sveltejs/realworld?logo=github" alt="GitHub stars" valign="middle">
@@ -324,7 +324,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
324324
<img src="https://img.shields.io/github/stars/kbrgl/svelte-french-toast?logo=github" alt="GitHub stars" valign="middle">
325325
</a>
326326

327-
Svelte port of Timo Lins&#39; react-hot-toast, a lightweight, customizable toast notification library.<br>
327+
Svelte port of react-hot-toast, a lightweight, customizable toast notification library.<br>
328328

329329
uses: [TypeScript], [Prism], [Tailwind], [PostCSS], [PNPM]
330330

@@ -348,7 +348,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
348348

349349
uses: [TypeScript], [tRPC]
350350

351-
1. **[Cryptgeon](https://cryptgeon.nicco.io)**&nbsp;
351+
1. **[Cryptgeon](https://cryptgeon.org)**&nbsp;
352352
[[code](https://github.com/cupcakearmy/cryptgeon/blob/-/packages/frontend)]&ensp;
353353
<a href="https://github.com/cupcakearmy/cryptgeon/stargazers">
354354
<img src="https://img.shields.io/github/stars/cupcakearmy/cryptgeon?logo=github" alt="GitHub stars" valign="middle">
@@ -468,7 +468,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
468468

469469
uses: [GitHub API], [Monaco], [Playwright], [Google Analytics], [Supabase], [Vercel], [PNPM], [Sass], [TypeScript], [remark], [rehype]
470470

471-
1. **[Watch This](https://what-to-watch-roan.vercel.app)**&nbsp;
471+
1. **[Watch This](https://github.com/StephDietz/watch-this/issues/28)**&nbsp;
472472
[[code](https://github.com/StephDietz/watch-this)]&ensp;
473473
<a href="https://github.com/StephDietz/watch-this/stargazers">
474474
<img src="https://img.shields.io/github/stars/StephDietz/watch-this?logo=github" alt="GitHub stars" valign="middle">
@@ -558,6 +558,16 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
558558

559559
uses: [Vitest], [Playwright], [Typescript], [PNPM], [pre-commit], [rehype], [jsdom], [GitHub Pages], [mdsvexamples]
560560

561+
1. **[Scientific Diagrams](https://janosh.github.io/diagrams)**&nbsp;
562+
[[code](https://github.com/janosh/diagrams)]&ensp;
563+
<a href="https://github.com/janosh/diagrams/stargazers">
564+
<img src="https://img.shields.io/github/stars/janosh/diagrams?logo=github" alt="GitHub stars" valign="middle">
565+
</a>
566+
567+
100+ MIT-licensed scientific diagrams created with CeTZ (Typst) and/or TikZ (LaTeX). Mostly about physics, chemistry, and machine learning.<br>
568+
569+
uses: [TypeScript], [svelte-multiselect], [pre-commit], [PNPM], [svelte-enhanced-img]
570+
561571
1. **[SvelteKit on Edge](https://sveltekit-on-the-edge.vercel.app)**&nbsp;
562572
[[code](https://github.com/Rich-Harris/sveltekit-on-the-edge)]&ensp;
563573
<a href="https://github.com/Rich-Harris/sveltekit-on-the-edge/stargazers">
@@ -598,16 +608,6 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
598608

599609
uses: [TypeScript], [PNPM], [Vercel], [MDsveX], [Tailwind], [PostCSS], [Husky], [Playwright], [DaisyUI]
600610

601-
1. **[TikZ](https://janosh.github.io/tikz)**&nbsp;
602-
[[code](https://github.com/janosh/tikz)]&ensp;
603-
<a href="https://github.com/janosh/tikz/stargazers">
604-
<img src="https://img.shields.io/github/stars/janosh/tikz?logo=github" alt="GitHub stars" valign="middle">
605-
</a>
606-
607-
Random collection of MIT-licensed standalone TikZ images, mostly about physics and machine learning.<br>
608-
609-
uses: [TypeScript], [svelte-multiselect], [pre-commit], [PNPM], [GitHub Pages]
610-
611611
1. **[Hexapipes](https://hexapipes.vercel.app)**&nbsp;
612612
[[code](https://github.com/gereleth/hexapipes)]&ensp;
613613
<a href="https://github.com/gereleth/hexapipes/stargazers">
@@ -971,6 +971,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
971971
[superforms]: https://github.com/ciscoheat/sveltekit-superforms
972972
[surge.sh]: https://surge.sh
973973
[svelte forms lib]: https://github.com/tjinauyeung/svelte-forms-lib
974+
[svelte-enhanced-img]: https://svelte.dev/docs/kit/images#sveltejs-enhanced-img
974975
[svelte-highlight]: https://github.com/metonym/svelte-highlight
975976
[svelte-intl-precompile]: https://github.com/cibernox/svelte-intl-precompile
976977
[svelte-markdown]: https://github.com/pablo-abc/svelte-markdown

site/eslint.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
import stylistic from '@stylistic/eslint-plugin'
12
import svelte from 'eslint-plugin-svelte'
23
import tslint from 'typescript-eslint'
34

4-
/** @type { import("eslint").Linter.FlatConfig[] } */
5+
/** @type { import("eslint").Linter.Config[] } */
56
export default [
67
...tslint.configs.recommended,
78
...svelte.configs[`flat/recommended`],
9+
{ plugins: { '@stylistic': stylistic } },
810
{
911
rules: {
1012
'@typescript-eslint/no-unused-vars': [
1113
`error`,
1214
{ argsIgnorePattern: `^_`, varsIgnorePattern: `^_` },
1315
],
14-
'@typescript-eslint/quotes': [`error`, `backtick`, { avoidEscape: true }],
16+
'@stylistic/quotes': [`error`, `backtick`, { avoidEscape: true }],
1517
'svelte/no-at-html-tags': `off`,
1618
},
1719
},
@@ -27,6 +29,6 @@ export default [
2729
},
2830
},
2931
{
30-
ignores: [`build/`],
32+
ignores: [`build/`, `.svelte-kit/`, `package/`],
3133
},
3234
]

site/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@iconify/svelte": "^4.0.2",
2121
"@playwright/test": "^1.47.1",
2222
"@rollup/plugin-yaml": "^4.1.2",
23+
"@stylistic/eslint-plugin": "^3.0.1",
2324
"@sveltejs/adapter-static": "^3.0.5",
2425
"@sveltejs/kit": "^2.5.28",
2526
"@sveltejs/vite-plugin-svelte": "^3.1.2",

site/src/lib/Filters.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
export let tags: [string, number][]
1414
export let contributors: [string, number][]
15-
export let sort_order: 'asc' | 'desc' = `desc`
15+
export let sort_order: `asc` | `desc` = `desc`
1616
</script>
1717

1818
<div class="filters">
@@ -24,7 +24,7 @@
2424
bind:selected={$filter_tags}
2525
>
2626
<span slot="option" let:option style="display: flex;">
27-
{option.label} <span style="flex: 1;" />
27+
{option.label} <span style="flex: 1;"></span>
2828
{option.count}
2929
</span>
3030
</MultiSelect>
@@ -39,7 +39,7 @@
3939
bind:selected={$filter_contributors}
4040
>
4141
<span slot="option" let:option style="display: flex;">
42-
{option.label} <span style="flex: 1;" />
42+
{option.label} <span style="flex: 1;"></span>
4343
{option.count}
4444
</span>
4545
</MultiSelect>

site/src/lib/Screenshot.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
export let width = 800
77
export let height = 600
88
export let style = ``
9-
export let resolution: '.small' | '' = ``
9+
export let resolution: `.small` | `` = ``
1010
1111
const titleToSlug = (title: string) => title.toLowerCase().replaceAll(` `, `-`)
1212

site/src/lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ export type RepoContributor = {
4646
url: string
4747
html_url: string
4848
repos_url: string
49-
type: 'User' | 'Bot'
49+
type: `User` | `Bot`
5050
contributions: number
5151
}

site/src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}, {} as Record<string, number>)
4141
).sort((c1, c2) => c2[1] - c1[1])
4242
43-
function arr_includes(arr: string[], values: string[], mode: 'all' | 'any'): boolean {
43+
function arr_includes(arr: string[], values: string[], mode: `all` | `any`): boolean {
4444
if (values.length === 0) return true
4545
if (arr.length === 0) return false
4646
if (mode === `all`) return values.every((val) => arr.includes(val))
@@ -65,7 +65,7 @@
6565
return query_match && tag_match && contrib_match
6666
})
6767
68-
let sort_order: 'asc' | 'desc' = `desc`
68+
let sort_order: `asc` | `desc` = `desc`
6969
$: sort_factor = sort_order == `asc` ? -1 : 1
7070
// arr.sort() sorts in-place but we need to reassign filtered_sites so Svelte rerenders
7171
$: if ($sort_by[0] === `GitHub repo stars`) {

site/src/sites.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
- title: Official SvelteKit docs
6262
url: https://kit.svelte.dev
6363
repo: https://github.com/sveltejs/kit
64-
site_src: https://github.com/sveltejs/kit/blob/-/sites/kit.svelte.dev
64+
site_src: https://github.com/sveltejs/kit/tree/main/documentation/docs
6565
npm: https://npmjs.com/package/@sveltejs/kit
6666
description: The fastest way to build Svelte apps.
6767
uses:
@@ -136,12 +136,12 @@
136136
name: Martin Krisnanto Putra
137137
location: Tokyo, Japan
138138
company: null
139-
- title: TikZ
140-
url: https://janosh.github.io/tikz
141-
repo: https://github.com/janosh/tikz
139+
- title: Scientific Diagrams
140+
url: https://janosh.github.io/diagrams
141+
repo: https://github.com/janosh/diagrams
142142
description: >-
143-
Random collection of MIT-licensed standalone TikZ images, mostly about
144-
physics and machine learning.
143+
100+ MIT-licensed scientific diagrams created with CeTZ (Typst) and/or TikZ
144+
(LaTeX). Mostly about physics, chemistry, and machine learning.
145145
tags:
146146
- diagrams
147147
- graphics
@@ -154,14 +154,14 @@
154154
- svelte-multiselect
155155
- pre-commit
156156
- PNPM
157-
- GitHub Pages
157+
- svelte-enhanced-img
158158
date_created: 2020-08-09T00:00:00.000Z
159159
date_added: 2021-05-25T00:00:00.000Z
160-
slug: tikz
161-
repo_stars: 189
160+
slug: scientific-diagrams
161+
repo_stars: 225
162162
contributors:
163163
- github: janosh
164-
twitter: jrib_
164+
twitter: null
165165
url: https://janosh.dev
166166
avatar: https://avatars.githubusercontent.com/u/30958850?v=4
167167
name: Janosh Riebesell
@@ -940,7 +940,7 @@
940940
location: France
941941
company: null
942942
- title: svelte-realworld
943-
url: https://realworld.svelte.dev
943+
url: https://github.com/gothinkster/realworld
944944
repo: https://github.com/sveltejs/realworld
945945
description: SvelteKit implementation of the RealWorld app.
946946
uses:
@@ -1748,7 +1748,7 @@
17481748
location: Irvine, CA
17491749
company: Latitude
17501750
- title: Cryptgeon
1751-
url: https://cryptgeon.nicco.io
1751+
url: https://cryptgeon.org
17521752
repo: https://github.com/cupcakearmy/cryptgeon
17531753
site_src: https://github.com/cupcakearmy/cryptgeon/blob/-/packages/frontend
17541754
description: >-
@@ -1931,8 +1931,8 @@
19311931
url: https://svelte-french-toast.com
19321932
repo: https://github.com/kbrgl/svelte-french-toast
19331933
description: >-
1934-
Svelte port of Timo Lins&#39; react-hot-toast, a lightweight, customizable
1935-
toast notification library.
1934+
Svelte port of react-hot-toast, a lightweight, customizable toast
1935+
notification library.
19361936
uses:
19371937
- TypeScript
19381938
- Prism
@@ -2533,7 +2533,7 @@
25332533
location: null
25342534
company: null
25352535
- title: Watch This
2536-
url: https://what-to-watch-roan.vercel.app
2536+
url: https://github.com/StephDietz/watch-this/issues/28
25372537
repo: https://github.com/StephDietz/watch-this
25382538
description: >-
25392539
Uses OpenAI GPT-3 API and streaming Vercel edge functions to generate cinema
@@ -2767,7 +2767,7 @@
27672767
company: null
27682768
- title: shadcn-svelte
27692769
url: https://shadcn-svelte.com
2770-
site_src: https://github.com/huntabyte/shadcn-svelte/blob/-/apps/www
2770+
site_src: https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs
27712771
repo: https://github.com/huntabyte/shadcn-svelte
27722772
description: shadcn/ui, but for Svelte.
27732773
uses:

0 commit comments

Comments
 (0)