move hooks to properly namespaced folder

This commit is contained in:
Sean Corfield 2021-11-07 13:23:03 -08:00
parent 0565b2c8bb
commit de1229cce2
4 changed files with 14 additions and 5 deletions

View file

@ -1 +1,4 @@
{:hooks {:analyze-call {next.jdbc/with-transaction hooks.next-jdbc/with-transaction}}}
{:hooks
{:analyze-call
{next.jdbc/with-transaction
hooks.com.github.seancorfield.next-jdbc/with-transaction}}}

View file

@ -1,4 +1,4 @@
(ns hooks.next-jdbc
(ns hooks.com.github.seancorfield.next-jdbc
(:require [clj-kondo.hooks-api :as api]))
(defn with-transaction

View file

@ -1 +1,4 @@
{:hooks {:analyze-call {next.jdbc/with-transaction hooks.next-jdbc/with-transaction}}}
{:hooks
{:analyze-call
{next.jdbc/with-transaction
hooks.com.github.seancorfield.next-jdbc/with-transaction}}}

View file

@ -1,7 +1,10 @@
(ns hooks.next-jdbc
(ns hooks.com.github.seancorfield.next-jdbc
(:require [clj-kondo.hooks-api :as api]))
(defn with-transaction [{:keys [:node]}]
(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)