You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds a section about sorting namespaces. Clj-kondo want to check this, but currently there is no clarity around how "requirements" (which I find a bit of a weird word for libspecs in a require clause) in .cljc namespaces should be sorted.
Since there is no clarity around this, I'm thinking about just disabling the rule for clj-kondo in .cljc files for now.
@borkdude re about the wording "requirements". Feel free to improve it! Note that it also refer to the java classes in import statement though.. (requirements is still wrong, as they are imported classes)
About .cljc, I think the cleanest is to just sort the :clj, :cljr (🤷♂ ), :cljs and then the libspecs without a reader conditional. Within each block they should be sorted, independently (i.e. if in the same block we have both :clj and :cljs they should be sorted independently.
But is this consistent with the general usage of the reader conditional in ns declaration? Does it make sense?
borkdude
changed the title
How to sort "requirements" in .cljc?
How to sort requires in .cljc?
May 8, 2020
This commit adds a section about sorting namespaces. Clj-kondo want to check this, but currently there is no clarity around how "requirements" (which I find a bit of a weird word for libspecs in a require clause) in .cljc namespaces should be sorted.
Since there is no clarity around this, I'm thinking about just disabling the rule for clj-kondo in .cljc files for now.
See clj-kondo/clj-kondo#741.
cc @Heliosmaster
The text was updated successfully, but these errors were encountered: