-
Notifications
You must be signed in to change notification settings - Fork 7
Replace Husky with prek for pre-commit hooks #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| repos: | ||
| - repo: local | ||
| hooks: | ||
| - id: prettier-check | ||
| name: Prettier check | ||
| entry: npm run check | ||
| language: system | ||
| pass_filenames: false | ||
| stages: [pre-commit] | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,12 +9,12 @@ | |||||||||||||||||||||||||
| "check": "prettier --ignore-path .gitignore --check . '!{CODE_OF_CONDUCT.md,LICENSE.md,_layouts/default.html}'", | ||||||||||||||||||||||||||
| "commit": "cz", | ||||||||||||||||||||||||||
| "format": "prettier --ignore-path .gitignore --write . '!{CODE_OF_CONDUCT.md,LICENSE.md,_layouts/default.html}'", | ||||||||||||||||||||||||||
| "prepare": "husky" | ||||||||||||||||||||||||||
| "prepare": "prek install" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "devDependencies": { | ||||||||||||||||||||||||||
| "@j178/prek": "^0.3.4", | ||||||||||||||||||||||||||
| "commitizen": "^4.3.1", | ||||||||||||||||||||||||||
| "cz-conventional-changelog": "^3.3.0", | ||||||||||||||||||||||||||
|
Comment on lines
+12
to
17
|
||||||||||||||||||||||||||
| "prepare": "prek install" | |
| }, | |
| "devDependencies": { | |
| "@j178/prek": "^0.3.4", | |
| "commitizen": "^4.3.1", | |
| "cz-conventional-changelog": "^3.3.0", | |
| "prepare": "husky install" | |
| }, | |
| "devDependencies": { | |
| "commitizen": "^4.3.1", | |
| "cz-conventional-changelog": "^3.3.0", | |
| "husky": "^9.1.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-commit hook entry uses
npm run check, but the repository usespnpmas its package manager (evidenced bypnpm-lock.yaml). The previous.husky/pre-commitcorrectly usedpnpm check. Usingnpm run checkinstead ofpnpm run check(or simplypnpm check) is inconsistent with the project's package manager and may cause issues in environments where onlypnpmis guaranteed to be available, or where there could be dependency resolution differences between npm and pnpm.