From 83e3acff092fc7460628cdcc384583cf970e8a78 Mon Sep 17 00:00:00 2001
From: gregor <gregor.schulz@holi.social>
Date: Fri, 7 Mar 2025 09:14:02 +0100
Subject: [PATCH] lint and fmt in pre-commit

---
 .pre-commit-config.yaml | 12 ++++++++++++
 deno.json               |  4 ----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f4b830c..c62552e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,3 +7,15 @@ repos:
         entry: gitleaks protect --staged -v -c ../.gitleaks.toml
         pass_filenames: false
         always_run: true
+      - id: lint
+        name: deno lint
+        entry: deno lint
+        language: system
+        types: [ file, ts ]
+        pass_filenames: false
+      - id: format
+        name: deno fmt
+        entry: deno fmt
+        language: system
+        types: [ file, ts ]
+        pass_filenames: false
diff --git a/deno.json b/deno.json
index 2c94ba5..40d2426 100644
--- a/deno.json
+++ b/deno.json
@@ -11,10 +11,6 @@
     "start": "deno run --allow-import --allow-net --allow-env --allow-read --lock=deno.lock --cached-only app/main.ts",
     "docker": "docker build -t events . && docker run -it --init -p 8001:8001 events",
     "smoketest": "BASE_URL=http://localhost:8006/graphql k6 run smoketest/main.js",
-    "pre-commit": {
-      "cmd": "deno task lint && deno task fmt:check",
-      "gitHook": "pre-commit"
-    }
   },
   "fmt": {
     "lineWidth": 120,
-- 
GitLab