clj-kondo cleanup part 1
This commit is contained in:
parent
de1229cce2
commit
c321905680
3 changed files with 1 additions and 23 deletions
|
|
@ -1,4 +0,0 @@
|
||||||
{:hooks
|
|
||||||
{:analyze-call
|
|
||||||
{next.jdbc/with-transaction
|
|
||||||
hooks.com.github.seancorfield.next-jdbc/with-transaction}}}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
(ns hooks.com.github.seancorfield.next-jdbc
|
|
||||||
(:require [clj-kondo.hooks-api :as api]))
|
|
||||||
|
|
||||||
(defn with-transaction
|
|
||||||
"Expands (with-transaction [tx expr opts] body)
|
|
||||||
to (let [tx expr] opts body) pre clj-kondo examples."
|
|
||||||
[{:keys [:node]}]
|
|
||||||
(let [[binding-vec & body] (rest (:children node))
|
|
||||||
[sym val opts] (:children binding-vec)]
|
|
||||||
(when-not (and sym val)
|
|
||||||
(throw (ex-info "No sym and val provided" {})))
|
|
||||||
(let [new-node (api/list-node
|
|
||||||
(list*
|
|
||||||
(api/token-node 'let)
|
|
||||||
(api/vector-node [sym val])
|
|
||||||
opts
|
|
||||||
body))]
|
|
||||||
{:node new-node})))
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{:config-paths ["com.github.seancorfield/next.jdbc"]}
|
{:config-paths ["resources/clj-kondo.exports/com.github.seancorfield/next.jdbc"]}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue