From 2bcb00c6b6837f1f5df513e564237315315a7836 Mon Sep 17 00:00:00 2001 From: guto Date: Thu, 18 Jul 2024 20:20:29 -0300 Subject: [PATCH] docs: add sample of clj-kondo configuration (#155) Add description about `clj-kondo` configuration needed to analyze custom `defnc` as known `helix/defnc` --- docs/pro-tips.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/pro-tips.md b/docs/pro-tips.md index f2a442a..1039076 100644 --- a/docs/pro-tips.md +++ b/docs/pro-tips.md @@ -129,3 +129,14 @@ use it. Components would then use `my-app.lib/defnc` instead of `helix.core/defnc` to define components. It has the same API as helix, but with the `:fast-refresh` feature enabled by default. Nice! + +### clj-kondo configuration + +If you're using clj-kondo, you might need to add a configuration to ignore the +fact that `my-app.lib/defnc` is not a known macro. You can do this by adding a +`.clj-kondo/config.edn` file to your project with the following contents: + +```clojure +{:hooks {:analyze-call {my-app.lib/defnc clj-kondo.lilactown.helix/defnc}}} +``` +> Don't forget to update `my-app.lib` to the actual namespace you're using!