react-ts-starter Tailwind Templates

React Ts Starter

A modern minimal Vite + React + TypeScript and Tailwind template with pre-configured ESLint (with Airbnb JS/React rules), Prettier, Testing with Jest and Git hooks with Husky out of the box 📦

ViteRC ❤️‍🔥

A modern minimal Vite + React + TypeScript + TailwindCSS template with pre-configured ESLint (with Airbnb JS/React rules), Prettier, Testing with Jest and Git hooks with Husky out of the box 📦

Vite React TypeScript ESLint Prettier Jest Testing Library Commitlint

Screenshot

Features

  • ⚡️ Vite - Next Generation Frontend Tooling
  • ⚛️ React 18 - A JavaScript library for building user interfaces
  • 💎 TypeScript - Why not?!
  • 🔨 EsLint - Pluggable JavaScript linter
  • 🌀 Prettier - Opinionated Code Formatter
  • 🐺 Husky - Native Git hooks
  • ⚙️ Jest - Testing libraries
  • ⌨️ Absolute Imports
  • 📑 Commitlint - Linting your commits based on commit convention

Why

This template arose out of a need to unite all the above libraries, which were not found in the existing Vite templates. This template has an active contributors that will update everything on this template as needed

Usage

npx degit dmitrix11/react-ts-starter my-app

cd my-app

# Required if you want a repository and work with Git hooks
git init

pnpm install

pnpm dev

Available commands

In this project, you can run the following scripts:

Script Description
pnpm dev Runs the app in the development mode.
pnpm build Builds the app for production to the dist folder.
pnpm preview Builds the app for production to the dist folder, and run locally server.
pnpm lint Runs the Eslint and show code problems
pnpm lint:fix Runs the Eslint and fix the code problems
pnpm format Runs the Prettier and fix code style
pnpm compile Runs the TS Compiling
pnpm test Run the app tests.
pnpm commit Open the CZ CLI to create a message to your commit.

About the absolute imports

To have correctly functioning (code and tests) of absolute imports, you should add some codes in some files, like:

  • jest.config.js
  • vite.config.ts
  • tsconfig.json

TODO

  • Eslint
  • Prettier
  • Husky
  • Testing Tools
  • Absolute imports
  • Commit linting

License

MIT

Top categories

Loading Svelte Themes