Skip to content

Commit 84834b7

Browse files
committed
chore: replace pre-commit with husky
1 parent c53ffd7 commit 84834b7

File tree

3 files changed

+24
-159
lines changed

3 files changed

+24
-159
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
npm run format
2+
npm run typecheck
3+
npm run lint:fix
4+
git add .

package-lock.json

Lines changed: 17 additions & 150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,8 @@
2121
"lint:prettier": "prettier --check '**/*.(yml|json|md)'",
2222
"format": "prettier --write './**/*.{js,ts,md,json,yml,md}' --config ./.prettierrc",
2323
"typecheck": "tsc --noEmit",
24-
"git:add": "git add ."
24+
"prepare": "husky"
2525
},
26-
"pre-commit": [
27-
"format",
28-
"typecheck",
29-
"lint:fix",
30-
"git:add"
31-
],
3226
"repository": {
3327
"type": "git",
3428
"url": "git+https://github.com/IQSS/dataverse-client-javascript.git"
@@ -54,9 +48,9 @@
5448
"eslint-plugin-prettier": "4.2.1",
5549
"eslint-plugin-simple-import-sort": "10.0.0",
5650
"eslint-plugin-unused-imports": "2.0.0",
51+
"husky": "9.1.7",
5752
"jest": "^29.4.3",
5853
"jest-environment-jsdom": "29.7.0",
59-
"pre-commit": "1.2.2",
6054
"prettier": "2.8.4",
6155
"testcontainers": "^10.11.0",
6256
"ts-jest": "^29.0.5",
@@ -69,4 +63,4 @@
6963
"turndown": "^7.1.2",
7064
"typescript": "^4.9.5"
7165
}
72-
}
66+
}

0 commit comments

Comments
 (0)