Skip to content

Commit

Permalink
Merge pull request #208 from Nintails-TF/BE/adding-hooks
Browse files Browse the repository at this point in the history
Be/adding hooks
  • Loading branch information
FinnbarHome authored Feb 2, 2024
2 parents 023384e + dc3daa3 commit 1480e60
Show file tree
Hide file tree
Showing 7 changed files with 2,113 additions and 25 deletions.
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"
9 changes: 9 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if [ "$1" = "SKIP_HOOKS" ]; then
echo "Skipping hooks as requested."
exit 0
fi

#npm run lint
16 changes: 16 additions & 0 deletions be/package-lock.json

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

1 change: 1 addition & 0 deletions be/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"license": "ISC",
"devDependencies": {
"eslint": "^8.56.0",
"husky": "^9.0.10",
"jest": "^29.7.0",
"supertest": "^6.3.4"
},
Expand Down
13 changes: 13 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [
'feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert'
]],
'scope-enum': [2, 'always', [
'', // commits without a scope
'BE', 'FE', 'API' // specific microservice scopes
]]
}
};

Loading

0 comments on commit 1480e60

Please sign in to comment.