Skip to content

Commit

Permalink
docs: add sample of clj-kondo configuration (#155)
Browse files Browse the repository at this point in the history
Add description about `clj-kondo` configuration needed to analyze custom `defnc` as known `helix/defnc`
  • Loading branch information
lanjoni authored Jul 18, 2024
1 parent 773a646 commit 2bcb00c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/pro-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

0 comments on commit 2bcb00c

Please sign in to comment.