ci: run svelte-check, which was already a dependency with no script

svelte-check sits in devDependencies at ^4.7.3 and nothing in the repository
ever invoked it, so the type errors it reports had no path to a human. Point a
script at it and run it in the frontend job, and it is clean: 0 errors, 0
warnings.

It shares the one `npm ci` with the test step. A second install would have
doubled the slowest part of the job to learn exactly the same thing.

The lockfile is untouched, because scripts are not part of what it pins.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
forustandClaude Opus 4.8 committed 2026-09-27 10:24:18 +02:00
1 parent c00a4724f5
commit 3a05d86e3e
2 files changed
+16 -5

No files matched your search

+14 -4
View File
@@ -223,15 +223,25 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Run the panel frontend test suite # One `npm ci` for both checks below: it is by far the slowest part of
# this job, and a second one would learn nothing the first did not.
#
# `npm ci`, not `npm install`, for the same reason the Dockerfile uses it:
# the lockfile is what makes the tree that gets checked the tree that
# gets shipped.
- name: Type-check and test the panel frontend
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
cd userbot/panel/frontend cd userbot/panel/frontend
# `npm ci`, not `npm install`, for the same reason the Dockerfile
# uses it: the lockfile is what makes the tree that gets tested the
# tree that gets shipped.
npm ci npm ci
# svelte-check has been a devDependency all along with no script
# pointing at it, so the type errors it reports had nowhere to
# surface. It is clean today, which is the only reason it can be a
# gate: it stops at whatever upstream introduces rather than
# reporting a backlog we inherited.
npm run check
npm test npm test
validate: validate:
+2 -1
View File
@@ -6,7 +6,8 @@
"scripts": { "scripts": {
"build": "vite build", "build": "vite build",
"dev": "vite --host 0.0.0.0", "dev": "vite --host 0.0.0.0",
"test": "vitest run" "test": "vitest run",
"check": "svelte-check --tsconfig ./tsconfig.json"
}, },
"dependencies": { "dependencies": {
"lucide-svelte": "^0.468.0", "lucide-svelte": "^0.468.0",