Skip to content

Vite + React + Typescript template with testing, linters and CI

Notifications You must be signed in to change notification settings

alex-kim-dev/vite-react-template

Repository files navigation

Depfu CI

Vite React template

Features

  • PNPM, pinned versions of dependencies
  • Vite
    • import alias ~/ mapped to src
    • import SVGs as react components
  • React
  • Typescript
  • Vitest, Happy Dom, React Testing Library, test utils. In tests css processing is turned off
  • Eslint v9: typescript-eslint config with type checking, imports sorting
  • Stylelint: standard config, css properties sorting
  • Prettier & editorconfig
  • Commitlint: conventional commits
  • pre-commit hook for linting/testing/typechecking staged files
  • CI on push & pr, in-progress workflow cancelling if a new one is queued, dependencies caching

Usage

  1. Click the Use this template button or clone locally:

    pnpx degit alex-kim-dev/vite-react-template vite-project

    Both methods will clean the git history.

    degit

  2. Update & install the dependencies:

    pnpx ncu -u && pnpm i

    npm-check-updates

  3. Change the name, description, author, license, links in package.json.

  4. Check out the available scripts in package.json or execute pnpm run.