refactor: convert from TypeScript to JavaScript with JSDoc

Author types in JSDoc comments. jsconfig.json keeps checkJs: true so
the editor's bundled TS server still validates them; CI can validate
with npx -p typescript tsc --noEmit on demand.

Renames (history preserved via git mv):
- next.config.ts        -> next.config.mjs
- app/layout.tsx        -> app/layout.jsx
- app/page.tsx          -> app/page.jsx
- app/master/page.tsx   -> app/master/page.jsx
- components/player-board.tsx -> components/player-board.jsx
- lib/game-logic.ts     -> lib/game-logic.js
- tsconfig.json         -> jsconfig.json (same @/* alias)

Drops typescript and @types/node, @types/react, @types/react-dom
from devDependencies. Removes vendored next-env.d.ts. eslint config
no longer pulls in eslint-config-next/typescript.

Behavior unchanged. Build, lint, and dev profiles verified.
This commit is contained in:
tiennm99 committed 2026-04-26 19:45:36 +07:00
1 parent 254a6dc39a
commit 95545c9308
19 files changed
+563 -208

No files matched your search

+3 -3
View File
@@ -11,7 +11,7 @@ The app auto-deploys from the `master` branch via `.github/workflows/deploy.yml`
3. Static export written to `out/` directory
4. Pages deployed to `https://{user}.github.io/loto`
**Note**: basePath is set to `/loto` in production (`next.config.ts:23`).
**Note**: basePath is set to `/loto` in production (`next.config.mjs:23`).
### Manual Deploy (if needed)
```bash
@@ -55,7 +55,7 @@ Replace `your-machine.example.com` with your actual hostname/IP (must match the
npm run dev:codeserver
```
This sets `NEXT_DEV_PROFILE=codeserver`, triggering the code-server config path in `next.config.ts`.
This sets `NEXT_DEV_PROFILE=codeserver`, triggering the code-server config path in `next.config.mjs`.
**4. Access via browser**:
Navigate to:
@@ -88,7 +88,7 @@ Generates:
- `.next/` — Build cache (not needed for deployment)
### Export Settings
- `output: "export"` in `next.config.ts`
- `output: "export"` in `next.config.mjs`
- No server-side rendering
- All pages pre-rendered to HTML + JS bundles