Skip to content

Instantly share code, notes, and snippets.

@tonytrg
Last active June 2, 2024 20:16
Show Gist options
  • Select an option

  • Save tonytrg/157f4dad78703f8d6d4e47eabb2ae47d to your computer and use it in GitHub Desktop.

Select an option

Save tonytrg/157f4dad78703f8d6d4e47eabb2ae47d to your computer and use it in GitHub Desktop.
React + Vite + Tailwind + ESLint Setup

Setup base template project

  1. Create React App with Vite
    1. Choose React Framework
    2. Choose Typescript + SWC
  2. Install Tailwind dependency
  3. Install standard dependencies
    1. Install react-router with npm i react-router-dom
    2. Install react-query with npm i @tanstack/react-query
  4. Configure vscode project settings with eslint config
    Click to expand ``` { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit", "source.addMissingImports": "explicit" }, "prettier.tabWidth": 2, "prettier.useTabs": false, "prettier.semi": true, "prettier.singleQuote": false, "prettier.jsxSingleQuote": false, "prettier.trailingComma": "es5", "prettier.arrowParens": "always", "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[css]": { "editor.defaultFormatter": "vscode.css-language-features" }, } ```
  5. Add component libraries
    1. shadcn/ui
    2. Material UI
    3. Daisy UI
    4. Chakra UI
    5. NextUI
    6. Ant Design
    7. Radix UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment