Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
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
Copy link

Copilot AI Mar 6, 2026

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 uses pnpm as its package manager (evidenced by pnpm-lock.yaml). The previous .husky/pre-commit correctly used pnpm check. Using npm run check instead of pnpm run check (or simply pnpm check) is inconsistent with the project's package manager and may cause issues in environments where only pnpm is guaranteed to be available, or where there could be dependency resolution differences between npm and pnpm.

Suggested change
entry: npm run check
entry: pnpm check

Copilot uses AI. Check for mistakes.
language: system
pass_filenames: false
stages: [pre-commit]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ This is a GitHub template designed for small projects that is independent of the
### Consistency

- Consistent formatting via [Prettier](https://prettier.io/)
- Consistent commit messages according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) via [husky](https://github.com/typicode/husky)
- Consistent pre-commit checks via [prek](https://github.com/j178/prek)
- Consistent commit messages according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) via [commitizen](https://github.com/commitizen/cz-cli)
- Consistent versioning via [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- Consistent [fork and pull](https://gist.github.com/Chaser324/ce0505fbed06b947d962) workflow via [GitHub branch protection](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)
- Consistent issues via [issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
Expand Down Expand Up @@ -56,7 +57,6 @@ To initialize the template, [generate](https://github.com/maehr/github-template/

```bash
npm install
npm run prepare
```

2. Complete the following checklist of tasks to customize the template for your project:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @j178/prek package introduces axios (and its transitive dependencies: follow-redirects, form-data, proxy-from-env, axios-proxy-builder, etc.) as runtime dependencies. For a dev-only git hooks runner, this is a significant and unexpected supply chain dependency footprint. If prek needs to make HTTP calls (e.g., to download hooks), this may pose a security concern that is worth acknowledging. Consider whether this level of transitive dependency is acceptable given that the prior tool (husky) was essentially zero-dependency.

Suggested change
"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",

Copilot uses AI. Check for mistakes.
"husky": "^9.1.6",
"prettier": "^3.3.3"
},
"type": "module",
Expand Down
Loading