Prettier is a huge help, but sometimes it works against me because of
trailingComma: "none" rule.
It’s clear from 💅 Prettier support in Observable that prettier is on/off feature with one-size-fits-all style.
I agree, in long term, it’s better to get used once and feel at home in any environment.
But Observable is special. It unlocks instant-feedback-loop programming like in worrydream’s dreams. Instant feedback means speed, flow, and visual thinking. It means, commenting a line of code on and off to see how it affects the result is an important part of the workflow. Prettier makes it unreliable sometimes by removing the trailing comma before the commented line:
So when you uncomment the line you also have to go up and add the removed comma. You cannot do this without looking into the cell code, so you cannot keep the focus on the result when you’re switching on and off a line of code.
I’m finding myself fighting with commas because I comment and uncomment parts of code to try things. Wondering, what do you guys think? Maybe, if it’s not just me it’s worth considering changing that rule?