Skip to content

Commit

Permalink
Setup precommit hooks for tests using husky
Browse files Browse the repository at this point in the history
Signed-off-by: Omkar Phansopkar <[email protected]>
  • Loading branch information
OmkarPh committed Sep 4, 2023
1 parent 989e44d commit 96d85b8
Show file tree
Hide file tree
Showing 4 changed files with 67 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"

npm test
44 changes: 44 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Virtual environment
.venv/

# sphinx build folder
build/

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db

# Editor backup files #
#######################
*~
16 changes: 16 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 @@ -26,7 +26,8 @@
"lint": "eslint --ext .ts,.tsx .",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage"
"test:coverage": "jest --coverage",
"prepare": "husky install"
},
"devDependencies": {
"@electron-forge/cli": "^6.1.1",
Expand Down Expand Up @@ -65,6 +66,7 @@
"eslint-plugin-css-import-order": "^1.1.0",
"eslint-plugin-import": "^2.26.0",
"fork-ts-checker-webpack-plugin": "^7.2.13",
"husky": "^8.0.3",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.2",
"json-loader": "^0.5.7",
Expand Down

0 comments on commit 96d85b8

Please sign in to comment.