@secondcloset/eslint-config-react

1.2.3 • Public • Published

Secondcloset eslint-config-react

Installation

Run the following command:

  npm i --save-dev @secondcloset/eslint-config-react @secondcloset/prettier-config

How to use

  1. In your react project, create an .eslintrc.js file and add these changes:
module.exports = {
  extends: ["@secondcloset/react"],
  parserOptions: {
    project: "./tsconfig.json",
  }
};
  1. Add these packages in your repo's package.json devDependencies attribute:
  "@typescript-eslint/parser": "^4.33.0",
  "eslint": "^7.32.0",
  "eslint-config-prettier": "^8.3.0",
  "eslint-config-react": "^1.1.7",
  "eslint-config-react-app": "^6.0.0",
  "eslint-plugin-import": "^2.25.2",
  "eslint-plugin-react-hooks": "^4.2.0",
  "prettier": "^2.4.1"
  1. Add these scripts in your repo's package.json scripts attribute:
  "lint": "eslint src --ext .js,.ts,.tsx",
  "lint:fix": "eslint src --ext .js,.ts,.tsx --fix",
  1. Install the newly added packages:
  npm install
  1. Add the prettier config to your package.json file:
  "prettier": "@secondcloset/prettier-config"
  1. Test the configuration:
  npm run lint

Readme

Keywords

none

Package Sidebar

Install

npm i @secondcloset/eslint-config-react

Weekly Downloads

43

Version

1.2.3

License

MIT

Unpacked Size

7.58 kB

Total Files

4

Last publish

Collaborators

  • paollenado
  • rafslzr-gb
  • raymondgabriel
  • arnaldo.tayao
  • redlpd-gb
  • michaelgoboltnpm
  • selinasha
  • snoopy55619819-bolt
  • virgilligobolt
  • jorge_h_ramos_dev
  • jaybihbolt
  • michaelellisbolt
  • kyosan.ku
  • keleung
  • fadil.mamedov
  • dkpbolt
  • scdevelopers
  • chankakyan
  • tralfamadorian
  • sephlao
  • alexcheng068
  • krisha-sc
  • fbadin-sc
  • annielyz
  • hsmysk
  • john2021