commit | a752b46e64f9beca54e0489441a7e00f796fd0d5 | [log] [tgz] |
---|---|---|
author | Deepanjan Roy <dproy@google.com> | Wed Jul 04 01:24:31 2018 +0100 |
committer | Deepanjan Roy <dproy@google.com> | Wed Jul 04 00:27:20 2018 +0000 |
tree | 8c1164a506459f9683f769ed77c436cef467137c | |
parent | c56c2429b0f6970c05d630f05acf44b6ada2f346 [diff] [blame] |
Clang-format typescript Clang format all the typescript files, and add a presubmit. The typescript can now be formatted using git cl format --js. There are two clang-format configuration that is different from Google style (see ui/.clang-format): 1. BinPackArguments: false. These screenshots explain why: BinPackArguments: true - https://screenshot.googleplex.com/XqO41cJ5477 BinPackArguments: false - https://screenshot.googleplex.com/rHHH1Y801Tm 2. JavaScriptWrapImports: true, Clang format doesn't solve long import lines otherwise, which trigger the existing long line presubmit warning. JavaScriptWrapImports: false - https://screenshot.googleplex.com/hze5RLywgn6 JavascriptWrapImports: true - https://screenshot.googleplex.com/tkOky2Jhrqy The main config files to review in this CL are PRESUBMIT.py and ui/.clang-format. Bug:111101465 Change-Id: I47f39ecb23fea69dc15ff6cac16fc214c3179877
diff --git a/ui/.clang-format b/ui/.clang-format new file mode 100644 index 0000000..265b562 --- /dev/null +++ b/ui/.clang-format
@@ -0,0 +1,5 @@ +Language: JavaScript +BasedOnStyle: Google +ColumnLimit: 80 +BinPackArguments: false +JavaScriptWrapImports: true \ No newline at end of file