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
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description
<!-- Briefly explain what was done in this PR. -->

## Change Type
- [ ] New Feature
- [ ] Bug Fix
- [ ] Refactoring
- [ ] Documentation
- [ ] Maintenance Task

## Checklist
- [ ] Code follows defined style standards.
- [ ] New or updated tests added.
- [ ] Test coverage remains acceptable.
- [ ] Documentation has been updated, if applicable.

## Related to
<!-- Reference issues or other PRs. -->
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.idea

/node_modules

/app/dist
/app/build
/app/node_modules
Expand Down
24 changes: 24 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo "Running pre-commit..."

# shellcheck disable=SC2164
cd app

echo "Running lint fix..."
npm run lint:fix

echo "Running format fix..."
npm run format:fix

# shellcheck disable=SC2103
cd ..

if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected after formatting, adding to commit"
git add .
echo "Changes added to the commit"
else
echo "No changes to add"
fi
11 changes: 11 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)

if echo "$BRANCH_NAME" | grep -qE '^(feature|bugfix|release|hotfix)\/[a-z0-9-]+$'; then
echo "Valid branch name: $BRANCH_NAME"
else
echo "🚫 The branch name '$BRANCH_NAME' does not follow the Gitflow standard."
echo "Valid example: feature/new-functionality"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export class HttpExceptionFilter implements ExceptionFilter {
const response = ctx.getResponse<Response>();

if (exception instanceof CustomBaseException) {
response.status(exception.statusCode).json({
errors: exception.errors,
});
response.status(exception.statusCode).json({ errors: exception.errors });
return;
}

Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"prepare": "husky"
},
"dependencies": {
"husky": "^9.1.7"
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


husky@^9.1.7:
version "9.1.7"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
Loading