cleaning up linter rules to accurately catch errors.

This commit is contained in:
2023-01-20 09:31:13 -08:00
parent d660b3d800
commit 2f9b7cc7a3
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
(ns hooks.logging
(:require [clj-kondo.hooks-api :as api]))
(defn with-context-as [{:keys [:node]}]
(let [[_ _ binding & body ] (:children node)]
{:node
(api/list-node
(list*
(api/token-node 'let)
(api/vector-node [binding {}])
body))}))
(defn capture-context->lc [{:keys [:node]}]
{:node
(api/list-node
(list*
(api/token-node 'let)
(api/vector-node [(api/token-node 'lc) {}])
(:children node)))})