Here's the updated README.md for the given package.json
, excluding Redux Toolkit:
This template provides a minimal setup for developing React applications with TypeScript, Vite, and an optimized developer experience. It includes essential libraries and tools for building modern, scalable applications.
Make sure you have the following installed:
Clone the repository and install dependencies:
git clone https://github.com/your-username/react-ts-vite-template.git
cd react-ts-vite-template
npm install
Start the development server:
npm run dev
Run ESLint to check code quality:
npm run lint
Build the project for production:
npm run build
Preview the built project:
npm run preview
For production-grade projects, enable type-aware lint rules:
Configure parserOptions
in eslint.config.js
:
export default tseslint.config({
languageOptions: {
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});
Replace tseslint.configs.recommended
with tseslint.configs.recommendedTypeChecked
or tseslint.configs.strictTypeChecked
.
Add React-specific linting rules:
import react from "eslint-plugin-react";
export default tseslint.config({
settings: { react: { version: "18.3" } },
plugins: { react },
rules: {
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
},
});
This template uses Husky and Commitlint to enforce conventional commit messages.
Install Husky hooks:
npx husky install
Follow Conventional Commits when committing changes.
This template is open-source and available under the MIT License. Feel free to use and customize it as needed.