Skip to content

Commit 898876d

Browse files
author
Kent C. Dodds
committed
fix husky
1 parent 9c51bd9 commit 898876d

File tree

1 file changed

+6
-2
lines changed
  • 08-auto-format-all-files-and-validate-relevant-files-in-a-precommit-script-with-lint-staged

1 file changed

+6
-2
lines changed

08-auto-format-all-files-and-validate-relevant-files-in-a-precommit-script-with-lint-staged/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"flow": "flow",
99
"format": "npm run prettier -- --write",
1010
"prettier": "prettier \"**/*.+(js|json|ts|tsx|md)\"",
11-
"validate": "npm run lint && npm run prettier -- --list-different && npm run flow",
12-
"precommit": "lint-staged && npm run flow"
11+
"validate": "npm run lint && npm run prettier -- --list-different && npm run flow"
1312
},
1413
"devDependencies": {
1514
"babel-eslint": "^10.0.2",
@@ -19,5 +18,10 @@
1918
"husky": "^3.0.2",
2019
"lint-staged": "^9.2.1",
2120
"prettier": "^1.18.2"
21+
},
22+
"husky": {
23+
"hooks": {
24+
"pre-commit": "lint-staged && npm run flow"
25+
}
2226
}
2327
}

0 commit comments

Comments
 (0)