diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8678bb1..3c903c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: quarterly skip: [eslint] -default_stages: [commit] +default_stages: [pre-commit] default_install_hook_types: [pre-commit, commit-msg] @@ -37,7 +37,7 @@ repos: args: [--config-file, .github/yamllint.yml] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.42.0 + rev: v0.44.0 hooks: - id: markdownlint # MD013: line too long @@ -46,26 +46,28 @@ repos: args: [--disable, MD013, MD033, MD041, '--'] - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell exclude: ^site/src/sites.yml$ args: [--ignore-words-list, 'ons,linz', --check-filenames] - stages: [commit, commit-msg] + stages: [pre-commit, commit-msg] - repo: https://github.com/pre-commit/mirrors-eslint - rev: v9.15.0 + rev: v9.19.0 hooks: - id: eslint types: [file] args: [--fix, --config, site/eslint.config.js] files: \.(js|ts|svelte)$ additional_dependencies: + - 'typescript-eslint' - eslint - eslint-plugin-svelte + - globals - svelte - typescript - - typescript-eslint + - '@stylistic/eslint-plugin' - repo: local hooks: diff --git a/readme.md b/readme.md index ddd0e9a..5c305b8 100644 --- a/readme.md +++ b/readme.md @@ -59,7 +59,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve uses: [PNPM], [TypeScript], [Tailwind], [sveltekit-i18n], [PostCSS], [Husky] 1. **[Official SvelteKit docs](https://kit.svelte.dev)** - [[code](https://github.com/sveltejs/kit/blob/-/sites/kit.svelte.dev)]  + [[code](https://github.com/sveltejs/kit/tree/main/documentation/docs)]  <a href="https://github.com/sveltejs/kit/stargazers"> <img src="https://img.shields.io/github/stars/sveltejs/kit?logo=github" alt="GitHub stars" valign="middle"> </a> @@ -109,7 +109,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve uses: [Vitest], [PostCSS], [highlight.js], [Tailwind], [Typescript], [jsdom] 1. **[shadcn-svelte](https://shadcn-svelte.com)** - [[code](https://github.com/huntabyte/shadcn-svelte/blob/-/apps/www)]  + [[code](https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs)]  <a href="https://github.com/huntabyte/shadcn-svelte/stargazers"> <img src="https://img.shields.io/github/stars/huntabyte/shadcn-svelte?logo=github" alt="GitHub stars" valign="middle"> </a> @@ -188,7 +188,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve uses: [TypeScript], [Three.js], [Tailwind], [PostCSS], [Algolia], [Iconify] -1. **[svelte-realworld](https://realworld.svelte.dev)** +1. **[svelte-realworld](https://github.com/gothinkster/realworld)** [[code](https://github.com/sveltejs/realworld)]  <a href="https://github.com/sveltejs/realworld/stargazers"> <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 <img src="https://img.shields.io/github/stars/kbrgl/svelte-french-toast?logo=github" alt="GitHub stars" valign="middle"> </a> - Svelte port of Timo Lins' react-hot-toast, a lightweight, customizable toast notification library.<br> + Svelte port of react-hot-toast, a lightweight, customizable toast notification library.<br> uses: [TypeScript], [Prism], [Tailwind], [PostCSS], [PNPM] @@ -348,7 +348,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve uses: [TypeScript], [tRPC] -1. **[Cryptgeon](https://cryptgeon.nicco.io)** +1. **[Cryptgeon](https://cryptgeon.org)** [[code](https://github.com/cupcakearmy/cryptgeon/blob/-/packages/frontend)]  <a href="https://github.com/cupcakearmy/cryptgeon/stargazers"> <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 uses: [GitHub API], [Monaco], [Playwright], [Google Analytics], [Supabase], [Vercel], [PNPM], [Sass], [TypeScript], [remark], [rehype] -1. **[Watch This](https://what-to-watch-roan.vercel.app)** +1. **[Watch This](https://github.com/StephDietz/watch-this/issues/28)** [[code](https://github.com/StephDietz/watch-this)]  <a href="https://github.com/StephDietz/watch-this/stargazers"> <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 uses: [Vitest], [Playwright], [Typescript], [PNPM], [pre-commit], [rehype], [jsdom], [GitHub Pages], [mdsvexamples] +1. **[Scientific Diagrams](https://janosh.github.io/diagrams)** + [[code](https://github.com/janosh/diagrams)]  + <a href="https://github.com/janosh/diagrams/stargazers"> + <img src="https://img.shields.io/github/stars/janosh/diagrams?logo=github" alt="GitHub stars" valign="middle"> + </a> + + 100+ MIT-licensed scientific diagrams created with CeTZ (Typst) and/or TikZ (LaTeX). Mostly about physics, chemistry, and machine learning.<br> + + uses: [TypeScript], [svelte-multiselect], [pre-commit], [PNPM], [svelte-enhanced-img] + 1. **[SvelteKit on Edge](https://sveltekit-on-the-edge.vercel.app)** [[code](https://github.com/Rich-Harris/sveltekit-on-the-edge)]  <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 uses: [TypeScript], [PNPM], [Vercel], [MDsveX], [Tailwind], [PostCSS], [Husky], [Playwright], [DaisyUI] -1. **[TikZ](https://janosh.github.io/tikz)** - [[code](https://github.com/janosh/tikz)]  - <a href="https://github.com/janosh/tikz/stargazers"> - <img src="https://img.shields.io/github/stars/janosh/tikz?logo=github" alt="GitHub stars" valign="middle"> - </a> - - Random collection of MIT-licensed standalone TikZ images, mostly about physics and machine learning.<br> - - uses: [TypeScript], [svelte-multiselect], [pre-commit], [PNPM], [GitHub Pages] - 1. **[Hexapipes](https://hexapipes.vercel.app)** [[code](https://github.com/gereleth/hexapipes)]  <a href="https://github.com/gereleth/hexapipes/stargazers"> @@ -874,6 +874,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve uses: [Typescript], [SCSS], [PostCSS], [Motion One], [OGL], [WebGL], [Directus], [Swell Commerce], [Vercel] +[svelte-enhanced-img]: https://svelte.dev/docs/kit/images#sveltejs-enhanced-img [airtable]: https://airtable.com [algolia]: https://algolia.com [anime.js]: https://animejs.com diff --git a/site/eslint.config.js b/site/eslint.config.js index 65ec3fb..a85e97b 100644 --- a/site/eslint.config.js +++ b/site/eslint.config.js @@ -1,17 +1,19 @@ +import stylistic from '@stylistic/eslint-plugin' import svelte from 'eslint-plugin-svelte' import tslint from 'typescript-eslint' -/** @type { import("eslint").Linter.FlatConfig[] } */ +/** @type { import("eslint").Linter.Config[] } */ export default [ ...tslint.configs.recommended, ...svelte.configs[`flat/recommended`], + { plugins: { '@stylistic': stylistic } }, { rules: { '@typescript-eslint/no-unused-vars': [ `error`, { argsIgnorePattern: `^_`, varsIgnorePattern: `^_` }, ], - '@typescript-eslint/quotes': [`error`, `backtick`, { avoidEscape: true }], + '@stylistic/quotes': [`error`, `backtick`, { avoidEscape: true }], 'svelte/no-at-html-tags': `off`, }, }, @@ -27,6 +29,6 @@ export default [ }, }, { - ignores: [`build/`], + ignores: [`build/`, `.svelte-kit/`, `package/`], }, ] diff --git a/site/package.json b/site/package.json index d874daf..3d12503 100644 --- a/site/package.json +++ b/site/package.json @@ -20,6 +20,7 @@ "@iconify/svelte": "^4.0.2", "@playwright/test": "^1.47.1", "@rollup/plugin-yaml": "^4.1.2", + "@stylistic/eslint-plugin": "^3.0.1", "@sveltejs/adapter-static": "^3.0.5", "@sveltejs/kit": "^2.5.28", "@sveltejs/vite-plugin-svelte": "^3.1.2", diff --git a/site/src/lib/Filters.svelte b/site/src/lib/Filters.svelte index 7aa89b6..2408410 100644 --- a/site/src/lib/Filters.svelte +++ b/site/src/lib/Filters.svelte @@ -12,7 +12,7 @@ export let tags: [string, number][] export let contributors: [string, number][] - export let sort_order: 'asc' | 'desc' = `desc` + export let sort_order: `asc` | `desc` = `desc` </script> <div class="filters"> @@ -24,7 +24,7 @@ bind:selected={$filter_tags} > <span slot="option" let:option style="display: flex;"> - {option.label} <span style="flex: 1;" /> + {option.label} <span style="flex: 1;"></span> {option.count} </span> </MultiSelect> @@ -39,7 +39,7 @@ bind:selected={$filter_contributors} > <span slot="option" let:option style="display: flex;"> - {option.label} <span style="flex: 1;" /> + {option.label} <span style="flex: 1;"></span> {option.count} </span> </MultiSelect> diff --git a/site/src/lib/Screenshot.svelte b/site/src/lib/Screenshot.svelte index aa5ef3f..95d6026 100644 --- a/site/src/lib/Screenshot.svelte +++ b/site/src/lib/Screenshot.svelte @@ -6,7 +6,7 @@ export let width = 800 export let height = 600 export let style = `` - export let resolution: '.small' | '' = `` + export let resolution: `.small` | `` = `` const titleToSlug = (title: string) => title.toLowerCase().replaceAll(` `, `-`) diff --git a/site/src/lib/index.ts b/site/src/lib/index.ts index d1e4926..a2454f1 100644 --- a/site/src/lib/index.ts +++ b/site/src/lib/index.ts @@ -46,6 +46,6 @@ export type RepoContributor = { url: string html_url: string repos_url: string - type: 'User' | 'Bot' + type: `User` | `Bot` contributions: number } diff --git a/site/src/routes/+page.svelte b/site/src/routes/+page.svelte index 65b6a51..73bd9bc 100644 --- a/site/src/routes/+page.svelte +++ b/site/src/routes/+page.svelte @@ -40,7 +40,7 @@ }, {} as Record<string, number>) ).sort((c1, c2) => c2[1] - c1[1]) - function arr_includes(arr: string[], values: string[], mode: 'all' | 'any'): boolean { + function arr_includes(arr: string[], values: string[], mode: `all` | `any`): boolean { if (values.length === 0) return true if (arr.length === 0) return false if (mode === `all`) return values.every((val) => arr.includes(val)) @@ -65,7 +65,7 @@ return query_match && tag_match && contrib_match }) - let sort_order: 'asc' | 'desc' = `desc` + let sort_order: `asc` | `desc` = `desc` $: sort_factor = sort_order == `asc` ? -1 : 1 // arr.sort() sorts in-place but we need to reassign filtered_sites so Svelte rerenders $: if ($sort_by[0] === `GitHub repo stars`) { diff --git a/site/src/sites.yml b/site/src/sites.yml index eafd722..2f89b73 100644 --- a/site/src/sites.yml +++ b/site/src/sites.yml @@ -61,7 +61,7 @@ - title: Official SvelteKit docs url: https://kit.svelte.dev repo: https://github.com/sveltejs/kit - site_src: https://github.com/sveltejs/kit/blob/-/sites/kit.svelte.dev + site_src: https://github.com/sveltejs/kit/tree/main/documentation/docs npm: https://npmjs.com/package/@sveltejs/kit description: The fastest way to build Svelte apps. uses: @@ -136,12 +136,12 @@ name: Martin Krisnanto Putra location: Tokyo, Japan company: null -- title: TikZ - url: https://janosh.github.io/tikz - repo: https://github.com/janosh/tikz +- title: Scientific Diagrams + url: https://janosh.github.io/diagrams + repo: https://github.com/janosh/diagrams description: >- - Random collection of MIT-licensed standalone TikZ images, mostly about - physics and machine learning. + 100+ MIT-licensed scientific diagrams created with CeTZ (Typst) and/or TikZ + (LaTeX). Mostly about physics, chemistry, and machine learning. tags: - diagrams - graphics @@ -154,14 +154,14 @@ - svelte-multiselect - pre-commit - PNPM - - GitHub Pages + - svelte-enhanced-img date_created: 2020-08-09T00:00:00.000Z date_added: 2021-05-25T00:00:00.000Z - slug: tikz - repo_stars: 189 + slug: scientific-diagrams + repo_stars: 225 contributors: - github: janosh - twitter: jrib_ + twitter: null url: https://janosh.dev avatar: https://avatars.githubusercontent.com/u/30958850?v=4 name: Janosh Riebesell @@ -940,7 +940,7 @@ location: France company: null - title: svelte-realworld - url: https://realworld.svelte.dev + url: https://github.com/gothinkster/realworld repo: https://github.com/sveltejs/realworld description: SvelteKit implementation of the RealWorld app. uses: @@ -1748,7 +1748,7 @@ location: Irvine, CA company: Latitude - title: Cryptgeon - url: https://cryptgeon.nicco.io + url: https://cryptgeon.org repo: https://github.com/cupcakearmy/cryptgeon site_src: https://github.com/cupcakearmy/cryptgeon/blob/-/packages/frontend description: >- @@ -1931,8 +1931,8 @@ url: https://svelte-french-toast.com repo: https://github.com/kbrgl/svelte-french-toast description: >- - Svelte port of Timo Lins' react-hot-toast, a lightweight, customizable - toast notification library. + Svelte port of react-hot-toast, a lightweight, customizable toast + notification library. uses: - TypeScript - Prism @@ -2533,7 +2533,7 @@ location: null company: null - title: Watch This - url: https://what-to-watch-roan.vercel.app + url: https://github.com/StephDietz/watch-this/issues/28 repo: https://github.com/StephDietz/watch-this description: >- Uses OpenAI GPT-3 API and streaming Vercel edge functions to generate cinema @@ -2767,7 +2767,7 @@ company: null - title: shadcn-svelte url: https://shadcn-svelte.com - site_src: https://github.com/huntabyte/shadcn-svelte/blob/-/apps/www + site_src: https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs repo: https://github.com/huntabyte/shadcn-svelte description: shadcn/ui, but for Svelte. uses: diff --git a/site/static/screenshots/scientific-diagrams.avif b/site/static/screenshots/scientific-diagrams.avif new file mode 100644 index 0000000..7220b01 Binary files /dev/null and b/site/static/screenshots/scientific-diagrams.avif differ diff --git a/site/static/screenshots/scientific-diagrams.small.avif b/site/static/screenshots/scientific-diagrams.small.avif new file mode 100644 index 0000000..e18da7d Binary files /dev/null and b/site/static/screenshots/scientific-diagrams.small.avif differ diff --git a/site/static/screenshots/tikz.avif b/site/static/screenshots/tikz.avif deleted file mode 100644 index 12132ac..0000000 Binary files a/site/static/screenshots/tikz.avif and /dev/null differ diff --git a/site/static/screenshots/tikz.small.avif b/site/static/screenshots/tikz.small.avif deleted file mode 100644 index 8c9557d..0000000 Binary files a/site/static/screenshots/tikz.small.avif and /dev/null differ diff --git a/sites.yml b/sites.yml index 19f819a..a9ff70f 100644 --- a/sites.yml +++ b/sites.yml @@ -24,7 +24,7 @@ - title: Official SvelteKit docs url: https://kit.svelte.dev repo: https://github.com/sveltejs/kit - site_src: https://github.com/sveltejs/kit/blob/-/sites/kit.svelte.dev + site_src: https://github.com/sveltejs/kit/tree/main/documentation/docs npm: https://npmjs.com/package/@sveltejs/kit description: The fastest way to build Svelte apps. uses: [Netlify, PNPM] @@ -41,12 +41,15 @@ date_created: 2021-02-15 date_added: 2021-05-25 -- title: TikZ - url: https://janosh.github.io/tikz - repo: https://github.com/janosh/tikz - description: Random collection of MIT-licensed standalone TikZ images, mostly about physics and machine learning. +- title: Scientific Diagrams + url: https://janosh.github.io/diagrams + repo: https://github.com/janosh/diagrams + description: >- + 100+ MIT-licensed scientific diagrams created with CeTZ (Typst) and/or TikZ + (LaTeX). + Mostly about physics, chemistry, and machine learning. tags: [research, science, diagrams, graphics, latex] - uses: [TypeScript, svelte-multiselect, pre-commit, PNPM, GitHub Pages] + uses: [TypeScript, svelte-multiselect, pre-commit, PNPM, svelte-enhanced-img] date_created: 2020-08-09 date_added: 2021-05-25 @@ -290,7 +293,7 @@ date_added: 2022-02-05 - title: svelte-realworld - url: https://realworld.svelte.dev + url: https://github.com/gothinkster/realworld repo: https://github.com/sveltejs/realworld description: SvelteKit implementation of the RealWorld app. uses: [Netlify, MarkedJS] @@ -483,7 +486,7 @@ date_added: 2022-06-02 - title: Cryptgeon - url: https://cryptgeon.nicco.io + url: https://cryptgeon.org repo: https://github.com/cupcakearmy/cryptgeon site_src: https://github.com/cupcakearmy/cryptgeon/blob/-/packages/frontend description: A secure, open source notes and file sharing service inspired by PrivNote written in Rust & Svelte. @@ -538,7 +541,7 @@ - title: svelte-french-toast url: https://svelte-french-toast.com repo: https://github.com/kbrgl/svelte-french-toast - description: Svelte port of Timo Lins' react-hot-toast, a lightweight, customizable toast notification library. + description: Svelte port of react-hot-toast, a lightweight, customizable toast notification library. uses: [TypeScript, Prism, Tailwind, PostCSS, PNPM] tags: [toast, notifications, snackbar] date_created: 2022-06-04 @@ -755,7 +758,7 @@ date_added: 2023-03-06 - title: Watch This - url: https://what-to-watch-roan.vercel.app + url: https://github.com/StephDietz/watch-this/issues/28 repo: https://github.com/StephDietz/watch-this description: Uses OpenAI GPT-3 API and streaming Vercel edge functions to generate cinema @@ -830,7 +833,7 @@ - title: shadcn-svelte url: https://shadcn-svelte.com - site_src: https://github.com/huntabyte/shadcn-svelte/blob/-/apps/www + site_src: https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs repo: https://github.com/huntabyte/shadcn-svelte description: shadcn/ui, but for Svelte. uses: diff --git a/tools.yml b/tools.yml index 4091ff0..1ba7e39 100644 --- a/tools.yml +++ b/tools.yml @@ -95,6 +95,7 @@ supabase: https://supabase.com superforms: https://github.com/ciscoheat/sveltekit-superforms surge.sh: https://surge.sh svelte forms lib: https://github.com/tjinauyeung/svelte-forms-lib +svelte-enhanced-img: https://svelte.dev/docs/kit/images#sveltejs-enhanced-img svelte-highlight: https://github.com/metonym/svelte-highlight svelte-intl-precompile: https://github.com/cibernox/svelte-intl-precompile svelte-markdown: https://github.com/pablo-abc/svelte-markdown