A modern Tetris implementation built with React, TypeScript, and Vite.
- React 19
- TypeScript 5.7
- Vite 6.1
- SWC (via @vitejs/plugin-react-swc)
- Node.js (version that matches your package.json engine requirements)
- npm or yarn
- Clone the repository
git clone git@github.com:realpeterz/tetris.git
cd tetris- Install dependencies
npm install- Start the development server
npm run devnpm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
The project uses a modern ESLint setup with TypeScript support. To enable stricter type-aware linting rules, update the configuration:
- Configure parser options in
eslint.config.js:
export default tseslint.config({
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})- Enable type-checked configs:
- Replace
tseslint.configs.recommendedwith either:tseslint.configs.recommendedTypeCheckedortseslint.configs.strictTypeChecked
- Optionally add
...tseslint.configs.stylisticTypeChecked
MIT

