A modern, fast starter template using Vite, React, and Tailwind CSS. Includes built-in linting, formatting, and best practices for rapid development.
- β‘οΈ Instant dev server with Vite
- π¨ Tailwind CSS with configuration
- βοΈ React 19 with component-based architecture
- π§Ό HTMLHint, ESLint (with React plugins), Stylelint
- ποΈ Prettier + Tailwind plugin
- π§ͺ Vitest testing framework
- π‘οΈ React Error Boundary
- β‘οΈ Performance optimizations (React.memo, lazy loading)
- π Bundle analyzer for build optimization
- πͺ Pre-commit hooks with Husky + lint-staged
- π οΈ Ready-to-use scripts:
dev,build,preview,test - π¦ Minimal, production-ready config
- π§© Easily extendable toolchain
src/β Source filescomponents/β React componentstest/β Test setup and utilitiesmain.jsxβ React entry pointstyle.cssβ Global styles
dist/β Production build output (gitignored)index.htmlβ Entry HTML filevite.config.jsβ Vite configvitest.config.jsβ Vitest configtailwind.config.jsβ Tailwind CSS configeslint.config.js,.stylelintrc,.htmlhintrcβ Lint configsprettier.config.mjsβ Formatting config.lintstagedrc.jsβ Lint-staged configpackage.jsonβ Scripts & dependencies
npx degit marcop135/vite-react-tailwind-lint my-app
cd my-app
npm install
npm run devnpm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Lint JS, JSX, CSS, HTML files
npm run lint:fix # Lint and auto-fix issues where possible
npm run format # Format html, css, js, jsx, and MD files
npm test # Run tests with Vitest
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
npm run analyze # Build and analyze bundle sizeNow edit the following files to start customizing:
index.htmlβ Main HTML filesrc/main.jsxβ React entry pointsrc/components/β React components
Includes:
eslintβ Lint JavaScript/JSX (with React plugins)stylelintβ Lint CSShtmlhintβ Lint HTMLprettierβ Format codehusky+lint-stagedβ Pre-commit hooks
npm run lint
npm run formatPre-commit hooks will automatically run linting and formatting on staged files.
Linting & Formatting Commands:
# Lint all JSX files in src/
npx eslint "src/**/*.{js,jsx}"
# Lint all CSS files in src/
npx stylelint "src/**/*.css"
# Lint all HTML files in the project
npx htmlhint "**/*.html"
# Check code formatting
npx prettier --check "src/**/*.{js,jsx,css,html,md}"This project uses Vitest for testing.
npm test # Run tests once
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverageTest files should be placed alongside components or in a __tests__ directory.
- Tailwind CSS + Vite
- Vite Guide
- Tailwind Config
- React
- Vitest
- HTMLHint
- Stylelint
- ESLint
- Prettier
- Husky
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Licensed under the MIT License.