feat: adds git hooks and husky for pre-commit linting

This commit is contained in:
Agusti Fernandez Pardo
2022-03-25 02:18:43 +01:00
parent a71039328f
commit 2e2f6a5e57
2 changed files with 10 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn pre-commit
+6 -2
View File
@@ -11,9 +11,12 @@
"start": "next start",
"build": "next build",
"lint": "next lint",
"lint-fix": "next lint --fix",
"test": "jest --detectOpenHandles",
"type-check": "tsc --pretty --noEmit",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"prepare": "husky install",
"pre-commit": "next lint"
},
"devDependencies": {
"@babel/core": "^7.17.8",
@@ -22,9 +25,10 @@
"@calcom/prisma": "*",
"@calcom/tsconfig": "*",
"babel-jest": "^27.5.1",
"husky": "^7.0.4",
"jest": "^27.5.1",
"node-mocks-http": "^1.11.0",
"typescript": "^4.5.3"
"typescript": "^4.6.3"
},
"dependencies": {
"next": "^12.1.0",