lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
623 stars 52 forks source link

$ clj-kondo hook fails to lint & right when component is not a symbol #122

Closed lilactown closed 2 weeks ago

lilactown commented 1 year ago
($ (case :foo 1) {& "asdf"})

($ "foo" {& "bar"})

both of the above show a lint error Unresolved symbol: &

Using a symbol does not

(def foo)

($ foo {& "asdf"})

I think this is a bug in the clj-kondo hook for $ where if the first parameter is not a symbol, it breaks.

formsandlines commented 1 month ago

I don’t get any lint error with your examples when using the hooks provided in your repo, so I believe this is resolved now?

However, when I substitute $ with $d, I still get the unresolved symbol error.

In the hooks config.edn file the call to helix.dom/$d is analyzed with clj-kondo.lilactown.helix/dom, which I think should be clj-kondo.lilactown.helix/$ instead? When I replace it, linting works fine.

lilactown commented 2 weeks ago

Fixed in main branch