Fork me on GitHub
Chris McCormick07:01:40

what would be the best way to lint-as applied-science.js-interop/let as let? a form looks like this:

(j/let [^:js {:keys [velocity position uuid]} b] {:velocity velocity :position position :uuid uuid})
clj-kondo complains about velocity being an unresolved symbol.

Chris McCormick07:01:00

It's not exactly let obviously because of the ^:js thing


What have you tried? :lint-as clojure.core/let would work I think

Chris McCormick08:01:51

ok let me try again

Chris McCormick08:01:16

ok yes sorry that works. i am probably doing something unclever but i am seeing this for the :lint-as declaration in the require block: > warning: Unresolved namespace applied-science.js-interop. Are you missing a require?

(ns smash.physics
  {:clj-kondo/config {:lint-as {applied-science.js-interop/let clojure.core/let}}}
    [sitefox.ui :refer [log]]
    [applied-science.js-interop :as j]
    ["matter-js/build/matter" :as Matter]))


@chris358 Put a quote in front of the lint-as map

facepalm 1

so like:

(ns smash.physics
  {:clj-kondo/config '{:lint-as {applied-science.js-interop/let clojure.core/let}}}
   [sitefox.ui :refer [log]]
   [applied-science.js-interop :as j]
   ["matter-js/build/matter" :as Matter]))

(j/let [x 1])