Skip to content

Commit

Permalink
Add pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Delemangi committed Dec 14, 2023
1 parent afe68d6 commit 3f7fe4f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ It's recommended, but not required to run this inside a Docker container.

## Installation

For development purposes, be sure to run `npm run prepare` to install the Git pre-commit hooks.

### Installation (Docker)

1. Clone the repository: `git clone [email protected]:Delemangi/finki-discord-bot.git`
Expand Down
22 changes: 22 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@types/async-lock": "^1.4.2",
"eslint": "^8.55.0",
"eslint-config-canonical": "^42.8.0",
"husky": "^8.0.3",
"prisma": "^5.7.0",
"typescript": "^5.3.3"
},
Expand All @@ -40,6 +41,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"migration:apply": "prisma migrate deploy",
"migration:create": "prisma migrate dev --name a",
"prepare": "husky install",
"start": "node dist/main.js",
"start:dev": "npm run lint && npm run build && npm run start",
"start:prod": "npm run migration:apply && npm run start"
Expand Down

0 comments on commit 3f7fe4f

Please sign in to comment.