A modern, production-ready TypeScript & Vite starter template with comprehensive tooling for front-end development.
- Vite - build tool with HMR.
- TypeScript - strict type checking with modern ES features.
- Vitest - unit testing with coverage reports.
- SCSS - modern CSS with variables, mixins and a functioning theming system.
- ESLint + Prettier - code formatting and linting.
- Husky & lint-staged - pre-commit hooks.
- VS Code - optimized workspace settings.
- Path aliases - clean import statements with
@/
prefix.
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Open browser - Vite will automatically open http://localhost:3000.
Command | Description |
---|---|
npm run dev |
Start development server with HMR. |
npm run build |
Build for production. |
npm run preview |
Preview production build locally. |
npm run test |
Run tests once. |
npm run test:watch |
Run tests in watch mode. |
npm run test:ui |
Open Vitest UI for interactive testing. |
npm run test:coverage |
Generate test coverage report. |
npm run lint |
Check code with ESLint. |
npm run lint:fix |
Fix ESLint issues automatically. |
npm run format |
Format code with Prettier. |
npm run type-check |
Check TypeScript types. |
npm run ci |
Run all checks (CI pipeline). |
src/
├── main.ts # Application entry point.
├── utils/
│ └── app.ts # Application setup utilities.
├── styles/
│ └── _variables.scss # SCSS variables and design tokens.
└── types/
└── assets.d.ts # Type definitions for assets.
styles/
├── main.scss # Global styles.
└── _reset.scss # CSS reset.
tests/
├── app.test.ts # Example test file.
└── setup.ts # Test environment setup.
- Use TypeScript strict mode with additional safety checks.
- ESLint + Prettier enforced via pre-commit hooks.
- Path aliases for clean imports:
@/utils/app
instead of../utils/app
. - SCSS variables defined in
src/styles/_variables.scss
.
- Vitest with jsdom environment for DOM testing.
- Coverage reporting with v8 provider.
- Tests located in
tests/
directory.
- Recommended extensions auto-suggested.
- Format on save enabled.
- ESLint auto-fix on save.
- TypeScript import suggestions optimized.
- Build optimization with automatic code splitting.
- TypeScript compilation before Vite bundling.
- Source maps enabled for debugging.
- Modern target (ESNext) for optimal bundle size.
- Asset type definitions for static imports.
npm install some-ui-library
npm install -D @types/some-ui-library
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install zustand