浏览代码

Tweaks to PR

- Move auto-formatting down as it's not as important as other sections
- Reword to have focus be on auto-formatting and less so on cljfmt
Gabriel Horner 2 年之前
父节点
当前提交
4eec463cbb
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      docs/dev-practices.md

+ 6 - 6
docs/dev-practices.md

@@ -2,10 +2,6 @@
 
 
 This page describes development practices for this codebase.
 This page describes development practices for this codebase.
 
 
-## Auto-formatting
-
-[cljfmt](https://cljdoc.org/d/cljfmt/cljfmt/0.9.0/doc/readme) is a common formatter used for Clojure, analogous to Prettier for other languages. While we do not format/indent consistently with cljfmt across the whole codebase, we recommend that you do so for code that you change/add. You can do so easily with the [Calva](https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva) extension in [VSCode](https://code.visualstudio.com/): It will (mostly) indent your code correctly as you type, and you can move your cursor to the start of the line(s) you've written and press `Tab` to auto-indent all Clojure forms nested under the one starting on the current line.
-
 ## Linting
 ## Linting
 
 
 Most of our linters require babashka. Before running them, please install
 Most of our linters require babashka. Before running them, please install
@@ -156,8 +152,8 @@ To write a test that uses a datascript db:
 #### Performance tests
 #### Performance tests
 To write a performance test:
 To write a performance test:
 
 
-* Use `frontend.util/with-time-number` to get the time in ms. 
- 
+* Use `frontend.util/with-time-number` to get the time in ms.
+
 * Example:
 * Example:
   ```clojure
   ```clojure
   (are [x timeout] (>= timeout (:time (util/with-time-number (block/normalize-block x true))))
   (are [x timeout] (>= timeout (:time (util/with-time-number (block/normalize-block x true))))
@@ -207,6 +203,10 @@ By following these conventions, these should also be usable by babashka. This is
 helpful as it allows for third party tools to be written with logseq's data
 helpful as it allows for third party tools to be written with logseq's data
 model.
 model.
 
 
+## Auto-formatting
+
+Currently the codebase is not formatted/indented consistently. We loosely follow https://github.com/bbatsov/clojure-style-guide. [cljfmt](https://cljdoc.org/d/cljfmt/cljfmt/0.9.0/doc/readme) is a common formatter used for Clojure, analogous to Prettier for other languages. You can do so easily with the [Calva](https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva) extension in [VSCode](https://code.visualstudio.com/): It will (mostly) indent your code correctly as you type, and you can move your cursor to the start of the line(s) you've written and press `Tab` to auto-indent all Clojure forms nested under the one starting on the current line.
+
 ## Development Tools
 ## Development Tools
 
 
 There are some babashka tasks under `nbb:` which are useful for inspecting
 There are some babashka tasks under `nbb:` which are useful for inspecting