by philwelch · 6y ago · 0 comments
What are some other great formatters out there?
[0]: https://prettier.io [1]: https://github.com/apple/swift-format [2]: https://github.com/rust-lang/rustfmt
edit: seems https://github.com/dotnet/format is the closest thing
Resharper has a free command line tool that supports wrapping long lines. https://www.jetbrains.com/help/resharper/CleanupCode.html
I made a wrapper for it to try and make it easier to use. https://github.com/sethreno/ReGitLint#regitlint
For public code I do not recommend changing the defaults since it may make PRs a mess.
Apostrophes occur so often in English that it makes it easier to type strings like "I'm a dog". With single quoting you have to go 'I\'m a dog'.
If I hit double quotes in a string, I just triple-quote.
"""He said "hah" sarcastically""".
I know Guido (van Rossum) prefers single quotes -- I'm not sure why exactly -- so it's become a default Python style. I tried to adopting it but always ended up reverting to double quotes.
rubyfmt for Ruby