I feel like the cost of changing defaults is wildly underestimated because it's decided on by people who are so deeply engaged in the product.
It means either all my code now needs a config file added or all my code will need to be updated.
I feel like the cost of changing defaults is wildly underestimated because it's decided on by people who are so deeply engaged in the product.
It means either all my code now needs a config file added or all my code will need to be updated.
We can't expect everything to be perfect on day one, nor should we be stuck with the poor choices we made when starting a project. Maintainers should be allowed to change their mind after careful consideration and community consensus.
Personally tho I haven't had an issue navigating back another revision. UIs are good at handling that kind of interaction, and I rarely use blame without a UI. (nearly every other git interaction: CLI all the time. but not blame.)
https://www.moxio.com/blog/43/ignoring-bulk-change-commits-w...
Especially when working with syntax heavy compiled languages like Rust, autoformat on save frees me up enough mental capacity for me that the costs are well worth it for the extra development speed. I just use Git Lens and some custom git aliases to get around the messy logs, whereas my last team handled the payment frontend for a large company so tracing the history of changes was taken way more seriously and reformatting someone else's code outside of organized refactorings, let alone autoformat, was disqualified from the start.
{
"trailingComma": "none",
"arrowParens": "avoid"
}
Know that you'll still have non-trivial diffs when switching from 1.x to 2.0 due to other changes (like "the `function` keyword should always have a space after it because consistency").I just updated the PhotoStructure codebase, and even with that revert of those 2 defaults, almost 100 files and several thousand lines of diff resulted: https://twitter.com/mrm/status/1241792817338257409
Seems like a pretty good reason to change that one at least, since it seems to imply they've wanted trailing commas but didn't do it for compatibility reasons.
Just `JSON.stringify` whatever object it is instead.
I think there's another way to look at it. It's more "we have decided on X so YOU can move on to more important issues."
With Prettier, you just follow their opinions. Their opinions can change, and your code might look different, but it doesn't really matter. It might reformat a few lines, but the point is that it's still consistent across your team (without anyone having to memorize a bunch of rules).
I think you are overstating how hard it is to add the config (pro tip: you can add it to package.json) and how painless it is to run the formatted for the whole project.
The changes to the defaults are small and (in my opinion, worth it).