GitHub - coreyward/quick-start-react-template: Template repo for apps using pnpm, React, Vite, and TypeScript. Comes with Oxlint, ESLint, Prettier, and Vitest pre-configured and ready to rock.

Vite + React + TypeScript Template

A minimal, production-ready template for building React applications with Vite, TypeScript, and modern tooling.

Features

  • โšก๏ธ Vite - Fast build tool with HMR
  • โš›๏ธ React 19 - Latest React with TypeScript
  • ๐Ÿ”ง SWC - Fast TypeScript/JSX compilation
  • ๐Ÿงช Vitest + Testing Library - Unit testing with React Testing Library
  • ๐ŸŽจ Prettier - Code formatting
  • ๐Ÿ” OxLint + ESLint - Fast, comprehensive linting
    • OxLint handles performance-critical rules
    • ESLint handles React-specific and stylistic rules
  • ๐Ÿ“ฆ pnpm - Fast, disk-efficient package manager

Getting Started

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview

Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production (includes type checking)
  • pnpm preview - Preview production build
  • pnpm test - Run tests once
  • pnpm test:watch - Run tests in watch mode
  • pnpm test:ui - Run tests with UI
  • pnpm test:coverage - Run tests with coverage report
  • pnpm typecheck - Run TypeScript type checking
  • pnpm lint - Run OxLint and ESLint
  • pnpm lint:fix - Auto-fix linting issues
  • pnpm format - Format code with Prettier
  • pnpm format:check - Check code formatting

Project Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ test/
โ”‚   โ”‚   โ””โ”€โ”€ setup.ts     # Test setup (jest-dom matchers)
โ”‚   โ”œโ”€โ”€ App.tsx          # Main app component
โ”‚   โ”œโ”€โ”€ App.test.tsx     # App component tests
โ”‚   โ””โ”€โ”€ main.tsx         # App entry point
โ”œโ”€โ”€ index.html           # HTML template
โ”œโ”€โ”€ vite.config.ts       # Vite configuration
โ”œโ”€โ”€ vitest.config.ts     # Vitest configuration
โ”œโ”€โ”€ tsconfig.json        # TypeScript config (references)
โ”œโ”€โ”€ tsconfig.app.json    # TypeScript config for app code
โ”œโ”€โ”€ tsconfig.node.json   # TypeScript config for Node.js tooling
โ”œโ”€โ”€ eslint.config.js     # ESLint configuration
โ”œโ”€โ”€ oxlintrc.json        # OxLint configuration
โ””โ”€โ”€ .prettierignore      # Prettier ignore patterns

Linting Strategy

This template uses a dual-linting approach with strict type checking enabled by default:

  1. OxLint runs first with type-aware checking and handles:

    • Correctness rules (syntax errors, common mistakes)
    • React rules (jsx-key, no-children-prop, etc.)
    • TypeScript rules (await-thenable, no-floating-promises, etc.)
    • Unicorn rules (modern JavaScript patterns)
    • Accessibility rules (jsx-a11y)
  2. ESLint runs second with:

    • OxLint-handled rules disabled (via eslint-plugin-oxlint)
    • Strict type-aware TypeScript rules (strictTypeChecked)
    • Stylistic type-aware rules (stylisticTypeChecked)
    • React-specific rules (hooks, refresh)

This configuration provides comprehensive safety and consistency out of the box.