Does anybody have a config.edn that stops cljs-ajax GET and POST being marked as unresolved vars. I’ve tried variants of this so far to no avail:
linters {:unresolved-symbol
{:exclude [GET POST]}}
@grumplet I think this should be fixed if you do {:lint-as {ajax.macros/easy-api clojure.core/def}}
and then lint the cljs-ajax dependency once again
Thanks 🙂 - I’ll give it a go!
@borkdude - yep that worked 🙂 - I had convinced myself that :lint-as def wouldn’t work because my source didn’t refer to the easy-api directly - only to GET and POST.
How it works: when it lints the ajax.core namespace clj-kondo collects the vars and stores them in a cache. but with the macro it doesn't know what to do, unless you have some config for it. using the above config, clj-kondo will also treat the macro as def and so it stores the var names in the cache. So when using the ajax.core namespace, clj-kondo now knows about the GET
etc var in the ajax.core namespace and they are no longer unresolved.
Thanks for a great linter! I just added kondo hooks for the macros in https://github.com/IGJoshua/farolero/tree/feature/clj-kondo-config
Great :)