This template provides a minimal setup to get React working based on Vitejs
The template includes:
- react@19
- typescript
- unocss
- vite@6
- prettier
- eslint@9
- eslint rules for react
- eslint rules for typescript
- eslint rules for prettier: provides standard code styles
- eslint rules for import: sort import statements in order. The order is:
- side effect imports
- node.js builtins
- packages
- internal packages defined in
tsconfig.app.json
, e.g.@/components
- parent imports: import '../xx'
- other relative imports './xx'
- eslint rules for react-hooks
- eslint rules for react-refresh
- eslint rules for unocss: sort the
className
in jsx
@apply
directive in css file- icon preset enabled: solar icons
- prettier enabled
- eslint enabled
- sort import statements
- vscode plugins:
- unocss plugin conflicts with tailwindcss plugin. please disable tailwindcss plugin.
you can use degit
or github template
to get the seed project:
npm install -g degit
degit ludafa/react-project-scaffold your-project-name
- open this template project on github
- use this template:
- git clone your new repo and ready to start!
- replace the project name in
package.json
/react-project.code-workspace
- rename the workspace file name from
react-project.code-workspace
toyour-project-name.code-workspace
.