This is a scaffolding project for building a React application using TypeScript and Vite. It includes various tools and configurations to streamline development, linting, testing, and building processes.
- Node.js (>=16.0.0)
- npm (>=10.8.0)
-
Clone the repository:
git clone https://github.com/your-username/vite-react-ts-scaffolding.git cd vite-react-ts-scaffolding -
Install dependencies:
npm install
To start the development server:
npm startThis will start the Vite development server and open the application in your default web browser.
To create a production build:
npm run buildThis will compile the TypeScript files and bundle the application using Vite.
To lint the project:
npm run lintTo fix linting errors:
npm run lint:fixTo check for type errors:
npm run types:checkTo check for circular dependencies:
npm run lint:depsPre-commit checks (type checking and dependency linting) are enforced using Husky and lint-staged:
npm run git:pre-commitTo run the tests:
npm run testTo run the tests with coverage:
npm run test:coverageTo run the tests with a UI:
npm run test:uiTo preview the production build:
npm run preview- React
- React DOM
- React Router DOM
- Tailwind
- React Query (for data fetching)
- i18next (for internationalization)
- Zustand (for state management)
- TypeScript
- Vite
- BiomeJS (with plugins for TypeScript, React, and Prettier)
- Vitest (for testing)
- Testing Library (for testing React components)
- Husky (for Git hooks)
- Lint-staged (for running linters on staged files)
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.