2 ms·
"not obviously stupid" is entirely subjective. I think the way prettier handles parentheses in JS is very obviously stupid, for example.
by bakugo 3y ago
"not obviously stupid" is entirely subjective. I think the way prettier handles parentheses in JS is very obviously stupid, for example.
- EspadaV9 3y agoJust curious, which rule is that? This is the only one I could see about parentheses - https://prettier.io/docs/en/options.html#arrow-function-parentheses https://prettier.io/docs/en/options.html#arrow-function-pare...
- bakugo 3y agoPrettier removes any parentheses that aren't strictly necessary. So if you type: value = (a ? ((a * b) + c) : d); It turns into: value = a ? a * b + c : d; This is just a very basic example, there are many situations where the result is way worse. I feel pretty confident in saying that this is quite obviously stupid.