re: A New Coding Style for Switch Statements in JavaScript/TypeScript VIEW POST

FULL DISCUSSION
 

Great tip! I've landed on a similar practice informed by eslint's no-case-declaration rule.

Typically I default to cases without blocks, and add them when that rule reminds me to.

 

That’s a nice approach too, as it also removes the “whoops I didn’t realize I did that” effect. Good to know, thanks!

code of conduct - report abuse