Skip to content

Commit

Permalink
Set up pre-commit git hook using husky
Browse files Browse the repository at this point in the history
  • Loading branch information
romaricpascal committed Sep 14, 2022
1 parent aabfda2 commit 6a785ae
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"test:build:dist": "jest tasks/gulp/__tests__/after-build-dist.test.js",
"lint": "npm run lint:js && npm run lint:scss",
"lint:js": "standard",
"lint:scss": "stylelint \"app/**/*.scss\" \"src/**/*.scss\""
"lint:scss": "stylelint \"app/**/*.scss\" \"src/**/*.scss\"",
"prepare": "husky install"
},
"devDependencies": {
"@percy/cli": "^1.0.0-beta.75",
Expand Down Expand Up @@ -55,6 +56,7 @@
"gulp-task-listing": "^1.1.0",
"gulp-uglify": "^3.0.2",
"html5shiv": "^3.7.3",
"husky": "^8.0.1",
"jest": "^27.4.3",
"jest-axe": "^5.0.1",
"jest-puppeteer": "^6.0.2",
Expand Down

0 comments on commit 6a785ae

Please sign in to comment.