Skip to content

Commit f1e4b25

Browse files
committed
LAM-2016 Added pre-commit hook for linting node.js
1 parent 1aef030 commit f1e4b25

3 files changed

Lines changed: 5743 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn test

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts'",
2121
"format": "prettier --write 'src/**/*.ts' 'tests/**/*.ts'",
2222
"clean": "rm -rf dist",
23-
"preversion": "npm run lint && npm run build"
23+
"preversion": "npm run lint && npm run build",
24+
"prepare": "husky"
2425
},
2526
"keywords": [],
2627
"author": "",
@@ -36,7 +37,9 @@
3637
"eslint-config-prettier": "^9.1.0",
3738
"eslint-plugin-import": "^2.31.0",
3839
"eslint-plugin-prettier": "^5.2.1",
40+
"husky": "^9.1.7",
3941
"jest": "^29.7.0",
42+
"lint-staged": "^17.0.5",
4043
"prettier": "^3.3.3",
4144
"ts-jest": "^29.2.5",
4245
"ts-node": "^10.9.2",
@@ -51,10 +54,17 @@
5154
"ajv": "^8.17.1",
5255
"ajv-formats": "^3.0.1",
5356
"axios": "^1.9.0",
57+
"got": "^11.8.6",
5458
"ioredis": "^5.4.1",
5559
"lru-cache": "^11.0.2",
5660
"nanoid": "^3.3.11",
5761
"viem": "^2.21.42",
5862
"web3": "^4.15.0"
63+
},
64+
"lint-staged": {
65+
"*.{js,ts}": [
66+
"eslint --fix",
67+
"prettier --write"
68+
]
5969
}
6070
}

0 commit comments

Comments
 (0)