Closed aiba closed 1 year ago
Got it. So, in cljs :as
can also be considered a "refer".
Giving it a quick shot.
Fixed in refactor-nrepl 3.5.4 (released within a few minutes) and clj-refactor 3.5.5 (available in MELPA within a couple hours)
This is working perfectly, thank you! I'm running cljr-clean-ns probably 100 times a day at work, so this really helps out. Thank you again!
Issue
In clojurescript,
:require :as
with npm libraries works a little differently from jvm clojure's:require :as
. This can lead tocljr-clean-ns
removing requires that are needed. See also clojure-emacs/clj-refactor.el#476Expected behavior
In both of the following cases, the require statement is needed, and I would expect
cljr-clean-ns
to not remove it.Actual behavior
cljr-clean-ns
removes the require in both cases.Steps to reproduce the problem
Run
cljr-clean-ns
on either of the above sample code.Environment & Version information