Fork me on GitHub
#nbb
<
2023-05-25
>
chaos16:05:41

Hi, am I correct to in assuming that clj-kondo does not have linting support for macros in built-in nbb libraries such as promesa? I'm getting wiggling lines in my editor for promesa's let macro bindings for example

borkdude16:05:12

It does if you add the project to deps.edn etc

borkdude16:05:23

Work is in progress to improve this

chaos17:05:55

ok thanks good to know this is WIP, env in concern has no access to bb so putting it as a dep in nbb.edn is not an option.

chaos17:05:17

Is there a GH issue perhaps for this WIP or perhaps I can create one if not already?

borkdude19:05:55

I’ll get back to you, on a trip in London right now

🎉 2
Chris McCormick23:05:49

> I'm getting wiggling lines in my editor for promesa's let macro bindings for example @U012BL6D9GE You probably already know this but if you want to lint p/let as let you can use a config like this: {:lint-as {promesa.core/let clojure.core/let}} You can either put it in .clj-kondo/config.edn or as metadata in the .cljs file in question:

(ns thing
  {:clj-kondo/config '{:lint-as {promesa.core/let clojure.core/let}}})

chaos19:05:14

Thanks @UUSQUGUF3. The slight annoyance here is that promesa comes with clj-kondo configs, but they are not available/not picked by clj-kondo because promesa is a built-in nbb lib.

chaos19:05:39

Another workaround perhaps along the line you've suggested is to merge the promesa https://github.com/funcool/promesa/blob/master/resources/clj-kondo.exports/funcool/promesa/config.edn to the project's .clj-kondo/config.edn, and repeat for any other built-in nbb lib.

Chris McCormick05:05:28

That's a good point. I guess it would be solved in nbb could pull in Clojure libs.