mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 08:08:29 +02:00
📎 Add improved kondo hook analyzer for rumext/fnc
This commit is contained in:
parent
4dc41724de
commit
e8808bc8a4
2 changed files with 14 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
app.util.services/defmethod hooks.export/service-defmethod
|
app.util.services/defmethod hooks.export/service-defmethod
|
||||||
app.common.record/defrecord hooks.export/penpot-defrecord
|
app.common.record/defrecord hooks.export/penpot-defrecord
|
||||||
app.db/with-atomic hooks.export/penpot-with-atomic
|
app.db/with-atomic hooks.export/penpot-with-atomic
|
||||||
|
rumext.v2/fnc hooks.export/rumext-fnc
|
||||||
}}
|
}}
|
||||||
|
|
||||||
:output
|
:output
|
||||||
|
|
|
@ -58,6 +58,19 @@
|
||||||
(api/vector-node [params params])]
|
(api/vector-node [params params])]
|
||||||
body))})))
|
body))})))
|
||||||
|
|
||||||
|
(defn rumext-fnc
|
||||||
|
[{:keys [node]}]
|
||||||
|
(let [[cname mdata params & body] (rest (:children node))
|
||||||
|
[params body] (if (api/vector-node? mdata)
|
||||||
|
[mdata (cons params body)]
|
||||||
|
[params body])]
|
||||||
|
(let [result (api/list-node
|
||||||
|
(into [(api/token-node 'fn)
|
||||||
|
params]
|
||||||
|
(cons mdata body)))]
|
||||||
|
{:node result})))
|
||||||
|
|
||||||
|
|
||||||
(defn penpot-defrecord
|
(defn penpot-defrecord
|
||||||
[{:keys [:node]}]
|
[{:keys [:node]}]
|
||||||
(let [[rnode rtype rparams & other] (:children node)
|
(let [[rnode rtype rparams & other] (:children node)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue