Skip to content

Commit

Permalink
Merge pull request #426 from Green-Software-Foundation/precommit-hooks
Browse files Browse the repository at this point in the history
Precommit hooks and commitlint
  • Loading branch information
jmcook1186 committed Feb 5, 2024
2 parents 41f0967 + 5932162 commit 2ac1457
Show file tree
Hide file tree
Showing 7 changed files with 721 additions and 123 deletions.
21 changes: 21 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'chore',
'style',
'refactor',
'ci',
'test',
'revert',
'package',
],
],
},
};
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm test
npm run fix:package
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

Loading

0 comments on commit 2ac1457

Please sign in to comment.