Documentation Index
Fetch the complete documentation index at: https://mintlify.com/typescript-exercises/typescript-exercises/llms.txt
Use this file to discover all available pages before exploring further.
Development Setup
This guide will help you set up your local development environment for contributing to TypeScript Exercises.Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 12 or higher (as specified in package.json)
Yarn
Yarn package manager (recommended) or npm
Git
For cloning and version control
Code Editor
VS Code recommended for TypeScript development
Installation Steps
Install Dependencies
Install all project dependencies using Yarn:
The project uses Yarn by default (as mentioned in README.md). Using Yarn is recommended for consistency.
Start the Development Server
Launch the development server to see the exercises in action:This runs
EXTEND_ESLINT=true react-app-rewired start and opens the application at http://localhost:3000Available Scripts
The project includes several npm scripts for development:Development & Build
Linting & Code Quality
The project uses Husky for Git hooks. A pre-commit hook automatically runs
npm run lint before each commit to ensure code quality.Advanced
Eject Configuration
Key Technologies
The project is built with the following technologies:Core Framework
Core Framework
- React (v16.13.1) - UI library
- TypeScript (~3.7.2) - Type-safe JavaScript
- React Scripts (v4.0.3) - Build tooling
- React App Rewired - Custom build configuration
Code Editor
Code Editor
- Monaco Editor (v0.20.0) - VS Code-based code editor
- Monaco Editor Webpack Plugin - Integration with build system
Linting & Formatting
Linting & Formatting
- ESLint (v7.11.0) - Code linting
- @typescript-eslint (v4.28.2) - TypeScript-specific rules
- Prettier (v2.3.2) - Code formatting
- Husky (v4.2.5) - Git hooks for pre-commit linting
State & Utilities
State & Utilities
- RxJS (v6.5.5) - Reactive programming
- Emotion - CSS-in-JS styling
- React Redux - State management (if needed)
TypeScript Configuration
The project uses strict TypeScript settings:tsconfig.json highlights
The
src/exercises directory is excluded from the main TypeScript compilation. Each exercise has its own isolated type checking.Exercise Structure
Exercises are located insrc/exercises/[number]/:
Troubleshooting
Port 3000 already in use
Port 3000 already in use
If port 3000 is already in use, you can specify a different port:
ESLint errors on start
ESLint errors on start
Make sure your code follows the project’s linting rules:Some errors may need manual fixing.
TypeScript compilation errors
TypeScript compilation errors
Clear the TypeScript cache and reinstall dependencies:
Monaco Editor not loading
Monaco Editor not loading
The Monaco Editor requires specific webpack configuration. Make sure
monaco-editor-webpack-plugin is properly installed and configured in config-overrides.js.Next Steps
Now that your environment is set up:Read the Guidelines
Learn about code style and contribution standards
Explore Exercises
Navigate through existing exercises to understand the structure