metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.46k stars 208 forks source link

Add clj-kondo support for cljs function schemas #833

Closed dvingo closed 1 year ago

dvingo commented 1 year ago

Fixes https://github.com/metosin/malli/issues/828

After lots of help from Thomas Heller here I was able to put together a much simpler dev experience for cljs.

This PR adds kondo config and updates the docs with Thomas' recommended setup using a preload and namespace ordering by the compiler to ensure your function schemas are up to date when malli.dev.cljs/start! is evaluated at compile-time.

I updated the kondo save! function to emit to a different location for clj and cljs schemas so you can seamlessly use both during development. Let me know if you have any concerns or feedback about that .

dvingo commented 1 year ago

Thanks @thheller ! updated per your feedback : )

dvingo commented 1 year ago

n part you can just call the above function instead of repeating the code.

ah of course - updated

ikitommi commented 1 year ago

This is really well though though, implemented and documented 🙇