🚀
ShipClojure
  • README
  • Development
    • Getting Started
    • REPL Workflow
    • AI Development with ShipClojure
    • Getting Updates
    • Formatting code
    • ShipClojure Guiding Principles
  • Backend
    • Migrations
    • Secrets
    • Routing
    • ShipClojure Blog
    • Email
  • Frontend
    • UIx + re-frame
    • HTTP Requests with Re-frame
    • Frontend Navigation with Re-frame
    • Toast Notifications
    • Icons
  • Server Side Rendering
    • Static/Landing pages
  • Auth
    • How Auth works
    • Oauth2 providers
  • Deployment
    • Deployment
  • Decisions
    • 001 - Cookie Sessions
    • 002 - Single Page Application Architecture
    • 003 - Re-frame instead of Refx
    • 003 - Move from cookie sessions to JWT Access + refresh tokens
Powered by GitBook
On this page
  • Formatting pre-commit hook
  • Editor setup
  • Emacs
  • Other editors
  1. Development

Formatting code

PreviousGetting UpdatesNextShipClojure Guiding Principles

Last updated 1 month ago

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 . 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

Editor setup

Emacs

See for how to setup to use standard-clj on save.

Other editors

Please submit other configurations to run standard-clj on save for other editors 🙏

standard-clj
lefthook.yml
this tweet
apheleia