chore: fix lint

This commit is contained in:
rcmerci
2023-11-09 23:08:11 +08:00
parent 471d3978ae
commit ee36c840b6
5 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
(ns frontend.async-util)
(ns frontend.async-util
"Some cljs.core.async relate macros and fns.
see also: https://gist.github.com/vvvvalvalval/f1250cec76d3719a8343")
(defmacro go-try
[& body]

View File

@@ -113,7 +113,7 @@
[:block-uuid :uuid]]]]]]
[:ex-data {:optional true} [:map [:type :keyword]]]
[:ex-message {:optional true} :any]])
(def data-from-ws-decoder (m/decoder data-from-ws-schema mt/string-transformer))
(def data-from-ws-coercer (m/coercer data-from-ws-schema mt/string-transformer))
(def data-from-ws-validator (m/validator data-from-ws-schema))

View File

@@ -17,7 +17,7 @@
[frontend.modules.outliner.transaction :as outliner-tx]
[frontend.state :as state]
[frontend.util :as util]
[frontend.async-util :include-macros true :refer [<? go-try]]
[frontend.async-util :include-macros true :refer [<?]]
[malli.core :as m]
[malli.util :as mu]))

View File

@@ -278,7 +278,7 @@
use `rollback` to replace current-branch with old-branch.
use `commit` to remove old-branch."
[repo]
(let [{:keys [current-branch old-branch]} (get @*ops-store repo)]
(let [{:keys [current-branch]} (get @*ops-store repo)]
(assert (some? current-branch) repo)
(swap! *ops-store assoc-in [repo :old-branch] current-branch)))

View File

@@ -3,12 +3,12 @@
(:require-macros
[frontend.db.rtc.macro :refer [with-sub-data-from-ws get-req-id get-result-ch]])
(:require [cljs-http.client :as http]
[cljs.core.async :as async :refer [<! chan go offer!]]
[cljs.core.async :as async :refer [<! chan offer!]]
[frontend.async-util :include-macros true :refer [<? go-try]]
[frontend.config :as config]
[frontend.db.rtc.const :as rtc-const]
[frontend.state :as state]
[frontend.util :as util]
[frontend.async-util :include-macros true :refer [go-try <?]]))
[frontend.util :as util]))
(def WebSocketOPEN (if (= *target* "nodejs")
1