Fork me on GitHub
#clj-kondo
<
2019-06-03
>
borkdude14:06:33

random clj-kondo tip: to exclude all cljsjs.* namespaces from being warned about as unused, use this config:

{:linters
  {:unused-namespace
    {:exclude ["cljsjs\\..*"]}}}

borkdude16:06:48

Kinda like this idea for expressing: this namespace is only required for side-effects (loading specs, loading a foreign lib, etc). (ns foo (:require (my-side-effecting.ns) [normal.ns])) clj-kondo could take that into account - feedback?

kszabo16:06:30

actually I really like the manual (require 'side-effecting.ns) idea below the (ns) form

borkdude16:06:06

@thenonameguy yeah, but that doesn’t fly in CLJS

borkdude16:06:19

(as far as I know)

kszabo16:06:30

true, I haven’t considered that

borkdude17:06:37

maybe even better (@mynomoto suggested this): don’t wrap the name at all, so: (ns foo (:require my-side-effecting.ns [normal.ns]))