From 1d3ac979e8cdddc890a54aaed9236a8de0846691 Mon Sep 17 00:00:00 2001 From: Joshua Jones Date: Mon, 23 Jan 2023 11:24:04 -0800 Subject: [PATCH 1/3] Add husky --- .husky/pre-commit | 4 ++++ src/package-lock.json | 23 ++++++++++++++++++++++- src/package.json | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..ac2d668dd --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +cd ./src && npm run lint:ts diff --git a/src/package-lock.json b/src/package-lock.json index fce36aba6..afdd0d39f 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -58,7 +58,6 @@ "keycloak-connect": "^17.0.1", "lodash": "^4.17.21", "multer": "^1.4.2", - "next": "9.5.5", "nodemailer": "^6.6.0", "npmlog": "^6.0.1", "numeral": "^2.0.6", @@ -134,6 +133,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", @@ -28852,6 +28852,21 @@ "node": ">=8.12.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -71884,6 +71899,12 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" }, + "husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/src/package.json b/src/package.json index 17eca2c84..01b9c89c0 100644 --- a/src/package.json +++ b/src/package.json @@ -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", @@ -179,6 +180,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", From 38cce9842d910e21198a2711f609a971d33bb3b0 Mon Sep 17 00:00:00 2001 From: ikethecoder Date: Mon, 13 Feb 2023 12:13:25 -0800 Subject: [PATCH 2/3] do server side linting --- .husky/pre-commit | 2 +- src/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index ac2d668dd..8c1b59297 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -cd ./src && npm run lint:ts +cd ./src && npm run lint:ts && npm run lint:ts-server diff --git a/src/package.json b/src/package.json index 01b9c89c0..8d6239942 100644 --- a/src/package.json +++ b/src/package.json @@ -45,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", From 18770c360bb1dac36bc94f368828ff3c9d806c4a Mon Sep 17 00:00:00 2001 From: ike thecoder Date: Wed, 15 Feb 2023 14:45:42 -0800 Subject: [PATCH 3/3] Update ci-build-deploy.yaml --- .github/workflows/ci-build-deploy.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-deploy.yaml b/.github/workflows/ci-build-deploy.yaml index 4a7aa53ad..c7ea96943 100644 --- a/.github/workflows/ci-build-deploy.yaml +++ b/.github/workflows/ci-build-deploy.yaml @@ -122,10 +122,12 @@ jobs: maxUnavailable: 100% readinessProbe: - timeoutSeconds: 20 + timeoutSeconds: 30 + periodSeconds: 120 livenessProbe: - timeoutSeconds: 20 + timeoutSeconds: 30 + periodSeconds: 120 persistence: enabled: true