wallet-kit / .cljfmt.edn
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;; cljfmt configuration — pinned so every machine and the npm gate agree.
;;
;; :extra-indents, NEVER :indents. `:indents` REPLACES cljfmt's whole default
;; table (core `let`/`when`/`->` and the rest lose their block rules) and
;; rewrites thousands of lines into argument alignment. `:extra-indents` adds to
;; the defaults, which is the only sane thing to do to an existing tree.
;;
;; Four entries, all of them body-taking macros cljfmt cannot know about.
;; Without a rule cljfmt argument-aligns a body under the macro's first
;; argument, which is both unreadable and the opposite of how this tree is
;; written:
;;
;;   awaits    ardegazu.wallet.macros — (awaits [bindings] & body); this kit's
;;             one async idiom and by far the most common form in shapes.cljs
;;             and ledger.cljs. Block like `let`, so the body sits 2 spaces in,
;;             not under the binding vector. Without this rule cljfmt rewrites
;;             every verify* in the tree into a staircase aligned on `[ok …]`.
;;   js-await  shadow.cljs.modern — (js-await [bindings] & body); what `awaits`
;;             expands to, and listed for the same reason plus one more: the day
;;             a file uses it directly, the rule is already here.
;;   defclass  shadow.cljs.modern — (defclass Name (field …) (constructor […]
;;             & body) (method n […] & body) …). [:inner 0] blocks the class
;;             body; [:inner 1] blocks each member's body, exactly as cljfmt's
;;             own defaults do for deftype/defrecord, whose shape this is.
;;   this-as   cljs.core — (this-as name & body). Every prototype method in
;;             ledger.cljs is one.
;;
;; Nothing else needs an entry: this repo's own macros (`obj`, `obj-when`,
;; `oget`, `truthy?`) all take flat argument lists, not bodies.
{:extra-indents {awaits   [[:block 1]]
                 js-await [[:block 1]]
                 defclass [[:inner 0] [:inner 1]]
                 this-as  [[:block 1]]}}

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/wallet-kit.git