react-easy-setup
Version:
A custom React project setup with Husky and ESLint for pre-commit hooks and code quality
93 lines (67 loc) • 1.99 kB
Markdown
This project is a React application setup with React, React-router, ESLint, Prettier, and Husky for linting, code formatting, and pre-commit hooks.
- **React**: Latest version of React for building user interfaces.
- **Vite**: A fast build tool for development and production.
- **React Router Dom**: latest version of React router dom.
- **ESLint**: Linting to enforce code quality standards.
- **Prettier**: Automated code formatting.
- **Husky**: Git hooks to ensure code quality checks are applied before commits.
- **Lint-Staged**: Runs linters on pre-committed files to optimize linting performance.
Clone the repository to your local machine.
```bash
git clone https://github.com/akashpradhan-dev/react-husky-js.git
cd react-husky-js
```
2. Install dependencies
Install the project dependencies using npm or yarn.
```bash
npm install
yarn install
```
3. Start the development server
Start the development server using Vite.
```bash
npm run dev
yarn dev
```
4. Check for format: Checks for any code formatting issues using Prettier.
```bash
npm run format
yarn format
```
5. format:fix: Automatically formats the code using Prettier.
```bash
npm run format:fix
yarn format:fix
```
6. lint: Checks for any linting issues using ESLint.
```bash
npm run lint
yarn lint
```
7. lint:fix: Automatically fixes linting issues using ESLint.
```bash
npm run lint:fix
yarn lint:fix
```
8. husky: To check the husky working or not.
```bash
npx lint-staged
yarn lint-staged
```
if you want to add or remove any rules from eslint then you can do it from eslint.config.js file.
- To ignore any file or folder from eslint then you can add it in ignor array in eslint.config.js file.
```base
{ ignores: ['dist', 'dist/**', 'eslint.config.js', 'your path name'] },
```
- for any query or issue you can contact me on linkedin click here(https://www.linkedin.com/in/akash-pradhan/)