Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dist-ssr
# 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
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu

pnpm run lint
pnpm run stylelint
pnpm run format
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
save-exact=true
save-prefix=""
legacy-peer-deps=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.14.0
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
3 changes: 3 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard"
}
480 changes: 234 additions & 246 deletions README.md

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import importPlugin from "eslint-plugin-import";
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,
{
ignores: ["dist"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
plugins: {
js,
import: importPlugin,
"simple-import-sort": simpleImportSort,
},
extends: ["js/recommended"],
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
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",
},
},
{
files: ["**/scripts/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
globals: {
...globals.node,
...globals.es2024,
},
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