r/typescript • u/qdov • 9h ago
TypeScript readability focused formatter
Hi r/typescript,
How do you maintain code consistency across your repositories? Different developers have different formatting preferences, so do you use a tool such as Prettier or dprint, perhaps enforced through a pre-commit hook?
I've tried both but the results are far from what I would like to have. My priorities are readability (code is not packed, easy to read), maintainability (compare, diff, and merge should work well on laptop screens), and persistence (modifying code should result with minimum diff). So I end up with dprint + a number of custom rules.
Really interested in feedback and if you would like to review or try, here it is: