Giter Club home page Giter Club logo

react-starter-kit's Introduction

React Starter Kit

A minimal React starter kit with ESLint, Prettier, auto-sorting of imports, Tailwind CSS, and DaisyUI. Clone, install, and start building instantly without worrying about package configurations or setups. ๐Ÿš€

๐Ÿ› ๏ธ Getting Started

Clone and Install

  1. Clone the repository:

    git clone https://github.com/07SUJITH/react-starter-kit.git
  2. Navigate into the project directory:

    cd react-starter-kit
  3. Install dependencies:

    npm install

Update Dependencies

To update all dependencies in a single step before starting to build, run:

npx npm-check-updates -u
npm install

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ .eslintrc.cjs
โ”œโ”€โ”€ .git
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ node_modules
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ postcss.config.js
โ”œโ”€โ”€ .prettierignore
โ”œโ”€โ”€ .prettierrc.json
โ”œโ”€โ”€ public
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ src
โ”œโ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ vite.config.js
โ””โ”€โ”€ .vscode

๐Ÿ“ฆ Dependencies

Core Dependencies

  • React: ^18.3.1
  • React-DOM: ^18.3.1
  • React Icons: ^5.2.1
  • React Router: ^6.24.0
  • Framer Motion: ^11.2.12

Development Dependencies

  • @types/react: ^18.3.3
  • @types/react-dom: ^18.3.0
  • @vitejs/plugin-react: ^4.3.1
  • autoprefixer: ^10.4.19
  • daisyui: ^4.12.10
  • eslint: ^8.57.0
  • eslint-plugin-react: ^7.34.2
  • eslint-plugin-react-hooks: ^4.6.2
  • eslint-plugin-react-refresh: ^0.4.7
  • eslint-plugin-simple-import-sort: ^12.1.0
  • postcss: ^8.4.38
  • prettier: 3.3.2
  • tailwindcss: ^3.4.4
  • vite: ^5.3.1

๐Ÿ–Œ๏ธ Prettier Setup Guide

  1. Create a .prettierrc.json file and add some Prettier rules:

    {
        "trailingComma": "es5",
        "tabWidth": 4,
        "semi": false,
        "singleQuote": true
    }
  2. Create a .prettierignore file and add the following:

    node_modules
    # Ignore artifacts:
    build
    coverage
    
  3. Execute Prettier with auto-fix in a file:

    npx prettier --write <targetFile>
  4. Create a .vscode folder in the root of the project.

  5. Create a settings.json file inside the .vscode folder and insert the following code:

    {
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "editor.formatOnSave": true
    }
  6. Install the Prettier VSCode extension (so you can run it using some shortcuts, etc).

Now, every file saved will be formatted with the Prettier formatting rules. ๐ŸŽ‰

โœจ ESLint Setup Guide

ESLint with auto import sort is added and configured in the .eslintrc.cjs file.

  1. Run ESLint with Fix:

    npx eslint . --fix
  2. To run it automatically on save, follow these steps:

    • Open settings.json in the VSCode configuration settings.
    • Add the following line:
      "editor.codeActionsOnSave": {
          "source.fixAll.eslint": true
      }

๐Ÿ“œ Scripts

Here are the npm scripts available in this project:

  • Start Development Server: npm run dev
  • Build for Production: npm run build
  • Preview Production Build: npm run preview
  • Lint: npm run lint

Happy coding! ๐Ÿš€

react-starter-kit's People

Contributors

07sujith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.