Skip to content

Commit 65a57ef

Browse files
RONAK-AI647MisRob
authored andcommitted
Adding husky for yarn lint-fix
1 parent 469cd24 commit 65a57ef

File tree

3 files changed

+263
-5
lines changed

3 files changed

+263
-5
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn lint-staged

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222
"test:percy": "PERCY_LOGLEVEL=info npx percy exec -v -- jest --config jest.conf/visual.index.js",
2323
"test": "jest --config=jest.conf/index.js",
2424
"test:visual": "VISUAL_TESTING=true concurrently --kill-others --success first --names \"SERVER,TEST\" -c \"bgCyan.bold,bgYellow.bold\" \"yarn dev-only > /dev/null 2>&1\" \"yarn test:percy\"",
25-
"_api-watch": "chokidar \"**/lib/**\" -c \"node utils/extractApi.js\""
25+
"_api-watch": "chokidar \"**/lib/**\" -c \"node utils/extractApi.js\"",
26+
"prepare": "husky install"
2627
},
2728
"files": [
2829
"lib"
2930
],
31+
"lint-staged": {
32+
"*.{js,vue}": "yarn lint-fix"
33+
},
3034
"dependencies": {
3135
"aphrodite": "https://github.com/learningequality/aphrodite/",
3236
"autosize": "3.0.21",
@@ -65,11 +69,13 @@
6569
"consola": "^2.15.3",
6670
"eslint-import-resolver-nuxt": "^1.0.1",
6771
"eslint-plugin-jest-dom": "^5.5.0",
72+
"husky": "^8.0.0",
6873
"jest": "^29.7.0",
6974
"jest-environment-jsdom": "^29.7.0",
7075
"jest-puppeteer": "^10.0.1",
7176
"jest-serializer-vue": "^3.1.0",
7277
"kolibri-format": "^1.0.0",
78+
"lint-staged": "^15.2.11",
7379
"lockr": "^0.8.4",
7480
"material-design-icons": "^3.0.1",
7581
"mock-match-media": "^0.4.3",

0 commit comments

Comments
 (0)