This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-08
Channels
- # adventofcode (55)
- # announcements (21)
- # babashka (20)
- # beginners (89)
- # calva (21)
- # cider (16)
- # circleci (11)
- # clara (8)
- # clj-kondo (6)
- # clojure (31)
- # clojure-australia (3)
- # clojure-europe (17)
- # clojure-nl (5)
- # clojure-uk (10)
- # clojurescript (25)
- # community-development (4)
- # conjure (12)
- # cryogen (28)
- # cursive (21)
- # datomic (7)
- # deps-new (1)
- # depstar (45)
- # emacs (5)
- # fulcro (46)
- # instaparse (5)
- # jobs (5)
- # jobs-discuss (23)
- # kaocha (12)
- # lambdaisland (2)
- # leiningen (1)
- # meander (10)
- # mid-cities-meetup (1)
- # reagent (5)
- # reitit (5)
- # remote-jobs (45)
- # reveal (9)
- # sql (6)
- # tools-deps (103)
- # uncomplicate (1)
- # xtdb (1)
I'm trying to come up with an appropriate clj-kondo config for Fulcro mutations, https://book.fulcrologic.com/#_mutations. Specifically this form:
(defmutation add-person [params]
(action [env] ...)
(remote [env] ...)
(rest [env] ...)
(ok-action [env] ...)
(error-action [env] ...))
Currently my config looks like:
{:lint-as
{clojure.test.check.properties/for-all clojure.core/let
com.fulcrologic.fulcro.components/defsc clojure.core/defn
com.fulcrologic.fulcro.mutations/defmutation clojure.core/defn
com.wsscode.pathom.connect/defresolver clojure.core/defn}
:linters
{:unresolved-symbol
{:exclude
[(com.fulcrologic.fulcro.mutations/defmutation [action error-action ok-action remote])]}}}}
This works, but I also want to have action, error-action, etc. treated like defn too. Is this possible?I activated discussions on clj-kondo: https://github.com/borkdude/clj-kondo/discussions. Nice way for archiving Q/A.
@tvaughan Hmm, that looks similar to defprotocol
or defrecord
but not quite. I think your best best is to exclude all unresolved symbols or better, write a hook for fulcro and submit it to https://github.com/clj-kondo/config or the fulcro repo itself (https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#exporting-and-importing-configuration)
@tvaughan let me know if you're jamming on this. I might take a stab at it today with the documentation borkdude posted below, but you'll probably get there faster if you're going for it
Hey @U01DH13SK8E I won’t get to this until next week. Please go for it. I’ll be happy to play tester if you’d like