pitch-io / uix

Idiomatic ClojureScript interface to modern React.js
https://github.com/pitch-io/uix?tab=readme-ov-file#docs
Eclipse Public License 2.0
359 stars 21 forks source link

clj-kondo exported config #76

Closed borkdude closed 2 years ago

borkdude commented 2 years ago

As discussed here: https://twitter.com/roman01la/status/1542854258235740160

I'd be happy to contribute this.

roman01la commented 2 years ago

@borkdude Is there any input you need in order to create clj-kondo rules for UIx? I guess we could also pull them from Helix?

borkdude commented 2 years ago

@roman01la If all macros with non-standard syntax are fully covered in the tests, we can try to make linting work using those examples. Haven't looked at helix, but this library is similar, we could re-use that.

roman01la commented 2 years ago

I think clj-kondo could check at least the following two forms:

  1. uix.core/defui as clojure.core/defn
  2. uix.core/$ should have the following signature ($ keyword-or-symbol ...any)
borkdude commented 2 years ago

Cool. And the keyword is an alias for a function?

roman01la commented 2 years ago

@borkdude Not sure I understand, but the keyword is Hiccup style syntax :dev#id.class etc. A symbol is a reference to a function.

borkdude commented 2 years ago

Sorry I haven't followed up here.