Skip to content

Commit

Permalink
add husky to control precommit error
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfahan committed Jun 6, 2021
1 parent 5f8ff96 commit 3730803
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn try
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"url": "https://github.com/fluid-framework/fluid/issues/"
},
"scripts": {
"prepack": "husky install",
"start": "npm-run-all -s watch",
"watch": "node-sass ./src --output ./temp/ --output-style compact --indent-type space --indent-width 2 --source-map true -w",
"try": "npm-run-all -s lint test",
Expand Down Expand Up @@ -63,12 +64,13 @@
"cssnano": "^4.1.10",
"find-unused-sass-variables": "^3.1.0",
"foreach-cli": "^1.8.1",
"husky": "^6.0.0",
"node-sass": "^5.0.0",
"npm-run-all": "^4.1.5",
"rfs": "^9.0.3",
"postcss": "^8.2.6",
"postcss-cli": "^8.3.1",
"postcss-combine-duplicated-selectors": "^10.0.2",
"rfs": "^9.0.3",
"shx": "^0.3.3",
"stylelint": "^13.9.0",
"stylelint-config-recommended-scss": "^4.2.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,11 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"

husky@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e"
integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==

ignore@^5.1.4, ignore@^5.1.8:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
Expand Down

0 comments on commit 3730803

Please sign in to comment.