This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-15
Channels
- # announcements (8)
- # beginners (65)
- # calva (25)
- # cider (11)
- # clj-kondo (9)
- # cljsrn (14)
- # clojure (103)
- # clojure-europe (15)
- # clojure-greece (1)
- # clojure-italy (28)
- # clojure-nl (39)
- # clojure-spec (9)
- # clojure-uk (28)
- # clojuredesign-podcast (37)
- # clojurescript (56)
- # cursive (41)
- # data-science (10)
- # datomic (25)
- # duct (1)
- # emacs (1)
- # events (3)
- # figwheel-main (7)
- # fulcro (9)
- # graalvm (7)
- # graphql (10)
- # jobs (2)
- # nrepl (17)
- # off-topic (40)
- # quil (12)
- # reitit (11)
- # remote-jobs (5)
- # rum (2)
- # shadow-cljs (387)
- # sql (22)
- # tools-deps (8)
- # vim (26)
- # xtdb (47)
- # yada (9)
@martinklepsch I looked at the README and found this snippet:
(ns foo
(:require [rum.core :as rum]))
(rum/defcs stateful < (rum/local 0 ::key)
[state label]
(let [local-atom (::key state)]
[:div { :on-click (fn [_] (swap! local-atom inc)) }
label ": " @local-atom]))
(rum/mount (stateful "Click count") js/document.body)
I think I would config that as:
{:lint-as {rum.core/defcs clojure.core/def}
:linters {:unresolved-symbol {:exclude [(rum.core/defcs)]}}}
so you will lint the macro as def because it defs a var, but you will ignore all unresolved symbols in the call to it
created a project board for clj-kondo here: https://github.com/borkdude/clj-kondo/projects/1
I see, thanks @borkdude! would it be in scope for clj-kondo to support custom macros like defc
and friends more completely?
could implement support for it. is rum considered a widely used lib and does the author plan to support it long term? (I noticed he recently removed the patreon link for it)
I would consider it among the more popular libs for sure. I think there’s not much active development but people use it and its stable.
alright. could you make an issue for it and describe some variations of macros that you think should be supported?
it's not that hard probably. clj-kondo also supports other defn like macros like schema.core/defn
@borkdude logged an issue: https://github.com/borkdude/clj-kondo/issues/536 thanks for considering it 🙂