Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ded2ed7
Modernize React TypeScript template
scobo Mar 9, 2026
cbd170c
Fix glob
scobo Mar 9, 2026
b1640e3
Upgrade some packages
scobo Mar 11, 2026
30ac5e4
Upgrade to Vite v8
scobo Mar 13, 2026
6cc54cd
Upgrade some packages
scobo Mar 13, 2026
cc2f29a
Upgrade some dependencies
scobo Mar 18, 2026
3a4b144
Upgrade some packages
scobo Mar 21, 2026
ff7c5e3
Separate React from bundle
scobo Mar 22, 2026
4205f61
Optimize manual chunks in prod build
scobo Mar 22, 2026
a3685e8
Add eslint-plugin-n
scobo Mar 22, 2026
8d02343
Use full @eslint/js config
scobo Mar 22, 2026
35c9bce
Switch from ESLint to Oxlint
scobo Mar 22, 2026
b2d45c0
Add ESLint for eslint/config only
scobo Mar 22, 2026
a733745
Remove ESLint dependency
scobo Mar 22, 2026
78edef2
Add ESLint just to satisfy peer deps
scobo Mar 22, 2026
b6a21c8
Upgrade some packages
scobo Mar 24, 2026
cb461a8
Upgrade some packages
scobo Mar 25, 2026
aeeea0b
Upgrade some packages
scobo Mar 27, 2026
4de8afd
Revert "Switch from ESLint to Oxlint"
scobo Mar 27, 2026
033721a
Upgrade some packages
scobo Apr 4, 2026
c23c0f5
Feedback, upgrade some packages
scobo Jun 19, 2026
0408de9
Simplify log script
scobo Jun 20, 2026
03af990
Update README.md
scobo Jun 20, 2026
296bef8
Update README.md
scobo Jun 20, 2026
f7be99b
Update README.md
scobo Jun 20, 2026
0bbb292
Update README.md
scobo Jun 20, 2026
8084da1
Update .npmrc
scobo Jun 20, 2026
b115400
Update .npmrc
scobo Jun 20, 2026
55ef3af
Add typecheck script
scobo Jun 20, 2026
8293f84
Update tsconfig.node.json
scobo Jun 20, 2026
2021d54
Update .gitignore
scobo Jun 20, 2026
76e8a95
Convert assets from png to webp
scobo Jun 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ dist
dist-ssr
*.local

.eslintcache

tsconfig.tsbuildinfo
tsconfig.node.tsbuildinfo

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
*.suo
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu

lint-staged
7 changes: 7 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -eu

pnpm run lint
pnpm run stylelint
pnpm run format
pnpm run typecheck
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
engine-strict=true
ignore-scripts=true
#min-release-age=7
save-exact=true
save-prefix=""
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package.json
package-lock.json
pnpm-lock.yaml
pnpm-workspace.yaml
yarn-lock.json
phaser.js
*.css.d.ts
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
dist-ssr
480 changes: 234 additions & 246 deletions README.md

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import importPlugin from "eslint-plugin-import";
import nodePlugin from "eslint-plugin-n";
import pluginReact from "eslint-plugin-react";
import reactCompiler from "eslint-plugin-react-compiler";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import globals from "globals";
import tseslint from "typescript-eslint";

export default defineConfig([
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
{
...pluginReact.configs.flat.recommended,
settings: { react: { version: "19" } },
},
pluginReact.configs.flat["jsx-runtime"],
reactCompiler.configs.recommended,
reactHooks.configs.flat["recommended-latest"],
reactRefresh.configs.recommended,
js.configs.recommended,
{
ignores: ["dist"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
plugins: {
js,
import: importPlugin,
"simple-import-sort": simpleImportSort,
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2024,
Phaser: "readonly",
},
parserOptions: {
projectService: true,
},
},
rules: {
"no-undef": "off", // Defer to TypeScript
"no-unused-vars": "off", // Defer to @typescript-eslint/no-unused-vars

"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
},
],

"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],

"simple-import-sort/imports": [
"error",
{
groups: [
// Type imports.
["\\w\\u0000$"],
// Side effect imports.
["^\\u0000"],
// Node.js builtins prefixed with `node:`.
["^node:"],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^@?\\w"],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
["^"],
// Things that start with `#` followed by a letter.
["^#\\w"],
// Relative imports.
// Anything that starts with a dot.
["^\\."],
],
},
],
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
},
},
{
...nodePlugin.configs["flat/recommended-module"],
files: ["**/scripts/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
globals: {
...globals.node,
...globals.es2024,
Comment thread
scobo marked this conversation as resolved.
},
parserOptions: {
projectService: true,
},
},
},
]);
21 changes: 12 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/style.css">
<meta name="robots" content="noindex" />
<title>Phaser React Template</title>
</head>
<link rel="stylesheet" href="/style.css" />
<meta name="description" content="" />

<body>
<link rel="icon" type="image/png" href="/favicon.png" sizes="16x16" />
<link rel="shortcut icon" href="/favicon.png" />
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>

</body>
</body>
</html>
36 changes: 0 additions & 36 deletions log.js

This file was deleted.

Loading