This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-28
Channels
- # announcements (1)
- # beginners (128)
- # calva (15)
- # cider (1)
- # clerk (4)
- # clj-kondo (10)
- # clojure-berlin (5)
- # clojure-denmark (2)
- # clojure-europe (59)
- # clojure-nl (2)
- # clojure-norway (83)
- # clojure-sweden (3)
- # clojure-uk (4)
- # cursive (11)
- # datomic (8)
- # emacs (13)
- # events (1)
- # hyperfiddle (3)
- # juxt (2)
- # malli (13)
- # nrepl (10)
- # off-topic (46)
- # releases (2)
- # reveal (1)
- # rewrite-clj (6)
- # sci (6)
- # scittle (17)
- # shadow-cljs (2)
- # xtdb (2)
- # yamlscript (8)
clj-kondo tip of the day: https://x.com/borkdude/status/1806594169529340188 - thanks to who prompted me to write the :redundant-str-call
linter, enjoying it a lot :)
Cool! Just tried it on cljdoc and it found a couple things. I really love clj-kondo! β€οΈ
Is there a way to determine why clj-kondo is triggering a warning for a linter? I have a ClojureScript project that makes use of modules. One namespace in a non-main module requires [helix.hooks :as hooks]
and has a component calling hooks/use-effect
, yet clj-kondo marks the require as unused. This also happens for re-frame and some subscriptions. Not sure why. It doesn't happen for other libraries required.
one of my pages is as small as
(ns web.routes.admin.root
(:require [helix.core :refer [<>]]
[helix.hooks :as hooks]
[re-frame.core :as rf]
[web.hooks.re-frame :refer [use-sub]]
[web.utils.render :refer [defnc]]))
(defnc page []
(let [tenant (use-sub [:router.params/tenant])]
(hooks/use-effect :once
(rf/dispatch [:router/navigate :routes.admin/home {:tenant tenant}])))
(<>))
and clj-kondo is marking helix.hooks
, re-frame.core
, and web.hooks.re-frame
as unusedive tried making a repro over the past few days but with no luck. i suspect there may be something with shadow-cljs modules triggering this issue, since it only ever happens in files belonging to non-main modules, but not sure yet.