Skip to content

Commit

Permalink
Switch from 'simple-git-hooks' to 'husky'
Browse files Browse the repository at this point in the history
To be able to get rid of the workaround introduced in dbad224
  • Loading branch information
paescuj committed Jan 3, 2023
1 parent dbad224 commit 08a7d46
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec lint-staged
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"lint:fix": "pnpm run lint --fix",
"prepublishOnly": "safe-publish-latest --force-in-publish && pnpm run build",
"report-coverage": "cat coverage/lcov.info | coveralls",
"test": "jest"
"test": "jest",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -80,12 +81,12 @@
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"husky": "^8.0.3",
"jest": "^29.3.1",
"jest-create-mock-instance": "^2.0.0",
"lint-staged": "^13.0.4",
"prettier": "^2.6.2",
"safe-publish-latest": "^2.0.0",
"simple-git-hooks": "^2.7.0",
"string-argv": "^0.3.1",
"typescript": "~4.9.3"
},
Expand All @@ -97,11 +98,8 @@
"!**/*.spec.js",
"!**/*.spec.d.ts"
],
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged"
},
"lint-staged": {
"*.m?{js,ts}": "eslint --fix",
"*.?(m){js,ts}": "eslint --fix",
"*.{json,y?(a)ml,md}": "prettier --write"
}
}
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08a7d46

Please sign in to comment.