This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-08
Channels
- # announcements (10)
- # beginners (53)
- # calva (22)
- # clj-kondo (21)
- # cljs-dev (1)
- # clojure (18)
- # clojure-europe (2)
- # clojure-filipino (1)
- # clojure-indonesia (1)
- # clojure-my (1)
- # clojure-seattle (6)
- # clojure-sg (1)
- # clojurescript (60)
- # code-reviews (3)
- # conjure (1)
- # cursive (1)
- # datomic (2)
- # figwheel-main (1)
- # fulcro (2)
- # gratitude (1)
- # honeysql (35)
- # lsp (6)
- # malli (5)
- # meander (11)
- # off-topic (27)
- # other-languages (3)
- # play-clj (1)
- # portal (31)
- # sql (13)
- # xtdb (5)
Hi, I use clj-kondo with cursive (clojure-extras). Clj-kondo highlights <! function as an error "Unresolved symbol <!".
Whole clojure.core.async library functions are highlighted as unresolved
example: (buffer 5) clj-kondo: Unresolved symbol: buffer
Ah yeah, sorry
(ns app.home2.panel
(:require [app.state.core :as state]
[app.state.panel :as panel]
[app.listennotes.search-input-field :as search-podcast]
[app.audio.upload :as audio-upload]
[app.view.util :as utils]
[app.getting-started.wizard :as wizard]
[app.util :as u]
[app.util.string :as util-string]
[cljs-http.client :as http]
[clojure.string :as str]
[app.view.colors :as c]
[ :as home-help])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn find-rss-url
"If the user has provided a website link instead of a RSS feed URL,
the server tries to find a link to the RSS feed in the website."
[url]
(go
(let [response (<! (http/request
{:request-method :post
:url "/podcast-import/find-rss-url"
:transit-params {:url url}}))]
(get-in response
[:body
:url]))))
Code works without the reference, but this helps with the highlighting error. Thank you very much
I have no idea why it works without the refer, but you're supposed to do it like this :)
One more thing in cljs, about js/window.location.hash Some functions from js are not higlighted. (js is not required in any way). But the window.location is highlighted as "cannot be resolved"
example: (js/console "smth") <- it's fine (set! js/window.location.hash ..) js/window.location.hash cannot be resolved
@U0281QDFE1X does it say "clj-kondo" in that message? otherwise it might be coming from Cursive.
I don't think clj-kondo has a problem with this:
$ clj-kondo --lint - --lang cljs <<< '(set! js/window.location.hash "foo")'
linting took 15ms, errors: 0, warnings: 0
Oh right, sorry, it is not clj-kondo
Thank you very much for your help