This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-17
Channels
- # announcements (7)
- # babashka (56)
- # beginners (114)
- # bristol-clojurians (4)
- # calva (22)
- # cider (7)
- # clara (1)
- # clj-kondo (17)
- # cljs-dev (1)
- # clojure (93)
- # clojure-europe (8)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-uk (79)
- # clojuredesign-podcast (18)
- # clojurescript (108)
- # code-reviews (6)
- # cursive (3)
- # data-science (16)
- # datomic (151)
- # duct (7)
- # emacs (10)
- # events (1)
- # fulcro (76)
- # luminus (8)
- # off-topic (3)
- # other-lisps (2)
- # pathom (8)
- # re-frame (5)
- # reitit (8)
- # schema (9)
- # shadow-cljs (37)
- # specter (3)
- # sql (17)
- # tree-sitter (2)
- # yada (9)
hello! I’m using clj-kondo in vscode via Calva and it doesn’t seem to be picking up the config.edn
file inside .clj-kondo
in the root of my project, no matter what I put there, the linting I get is always the same, can anyone help me troubleshoot what I’m doing wrong?
@danimartinprieto clj-kondo looks from the current working directory upwards. VSCode set the current working directory to the workspace or directory that you are editing. If you are editing files outside your workspace, then clj-kondo won't be able to find the config.
mmm, it turns out vscode had opened as a workspace the parent folder of my project, I’ve closed it and open with vscode exactly the root of my project and now it works
I have a follow up question… I have a macro that does this (it’s not important what it does, actually)
(defmacro defstyles [sym styles]
"Takes a clojure map an creates a react-native StyleSheet from it without runtime clj->js conversion"
`(let [s# (.create (.-StyleSheet (js/require "react-native")) ~(make-styles styles))]
(defn ~sym [k#]
(goog.object/get s# (name k#)))))
and every time I use it, it says the symbol it defines is unresolved… I’ve tried excluding that macro in the config file but it doesn’t work
:unresolved-symbol {:exclude [(my.macro.namespace/defstyles)]}
the unresolved symbol is not the macro itself, but what I define with it, so in this example:
(defstyles styles …)
styles
is marked as unresolved and that’s what I want to avoid adding the exclude