Skip to content

Commit 55e13e2

Browse files
committed
Moved over to a pure git-hooks setup
1 parent e546822 commit 55e13e2

File tree

7 files changed

+20
-27
lines changed

7 files changed

+20
-27
lines changed

.git_hooks/pre-commit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
# Get a list of the staged files
4+
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
5+
6+
# If the files list is empty exit
7+
[ -z "$FILES" ] && exit 0
8+
9+
echo "[Pre commit hook] Running standardrb linting"
10+
11+
docker compose run --rm --no-deps -T web standardrb $FILES

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,3 @@
4242
/app/javascript/routes.d.ts
4343

4444
/production_data
45-
46-
# Ignore node modules - especially becuase they're development only!
47-
/node_modules

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

bun.lockb

-21 KB
Binary file not shown.

install_git_hooks.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
echo "Installing git hooks\n"
4+
5+
echo "Copying contents of .git_hooks into .git/hooks\n"
6+
cp .git_hooks/* .git/hooks
7+
8+
echo "Install complete!"

package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

readme.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@
66

77
Everyone should have pre-commit hooks setup!
88

9-
1. Install bun
10-
11-
```
12-
brew tap oven-sh/bun
13-
brew install bun
14-
```
15-
16-
2. Install bun packages `bun install`
9+
1. Run `./install_git_hooks.sh`
1710

1811
3. Voila!
1912

0 commit comments

Comments
 (0)