-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
I really like the idea of "one formatting style". People spend too much time on these matters. I also currently use two spaces for JavaScript files as it is the Prettier default.
But thinking more about the accessibility issues with defaulting to a small indent size, deno should reconsider.
Ref: stylelint/stylelint#4246
https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
It is hard to read code when it is scrunched to one side. We have less of a need for a small indent size given the move from callbacks to async/await.
Given the above, I'd like to see deno fmt consider defaulting to use tabs before 1.0. When editing a file with tabs, the user can choose whether an indent should visually be displayed as 2, 4, or even 8 spaces. Tabs would also be more consistent with go fmt which the tool is clearly inspired from. I'm not interested in starting a holy war on this though.
I'd also like to see the ability to set the deno fmt CLI arguments as environment variables so users could use deno fmt if they strongly disagree with the defaults.