Skip to content

Commit 9feec22

Browse files
authored
Migrate from Deno/ESLint to Vite+ unified toolchain (#148)
* Migrate from Deno/ESLint to Vite+ unified toolchain - Replace Deno runtime + deno.jsonc + ESLint with Vite+ (vp dev/build/check/lint/fmt) - Remove eslint, eslint-plugin-svelte, @stylistic/eslint-plugin, svelte-check, svelte2tsx - Add vite-plus with oxlint (type-aware), oxfmt, and svelte-check-rs - Configure all 6 oxlint categories (correctness, suspicious, pedantic, perf, restriction, style) - Update pre-commit hooks from deno fmt/lint to vp fmt/lint - Fix all lint/type errors: throw literals, ==, Deno refs, jsr imports, implicit any - Fix screenshots.ts bug: missing continue after failed navigation - Break import cycles by importing sibling components directly - Simplify ToggleGroup to accept Record<string, string> options - Update deps (svelte 5.54, sveltekit 2.55, puppeteer 24.40, marked 17.0.5) * Update CI workflows from Deno to Node.js/pnpm Replace deno setup with pnpm in lint workflow, add node_modules install before prek so vp-fmt/vp-lint hooks can find vp binary. Switch gh-pages and test workflows from deno reusable workflows to nodejs equivalents. Add minimal build script to package.json for CI compatibility. Use npm instead of pnpm in CI workflows Pin Node 22 in gh-pages workflow for vite-plus native binary compat Exclude flaky URLs from link checker beatbump.io (403), parks.lol (502), modern-fluid-typography (429), mochajs.org and tauri.app (connection resets in CI) Accept transient HTTP errors in link checker instead of per-domain excludes Use --accept to tolerate 403/429/5xx (common for rate limiting and bot blocking), --max-retries 3, and --timeout 30 instead of maintaining a growing list of excluded domains. Exclude sites with persistent network errors from link checker tauri.app, sass-lang.com, multimonitorcalculator.com block CI with connection resets. Increase timeout to 60s for slow sites. Exclude learninpublic.org and parks.lol from link checker (persistent timeouts) Exclude lodash.com from link checker (connection reset)
1 parent 511a9f2 commit 9feec22

30 files changed

+285
-327
lines changed

.github/workflows/gh-pages.yml

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

1010
jobs:
1111
build:
12-
uses: janosh/workflows/.github/workflows/deno-gh-pages.yml@main
12+
uses: janosh/workflows/.github/workflows/nodejs-gh-pages.yml@main
1313
with:
14+
node-version: 22
1415
working-directory: site

.github/workflows/link-check.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ jobs:
1919
- name: Discover broken links
2020
uses: lycheeverse/lychee-action@v2
2121
with:
22-
# exclude sites that block automated requests (false positives)
2322
args: >-
23+
--accept 200..=206,429,403,500,502,503
24+
--max-retries 3
25+
--retry-wait-time 5
26+
--timeout 60
2427
--exclude '%7B'
2528
--exclude 'npmjs.com'
2629
--exclude 'linkedin.com'
27-
--exclude 'blog.jpat.dev'
28-
--exclude 'mend.io'
29-
--exclude 'learninpublic.org'
30-
--exclude 'nicktrombley.design'
3130
--exclude 'github.com/janosh/awesome-sveltekit/network'
32-
--exclude 'lodash.com'
31+
--exclude 'tauri.app'
3332
--exclude 'sass-lang.com'
3433
--exclude 'multimonitorcalculator.com'
35-
--exclude 'gohugo.io'
36-
--exclude 'concertmash.com'
34+
--exclude 'lodash.com'
35+
--exclude 'learninpublic.org'
36+
--exclude 'parks.lol'
3737
-- ./**/*.{md,svelte,ts,yml}

.github/workflows/lint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313
- name: Check out repo
1414
uses: actions/checkout@v5
1515

16-
- name: Set up deno
17-
uses: denoland/setup-deno@v2
16+
- name: Set up node
17+
uses: actions/setup-node@v4
1818
with:
19-
deno-version: 2.3.7
19+
node-version: 22
20+
21+
- name: Install deps
22+
run: npm install
23+
working-directory: site
2024

2125
- name: Run prek
2226
uses: j178/prek-action@v1
23-
env:
24-
SKIP: eslint # skip eslint because it's additional deps are not installed correctly

.github/workflows/test.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ on:
99

1010
jobs:
1111
tests:
12-
uses: janosh/workflows/.github/workflows/deno-test.yml@main
12+
uses: janosh/workflows/.github/workflows/npm-test.yml@main
1313
with:
14-
deno-version: 2.3.7
14+
working-directory: site
1515
test-cmd: ''
1616
e2e-test-cmd: npx playwright test
17-
e2e-install-cmd: npx playwright install chromium
18-
working-directory: site
17+
install-e2e: npx playwright install chromium

.pre-commit-config.yaml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
args: [--config-file, .github/yamllint.yml]
2222

2323
- repo: https://github.com/igorshubovych/markdownlint-cli
24-
rev: v0.47.0
24+
rev: v0.48.0
2525
hooks:
2626
- id: markdownlint
2727
# MD013: line too long
@@ -30,37 +30,21 @@ repos:
3030
args: [--disable, MD013, MD033, MD041, '--']
3131

3232
- repo: https://github.com/codespell-project/codespell
33-
rev: v2.4.1
33+
rev: v2.4.2
3434
hooks:
3535
- id: codespell
3636
exclude: ^site/src/sites.yml$
3737
args: [--ignore-words-list, 'ons,linz', --check-filenames]
3838
stages: [pre-commit, commit-msg]
3939

4040
- repo: https://github.com/crate-ci/typos
41-
rev: v1.42.3
41+
rev: v1.44.0
4242
hooks:
4343
- id: typos
4444
types: [text]
4545
args: []
4646
exclude: ^site/src/sites.yml|.pre-commit-config.yaml$
4747

48-
- repo: https://github.com/pre-commit/mirrors-eslint
49-
rev: v10.0.0-rc.2
50-
hooks:
51-
- id: eslint
52-
types: [file]
53-
args: [--fix, --config, site/eslint.config.js]
54-
files: \.(js|ts|svelte)$
55-
additional_dependencies:
56-
- 'typescript-eslint'
57-
- eslint
58-
- eslint-plugin-svelte
59-
- globals
60-
- svelte
61-
- typescript
62-
- '@stylistic/eslint-plugin'
63-
6448
- repo: local
6549
hooks:
6650
- id: avif-screenshots
@@ -97,15 +81,15 @@ repos:
9781

9882
- repo: local
9983
hooks:
100-
- id: deno-fmt
101-
name: Deno format
102-
entry: deno fmt
103-
types_or: [file]
84+
- id: vp-fmt
85+
name: Format (oxfmt)
86+
entry: bash -c 'cd site && node_modules/.bin/vp fmt --write'
87+
types_or: [ts, javascript, json, css, html, svelte]
10488
language: system
105-
args: [--config, site/deno.jsonc, --permit-no-files]
106-
- id: deno-lint
107-
name: Deno lint
108-
entry: deno lint
109-
types_or: [file]
110-
args: [--config, site/deno.jsonc, --permit-no-files, --fix]
89+
pass_filenames: false
90+
- id: vp-lint
91+
name: Lint (oxlint)
92+
entry: bash -c 'cd site && node_modules/.bin/vp lint --fix'
93+
types_or: [ts, javascript, json, css, html, svelte]
11194
language: system
95+
pass_filenames: false

site/deno.jsonc

Lines changed: 0 additions & 62 deletions
This file was deleted.

site/eslint.config.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

site/package.json

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
11
{
22
"name": "awesome-sveltekit",
3+
"version": "0.1.0",
34
"description": "Awesome examples of SvelteKit in the wild",
4-
"author": "Janosh Riebesell <janosh.riebesell@gmail.com>",
5+
"keywords": [
6+
"awesome collection",
7+
"example sites",
8+
"learning resource",
9+
"sveltekit"
10+
],
511
"homepage": "https://janosh.github.io/awesome-sveltekit",
6-
"repository": "https://github.com/janosh/awesome-sveltekit",
12+
"bugs": "https://github.com/janosh/awesome-sveltekit/issues",
713
"license": "MIT",
8-
"version": "0.1.0",
14+
"author": "Janosh Riebesell <janosh.riebesell@gmail.com>",
15+
"repository": "https://github.com/janosh/awesome-sveltekit",
916
"type": "module",
10-
"bugs": "https://github.com/janosh/awesome-sveltekit/issues",
17+
"scripts": {
18+
"build": "vp build"
19+
},
1120
"devDependencies": {
1221
"@iconify/svelte": "^5.2.1",
13-
"@playwright/test": "^1.58.1",
22+
"@playwright/test": "^1.58.2",
1423
"@rollup/plugin-yaml": "^4.1.2",
15-
"@stylistic/eslint-plugin": "^5.7.1",
1624
"@sveltejs/adapter-static": "^3.0.10",
17-
"@sveltejs/kit": "^2.50.1",
18-
"@sveltejs/vite-plugin-svelte": "^6.2.4",
25+
"@sveltejs/kit": "^2.55.0",
26+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
1927
"@types/js-yaml": "^4.0.9",
20-
"eslint": "^9.39.2",
21-
"eslint-plugin-svelte": "^3.14.0",
2228
"js-yaml": "^4.1.1",
23-
"marked": "^17.0.1",
24-
"puppeteer": "^24.36.1",
29+
"marked": "^17.0.5",
30+
"puppeteer": "^24.40.0",
2531
"sharp": "^0.34.5",
26-
"svelte": "^5.49.1",
27-
"svelte-check": "^4.3.6",
28-
"svelte-multiselect": "11.6.0",
32+
"svelte": "^5.54.0",
33+
"svelte-check-rs": "^0.9.5",
34+
"svelte-multiselect": "11.6.4",
2935
"svelte-preprocess": "^6.0.3",
30-
"svelte2tsx": "^0.7.47",
3136
"typescript": "5.9.3",
32-
"typescript-eslint": "^8.54.0",
33-
"vite": "^7.3.1"
37+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
38+
"vite-plus": "latest"
3439
},
35-
"keywords": [
36-
"sveltekit",
37-
"awesome collection",
38-
"example sites",
39-
"learning resource"
40-
]
40+
"pnpm": {
41+
"overrides": {
42+
"svelte": "$svelte",
43+
"vite": "npm:@voidzero-dev/vite-plus-core@latest"
44+
}
45+
}
4146
}

site/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { PlaywrightTestConfig } from '@playwright/test'
22

33
export default {
4+
testDir: `tests`,
45
webServer: {
56
command: `vite dev --port 3005`,
67
port: 3005,
78
},
8-
testDir: `tests`,
99
} satisfies PlaywrightTestConfig

site/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta name="author" content="Janosh Riebesell" />

0 commit comments

Comments
 (0)