styleguide
styleguide copied to clipboard
Use Husky with Lint Staged
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"
}
}