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 start
This will start the Vite development server and open the application in your default web browser.
To create a production build:
npm run build
This will compile the TypeScript files and bundle the application using Vite.
To lint the project:
npm run lint
To fix linting errors:
npm run lint:fix
To check for type errors:
npm run types:check
To check for circular dependencies:
npm run lint:deps
Pre-commit checks (type checking and dependency linting) are enforced using Husky and lint-staged:
npm run git:pre-commit
To run the tests:
npm run test
To run the tests with coverage:
npm run test:coverage
To run the tests with a UI:
npm run test:ui
To preview the production build:
npm run preview
- React
- React DOM
- React Router DOM
- Emotion (for CSS-in-JS)
- Material-UI
- React Query (for data fetching)
- i18next (for internationalization)
- TypeScript
- Vite
- ESLint (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.