Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add husky #747

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ jobs:
maxUnavailable: 100%

readinessProbe:
timeoutSeconds: 20
timeoutSeconds: 30
periodSeconds: 120

livenessProbe:
timeoutSeconds: 20
timeoutSeconds: 30
periodSeconds: 120

persistence:
enabled: true
Expand Down
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"

cd ./src && npm run lint:ts && npm run lint:ts-server
23 changes: 22 additions & 1 deletion src/package-lock.json

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

3 changes: 3 additions & 0 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"delay": 2500
},
"scripts": {
"prepare": "cd .. && husky install src/.husky && husky install",
"prebuild": "tslint -p tsconfig.json --fix",
"ts-watch": "tsc --watch --jsx react-jsx",
"ts-build": "tsc",
Expand All @@ -44,6 +45,7 @@
"create-tables": "cross-env CREATE_TABLES=true keystone create-tables --entry=dist/server.js",
"lint": "eslint ./nextapp --ext .ts,.tsx --quiet",
"lint:ts": "tsc -p ./nextapp/tsconfig.json --noEmit",
"lint:ts-server": "tsc -p ./tsconfig.json --noEmit",
"test": "cross-env NODE_ENV=test jest --config ./jest.config.js --coverage --detectOpenHandles",
"test:next": "jest --config ./nextapp/jest.config.js --coverage",
"test:next-watch": "jest --watch --config ./nextapp/jest.config.js",
Expand Down Expand Up @@ -179,6 +181,7 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^8.0.3",
"identity-obj-proxy": "^3.0.0",
"istanbul-lib-coverage": "^3.2.0",
"jest": "^27.5.1",
Expand Down