3 ms·
Certainly in enjoy Prettier (in spite of its foibles) for JS because of this sort of stuff. It removes whole classes of lint errors and adds semi-colons and doe
by sammorrowdrums 6y ago
Certainly in enjoy Prettier (in spite of its foibles) for JS because of this sort of stuff. It removes whole classes of lint errors and adds semi-colons and doesn't care how I format the code as I wrote it.
Far too much thought and angst goes into things that should not need to be a concern. I used to feel more dubious about such tools, but after gofmt I tried Prettier and always use it now.
It's just one more bit of cognitive load that is gone. Indeed, if it doesn't reformat my code as expected I know I've made an error, so it's even quicker for me at noticing some bugs than ESLint messages which are already pretty excellent these days.
- klodolph 6y agoI agree. I have autoformatting turned on for everything and I just don't care what my code looks like because it’s consistent and I can get used to it. I used to spend time configuring formatting settings to be exactly right, but nowadays I’m moving towards defaults. My only problem with gofmt is that since Go standardized on tabs, I’ve encountered problems with noisy commits because people rewrap comments, and the comments will wrap differently depending on the individual’s tab width setting.