google / eslint-config-google

ESLint shareable config for the Google JavaScript style guide
Apache License 2.0
1.75k stars 139 forks source link

brace-style: allowSingleLine: true #13

Closed appsforartists closed 8 years ago

appsforartists commented 8 years ago

The only guidance I can find on curly brace requirements in the JS style guide defers to the C++ style guide:

In general, curly braces are not required for single-line statements, but they are allowed if you like them; conditional or loop statements with complex conditions or statements may be more readable with curly braces. Some groups require that an if must always always have an accompanying brace.

Therefore, allowSingleLine should be true. This modules parent (xo) sets it to false. Hence, I've added an override here that is identical to what's in xo, except for the true.

googlebot commented 8 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


googlebot commented 8 years ago

CLAs look good, thanks!

addyosmani commented 8 years ago

This LGTM in the spirit of aligning this with the expectations of our language team. cc @sindresorhus as an FYI.