use lint-staged on pre commit hook

This commit is contained in:
João Geonizeli
2021-09-11 12:23:08 -03:00
parent 80bfdbe528
commit 17b39086d3
2 changed files with 222 additions and 7 deletions

View File

@@ -12,9 +12,14 @@
},
"husky": {
"hooks": {
"pre-commit": "yarn lint:fix"
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn lint"
]
},
"dependencies": {
"@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "^7.14.5",
@@ -62,6 +67,7 @@
"eslint-plugin-relay": "^1.8.2",
"graphql": "^15.5.1",
"husky": "^4.2.1",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"relay-compiler": "^11.0.2",
"relay-compiler-language-typescript": "^14.0.0",