Skip to content

Modernize React TypeScript template#9

Open
scobo wants to merge 2 commits intophaserjs:mainfrom
scobo:modernize-template
Open

Modernize React TypeScript template#9
scobo wants to merge 2 commits intophaserjs:mainfrom
scobo:modernize-template

Conversation

@scobo
Copy link

@scobo scobo commented Mar 9, 2026

  • Updates dependency versions.
  • Converts all files to TypeScript.
  • Modernizes use of React 19 hooks.
  • Implements the React Compiler for automatic memoization.
  • Improves ESLint configuration and addresses all lint issues.
  • Adds Stylelint for CSS formatting and addresses all issues.
  • Creates # path alias for src to avoid relative path imports.
  • Replaces .editorconfig with Prettier for code formatting.
  • Uses CSS modules for typed class names with locally-scoped namespaces.
  • Adds Husky and lint-staged for automatic checking and fixing of formatting and lint issues.
  • Adds __DEV__ global for gating development-only code.
  • Updates log.ts to report the template type instead of the package name, as the README.md indicates it should.
  • Optimizes images.

Note

Medium Risk
Mostly tooling/config changes, but it alters the local workflow (Husky + lint-staged) and Node/toolchain expectations (e.g., new ESLint flat config and scripts/log.ts), which can break installs/CI if environments differ.

Overview
Modernizes repo tooling and developer workflow. Removes legacy .editorconfig/.eslintrc.cjs and introduces eslint.config.ts (flat config with strict type-aware TypeScript rules, React/React Compiler/React Refresh, and import sorting), plus Prettier and Stylelint configs/ignores.

Adds automated checks on git actions. Introduces Husky pre-commit (runs lint-staged) and pre-push (runs lint, stylelint, format), alongside .npmrc/.nvmrc and a small .gitignore tweak to allow committing .vscode/settings.json.

Updates template metadata. Refreshes README.md (versions, examples, paths) and index.html metadata, and replaces the old log.js script with scripts/log.ts that reports a fixed template id (react-ts) when running build/dev scripts.

Written by Cursor Bugbot for commit 9a8b28d. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Free Tier Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant