mirror of
https://github.com/tiennm99/thptqg.git
synced 2026-10-14 12:17:07 +00:00
refactor(web): drop TypeScript for plain JavaScript
Every .ts becomes .js, every lang="ts" becomes lang-less, and the type declarations go with them: types.ts held nothing but types, so it is deleted outright. Tooling follows. typescript, svelte-check, typescript-eslint and @types/sql.js are uninstalled; tsconfig.json becomes jsconfig.json, which still extends the generated SvelteKit config so $lib and $app resolve in an editor; `npm run lint` is now ESLint alone, and CI's comment about it covering the type check goes too. What this gives up, stated plainly: a mistyped column name like row.nguvan used to fail the build and now renders blank, and the datasets.json-to-CONTENT cross-check is back to throwing at module load rather than at compile time. The runtime guard for the latter is still there and still throws loudly. Two mechanical notes. The svelte/no-navigation-without-resolve rule started flagging the footer's source link, which points at an off-site article — without type information the rule can no longer tell an external URL from a route, so that one line carries a disable comment. And Vitest's include pattern had to follow the tests to .js. Lint, 25 tests and the build all pass.
This commit is contained in:
1 parent
d7e2fa2d12
commit
b38965dc4b
32 files changed
+121
-712
No files matched your search
@@ -66,8 +66,8 @@ jobs:
|
||||
- name: Test assembler
|
||||
run: go -C assembler test ./...
|
||||
|
||||
# Lint covers ESLint and svelte-check; the tests cover the framework-free
|
||||
# modules, including the ASCII fold that has to match the Go parser.
|
||||
# The tests cover the framework-free modules, including the ASCII fold
|
||||
# that has to match the Go parser.
|
||||
- name: Test web
|
||||
working-directory: web
|
||||
run: npm test
|
||||
|
||||
Reference in new issue
Block a user