This is my personal TypeScript template, a simple starting point I use for new projects. It comes with a strict tsconfig, ESLint, Prettier, and some handy .vscode settings to keep everything consistent and easy to work with.
- TypeScript 100%
| .vscode | ||
| .editorconfig | ||
| .eslintrc.cjs | ||
| .gitattributes | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc.json | ||
| bun.lock | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| setup.ts | ||
| tsconfig.json | ||
TypeScript Project Template
A modern TypeScript project template with Bun runtime, featuring an epic setup wizard and best practices out of the box.
🚀 Features
- ⚡ Bun Runtime - Fast package management and bundling
- 🎯 TypeScript 5.0 - Full type safety with strict configuration
- 🎨 ESLint + Prettier - Code quality and consistent formatting
- 📦 Zero Config - Works out of the box with sensible defaults
- 🧙♂️ Setup Wizard - Interactive project initialization with random memes
- 🔧 VS Code Ready - Optimized settings and extension recommendations
🎭 Quick Start
-
Use this template:
-
Run the setup wizard:
bun run setup -
Start developing:
bun run dev
The setup wizard will:
- Configure your project name and description
- Set up your author information (from git config)
- Generate a clean
src/index.tsentry point - Create a project-specific README
- Format everything with Prettier
- Clean up after itself
📋 Available Scripts
| Script | Description |
|---|---|
bun run setup |
Run the interactive setup wizard |
bun run dev |
Development with hot reload |
bun run build |
Build for production |
bun start |
Run the built application |
bun run lint |
Lint and fix code |
bun run lint:check |
Check for linting errors |
bun run format |
Format code with Prettier |
bun run format:check |
Check code formatting |
bun run type-check |
TypeScript type checking |
🏗️ Project Structure
├── src/
│ └── index.ts # Main entry point
├── .eslintrc.cjs # ESLint configuration
├── .prettierrc # Prettier configuration
├── .gitattributes # Git line ending enforcement
├── .gitignore # Git ignore rules
├── .editorconfig # Editor configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
└── setup.ts # Epic setup wizard (self-deleting)
⚙️ Configuration
TypeScript
- Strict type checking enabled
- Modern ES2022 target
- Path aliases support ready
- Declaration files generated
ESLint
- TypeScript-specific rules
- Import organization
- Prettier integration
- Custom rule preferences
Prettier
- LF line endings enforced
- Consistent code formatting
- Works with ESLint
VS Code
- Auto-format on save
- Extension recommendations
- Workspace settings included
🎨 Code Style
This template enforces:
- Arrow functions preferred over function declarations
- const/let over var (prefer const when possible)
- Import organization with automatic sorting
- LF line endings across all platforms
- No trailing semicolons (handled by Prettier)
- Consistent quotes and spacing
🛠️ Built With
- Bun - Fast JavaScript runtime and package manager
- TypeScript - Type-safe JavaScript
- ESLint - Code quality and consistency
- Prettier - Code formatting
📝 License
MIT - see LICENSE for details.
💡 Why This Template?
- Modern Stack: Bun + TypeScript for maximum performance and type safety
- Developer Experience: Everything configured for a smooth development workflow
- Best Practices: Follows current TypeScript and Node.js best practices
- Fun Setup: Because setting up projects should be enjoyable, not boring
- Zero Bloat: Only includes what you actually need