<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 8. Juli 2019 um 12:45 Uhr schrieb Gijs Kruitbosch <<a href="mailto:gijskruitbosch@gmail.com">gijskruitbosch@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 15/06/2019 06:27, Victor Porof wrote:<br>
> Many people would agree that having a consistent style across the code <br>
> base is valuable, and that’s not where we are now.<br>
<br>
I agree. But it's not where we are now, either, because the style is <br>
markedly different from the C++ google coding style that we also <br>
enforce. So a multiline if statement that's appropriately formatted in <br>
C++ now looks like this:<br>
<br>
   if (mChromeTooltipListener && aWebProgress &&<br>
       NS_SUCCEEDED(aWebProgress->GetIsTopLevel(&isTop)) && isTop &&<br>
       !(aFlags & nsIWebProgressListener::LOCATION_CHANGE_SAME_DOCUMENT)) {<br>
     mChromeTooltipListener->HideTooltip();<br>
   }<br>
<br>
whereas a JS multiline if statement looks like this:<br>
<br>
     if (<br>
       typeof aIsSimulated != "boolean" &&<br>
       typeof aIsSimulated != "undefined"<br>
     ) {<br>
<br>
<br>
That seems pretty unfortunate to me.<br></blockquote><div><br></div><div><div>I'd just like to point out that, while the encapsulating line 
breaks feel unusual, I'm a fan of putting all conditions either together
 on one line or, when they don't fit, each on their own line. Mixing 
both ways as done in the C++ example makes skimming code harder as I've 
previously pointed out occasionally when reviewing JS. So I'll be 
somewhat sad if we lobby Prettier to adopt Google's C++ style here.<br></div><div><br></div><div>dao</div></div></div></div>