Skip to content

Commit 0c6c268

Browse files
committed
Fix lint script and add husky to chaincode/typescript
1 parent c5dabbb commit 0c6c268

File tree

5 files changed

+135
-9
lines changed

5 files changed

+135
-9
lines changed

.husky/pre-commit

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
. "$(dirname "$0")/_/husky.sh"
33
cd utility-emissions-channel/typescript_app
44
npm run lint
5+
cd ../..
6+
cd utility-emissions-channel/chaincode/typescript
7+
npm run lint

utility-emissions-channel/chaincode/typescript/package-lock.json

+25-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utility-emissions-channel/chaincode/typescript/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"lint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
99
"lint:fix": "eslint 'src/**/*.ts' 'test/**/*.ts' --fix",
1010
"test": "mocha -r ts-node/register 'test/**/*.test.ts'",
11-
"start": "node dist/index.js"
11+
"start": "node dist/index.js",
12+
"prepare": "cd ../../.. && husky install"
1213
},
1314
"author": "hyperledger",
1415
"license": "Apache-2.0",
@@ -19,11 +20,14 @@
1920
"@types/node": "^14.14.37",
2021
"@types/rewire": "^2.5.28",
2122
"@typescript-eslint/eslint-plugin": "^4.33.0",
23+
"@typescript-eslint/parser": "^4.33.0",
2224
"chai": "^4.3.4",
2325
"eslint": "^7.32.0",
2426
"eslint-config-prettier": "^8.3.0",
2527
"eslint-plugin-prettier": "^4.0.0",
28+
"husky": "^7.0.4",
2629
"mocha": "^8.3.2",
30+
"prettier": "^2.4.1",
2731
"sinon": "^10.0.0",
2832
"ts-node": "^9.1.1",
2933
"typescript": "^4.2.3"

utility-emissions-channel/typescript_app/package-lock.json

+99
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utility-emissions-channel/typescript_app/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prod": "yarn build && yarn start",
1515
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts'",
1616
"lint:fix": "eslint 'src/**/*.ts' 'tests/**/*.ts' --fix",
17-
"prepare": "cd .. && cd .. && husky install"
17+
"prepare": "cd ../.. && husky install"
1818
},
1919
"keywords": [],
2020
"author": "",
@@ -53,6 +53,7 @@
5353
"@types/ssh2-streams": "^0.1.9",
5454
"@types/swagger-ui-express": "^4.1.2",
5555
"@typescript-eslint/eslint-plugin": "^4.31.1",
56+
"@typescript-eslint/parser": "^4.33.0",
5657
"chai": "^4.3.4",
5758
"chai-as-promised": "^7.1.1",
5859
"chai-http": "^4.3.0",
@@ -62,6 +63,7 @@
6263
"husky": "^7.0.4",
6364
"mocha": "^9.0.0",
6465
"nyc": "^15.1.0",
66+
"prettier": "^2.4.1",
6567
"ts-node": "^10.0.0",
6668
"typescript": "^4.3.5",
6769
"ws-wallet": "^1.1.5"

0 commit comments

Comments
 (0)