Skip to content

Commit

Permalink
feat: add husky hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedorrychkov committed Jul 28, 2024
1 parent b4b6562 commit 534ed4d
Show file tree
Hide file tree
Showing 4 changed files with 307 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm run lint-staged && pnpm run lint:fix
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config ./test/jest-e2e.json",
"lint-staged": "lint-staged --allow-empty",
"prepare": "node .husky/install.mjs"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"pnpm lint --fix"
]
},
"dependencies": {
"@google-cloud/firestore": "^7.9.0",
Expand Down Expand Up @@ -46,7 +53,9 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"husky": "^9.1.3",
"jest": "^29.5.0",
"lint-staged": "^15.2.7",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
Expand Down
Loading

0 comments on commit 534ed4d

Please sign in to comment.