This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
If you don't have pnpm installed, you can enable it via corepack:
corepack enable
corepack prepare pnpm@latest --activateClone the repository and install dependencies using pnpm:
pnpm installThis repository is a monorepo managed by Lerna and pnpm workspaces.
-
Start Development Server:
pnpm run dev # or pnpm run sb # for Storybook
-
Build Project:
pnpm run build
-
Run Tests:
pnpm run test -
Linting:
pnpm run lint
We use Lerna for managing packages in packages/*.
-
Build all packages:
pnpm exec lerna run build -
Run command in specific package:
pnpm exec lerna run <command> --scope=<package-name>
-
Publish packages:
pnpm exec lerna publish -
Create a new component:
pnpm run new:component
Please read our Contributing Guide (if available) and check the Pull Request Template before submitting a PR. Ensure you follow the conventional commits specification.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: __dirname,
},
}- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist
Anderson Lima (Lemon 🍋)
Website: lemon.dev.br
Twitter: andersonlimadev
GitHub: andersonlimahw
LinkedIn: andersonlimadev