[PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 22 07:14:22 PST 2016
djasper added a comment.
I am missing a decent explanation here. In contrast to C++ #includes as well as goog.require, etc. The import/export statements actually provide syntactic structure and can name multiple entities. Why would it be a good idea to always write them into a single line?
================
Comment at: unittests/Format/FormatTestJS.cpp:867
@@ -869,11 +866,3 @@
"} from 'some/module.js';");
- verifyFormat("import {\n"
- " X,\n"
- " Y,\n"
- "} from 'some/module.js';");
- verifyFormat("import {\n"
- " X,\n"
- " Y,\n"
- "} from 'some/long/module.js';",
- getGoogleJSStyleWithColumns(20));
+ verifyFormat("import {X, Y,} from 'some/module.js';");
verifyFormat("import {X as myLocalX, Y as myLocalY} from 'some/module.js';");
----------------
Really?
http://reviews.llvm.org/D17440
More information about the cfe-commits
mailing list