Fork me on GitHub

I've just added clj-kondo.exports to next.jdbc -- can someone sanity check that I did it correctly? -- I know that the with-transaction macro is already baked into clj-kondo but this will pave the way for any future macros added to next.jdbc. I am about to move on to Expectations next.


@seancorfield That looks good. Note that you don't have to duplicate your config. You can refer to your config in the exported directory by adding it to :config-paths in .clj-kondo/config.edn


:config-paths ["resources/clj-kondo.exports/com.github.seancorfield/next.jdbc"]


Note that namespaces inside the exported directory should also follow an org/lib structure. Instead of choose for example, this will ensure that you won't get conflicts with anyone else that writes hooks for this library


Ah, I thought the hooks were already "local" to that tree. My bad. As for the "copy", that's what happens when I run clj-kondo --copy-configs --dependencies --lint "$(clojure -Spath)" on the project so I can work within it.


(and that seems to be what the documentation suggests you should do, BTW)


(updated the next-jdbc hook to


Cool. The hooks part isn't really necessary, but doesn't hurt either.


Clojure-LSP automatically lints the code with those settings so everyone who uses clojure-lsp will receive those configs in their .clj-kondo directory and then can opt in via :config-paths


Is the expectation that a project should .gitignore everything in the .clj-kondo folder except config.edn? I'm already ignoring .clj-kondo/.cache in most projects...


@seancorfield No, just .cache . The config (also imported configs) can be checked in so linting works the same for everyone who runs clj-kondo on it, in CI, etc.


OK. And, just to be clear, that means the "duplicated" config since clj-kondo copies it when you run that command (that I showed above).


You can gitignore that part of your .clj-kondo for your specific project, since its already in your source control, especially when you configure it via :config-paths


For other users of your library I recommend checking in into their source control in the .clj-kondo dir


OK, thanks. That helps clarify things -- but isn't obvious from the docs.


Feel free to propose/PR some changes to the docs


I read it over a few more times and see if I have any suggestions...

🙏 1