Fork me on GitHub
#clj-kondo
<
2022-01-09
>
ikitommi18:01:57

where should I put the malli (library) clj-kondo file so it gets picked up for library users? Have two configs locally, one for the lib and another as the user schemas for the project (generated)

.clj-kondo
  metosin
    malli
      config.edn ;; this one
    malli-types
      config.edn

ikitommi18:01:23

currently:

{:lint-as {malli.experimental/defn schema.core/defn}}
 :linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}}

ikitommi18:01:18

could merge those into the generated file, but if there is a way not to do it, Iā€™m all šŸ‘‚s.

borkdude18:01:10

@U055NJ5CC do you want to export a configuration?

ikitommi18:01:24

how do I do it?

borkdude18:01:45

tl;r: you have to make a resources/clj-kondo.exports/metosin/malli directory and that directory contains the exported config.edn

borkdude18:01:21

and you can refer to your own exported config (as a developer of the library) in .clj-kondo/config.edn with :config-paths [".../resources/clj-kondo.exports/metosin/malli"]

borkdude18:01:11

as a user of the library, clj-kondo will copy the configuration when you lint the classpath with:

clj-kondo --lint $(clojure -Spath) --dependencies --copy-configs

borkdude18:01:20

the above is done by clojure-lsp automatically

ikitommi18:01:22

the guide was excellent, did all that. Would be great if Cursive or Clojure Extras would do the auto-import with Idea too.

borkdude18:01:36

I've discussed with @brcosta and he will probably do that

šŸ‘ 2