This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-24
Channels
- # aleph (19)
- # announcements (59)
- # asami (34)
- # aws (1)
- # babashka (17)
- # beginners (174)
- # bitcoin (11)
- # calva (16)
- # chlorine-clover (5)
- # cider (5)
- # clj-kondo (14)
- # cljsrn (13)
- # clojars (25)
- # clojure (124)
- # clojure-australia (1)
- # clojure-europe (48)
- # clojure-nl (4)
- # clojure-spec (1)
- # clojure-uk (40)
- # conjure (6)
- # core-async (25)
- # cursive (30)
- # data-oriented-programming (3)
- # datomic (14)
- # depstar (14)
- # emacs (3)
- # graalvm (27)
- # helix (1)
- # honeysql (25)
- # hoplon (3)
- # jobs-discuss (6)
- # kaocha (3)
- # lsp (109)
- # lumo (1)
- # malli (5)
- # meander (21)
- # music (1)
- # pathom (1)
- # re-frame (4)
- # reitit (1)
- # remote-jobs (1)
- # reveal (11)
- # rewrite-clj (3)
- # shadow-cljs (42)
- # spacemacs (15)
- # sql (13)
- # startup-in-a-month (4)
- # tools-deps (45)
- # vim (16)
- # xtdb (23)
- # yada (1)
Hi. Quick question about unused cljs requires! :)) The following seems to elicit a false positive:
[react-autosuggest :as AutoSuggest] > warning: namespace react-autosuggest is required but never used
There's also an erroneous 'Unresolved symbol' in one of the two places AutoSuggest
is passed as a component to https://github.com/lilactown/helix/blob/master/docs/creating-elements.md#-macro $
(???):
($ AutoSuggest > error: Unresolved symbol: AutoSuggest
{:suggestions ...
...
($ AutoSuggest {:getSuggestionValue get-suggestion-value ...
Now, https://www.npmjs.com/package/react-autosuggest (see pic below) kinda suggests that I should be doing [react-autosuggest :refer [Autosuggest]]
or something, not :as
. But making this change (and accounting for AutoSuggest
-> Autosuggest
) breaks things. (Separate issue, but probably because of helix...)
So it could be that react-autosuggest
is just strange (and I should add an inline reader comment or do some other config, say). Or maybe kondo doesn't realise react-autosuggest
is a js module, not a ns? Or something else?@U018D6NKRA4 Let's start with the first issue
This seems to do it @U04V15CAJ: https://github.com/CarnunMP/kondo-repro
In fact, both the 'required but never used' warning and the 'Unresolved symbol' error show up:
@U018D6NKRA4 Yeah, this is a known issue. You should use a string namespace when using npm deps.
(ns hello
(:require ["react-autosuggest" :as AutoSuggest]))
(defn x
[]
(AutoSuggest))