styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Use Husky with Lint Staged

Open emersonlaurentino opened this issue 4 years ago • 0 comments

Due to the large amount of errors that I had in the project and I needed to push so that other people could correct them, I decided to remove the husky from the project. #1080

However, when there are no more problems with the lint. We must add again. #1082

Follows the settings:

package.json

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,js,tsx,jsx}": [
      "eslint --fix",
      "prettier --write"
    ],
    "*.json": [
      "prettier --write"
    ]
  },
  "devDependencies": {
    "husky": "^4.2.0",
    "lint-staged": "^10.0.2"
  }
}

emersonlaurentino avatar Mar 12 '20 07:03 emersonlaurentino