This project is a template setup for a React application using Vite, Airbnb ESLint configuration, Prettier for code formatting, and TailwindCSS for styling.
- Clone the repository:
git clone https://github.com/yourusername/vite-airbnb-prettier-tailwindcssformatter.git
cd vite-airbnb-prettier-tailwindcssformatter- Install dependencies:
npm install
# or
yarn installYou can run these scripts using npm or yarn:
npm run dev
# or
yarn devreact: ^18.2.0react-dom: ^18.2.0react-router-dom: ^6.23.1
@trivago/prettier-plugin-sort-imports: ^4.3.0@types/react: ^18.2.43@types/react-dom: ^18.2.17@upleveled/prettier-plugin-tailwindcss: ^0.6.0@vitejs/plugin-react: ^4.2.1autoprefixer: ^10.4.19eslint: ^8.56.0eslint-config-airbnb: ^19.0.4eslint-config-prettier: ^9.1.0eslint-plugin-import: ^2.29.1eslint-plugin-jsx-a11y: ^6.8.0eslint-plugin-prettier: ^5.1.3eslint-plugin-react: ^7.33.2eslint-plugin-react-hooks: ^4.6.0eslint-plugin-react-refresh: ^0.4.5postcss: ^8.4.38prettier: ^3.2.5tailwindcss: ^3.4.3vite: ^5.0.8vite-plugin-svgr: ^4.2.0
This project uses the Airbnb style guide for ESLint. The configuration can be found in the .eslintrc file. You can adjust the rules as needed.
Prettier is used for code formatting, with some additional plugins for sorting imports and formatting TailwindCSS classes. The configuration can be found in the .prettierrc file.
TailwindCSS is set up and configured via the tailwind.config.js file. You can customize the configuration as per your project requirements.
Vite is used as the build tool and development server. The configuration can be found in the vite.config.js file.
To start the development server, run:
npm run dev
# or
yarn devTo build the application for production, run:
npm run build
# or
yarn buildTo preview the production build, run:
npm run preview
# or
yarn previewTo lint the code, run:
npm run lint
# or
yarn lintTo format the code using Prettier, run:
npm run format
# or
yarn formatTo check if the code is formatted correctly, run:
npm run prettier
# or
yarn prettierThis project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request for any changes.