oakmac / standard-clojure-style-js

Standard Clojure Style in JavaScript
ISC License
84 stars 1 forks source link

challenging reader conditional case #38

Open oakmac opened 3 months ago

oakmac commented 3 months ago

From https://github.com/eyelidlessness/alter-cljs?tab=readme-ov-file#usage

(ns my-ns
  #?(:clj (:refer-clojure :exclude [alter-var-root]))
  (#?(:clj :require :cljs :require-macros) [alter-cljs.core :refer [alter-var-root]]))

(alter-var-root whatever
  (fn [x]
    (do-something-to x)))
oakmac commented 3 months ago

This may be a case that Standard Clojure Style simply does not support. In this scenario, it would be important to error out and communicate to the user "unable to safely format, please refactor".