oakmac / clojurefmt-js

clojurefmt in JavaScript
ISC License
4 stars 0 forks source link

address issues from clj-commons/formatter #14

Open oakmac opened 3 months ago

oakmac commented 3 months ago

We should address / have an answer to the issues on the clj-commons/formatter repo:

oakmac commented 3 months ago

Issue

file encoding / UTF-8 support

Decision

I think we should only support UTF-8.

Reason

UTF-8 is the dominant standard for text-encoding in 2024. It is near universally adopted and is quite future-proof.

oakmac commented 3 months ago

Issue

remove extra whitespace

Decision

Reason

Applying these rules will prevent unnecessary diffs between changes. These rules are easy to implement and understand. I cannot think of a meaningful reason to allow trailing whitespace in a codebase.

oakmac commented 3 months ago

Issue

re-order ns forms

Decision

Reason

"how to ns" is the de-facto standard for Clojure namespaces. The rules it suggests are reasonable and explained / justified well.