npm i eslint vite-plugin-eslint eslint-config-react-app --save-dev
To get started, install prettier-plugin-tailwindcss
as a dev-dependency:
npm install -D prettier prettier-plugin-tailwindcss
Then add the plugin to your Prettier configuration:
// .prettierrc
{
plugins: ["prettier-plugin-tailwindcss"],
}
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh