Formatting code
It's important to keep the same formatting style as the original if you want to add new features to your project as ShipClojure developes. It is important to keep the same formatting rules to not have useless conflicts based on whitespace.
I recommend using standard-clj. It is non-invasive yet does exactly what I expect from a formatter. ShipClojure comes with standard-clj as a dev dependency.
Formatting pre-commit hook
ShipClojure comes with a pre-commit hook that formats all staged clojure files. So you shouldn't worry about it too much.
To disable it, remove lefthook.yml
Editor setup
Emacs
See this tweet for how to setup apheleia to use standard-clj
on save.
Other editors
Please submit other configurations to run standard-clj on save for other editors 🙏
Last updated