clang-format: [JS] options for arrow functions.
Summary: clang-format currently always wraps the body of non-empty arrow functions: const x = () => { z(); }; This change implements support for the `AllowShortLambdasOnASingleLine` style options, controlling the indent style for arrow function bodies that have one or fewer statements. SLS_All puts all on a single line, SLS_Inline only arrow functions used in an inline position. const x = () => { z(); }; Multi-statement arrow functions continue to be wrapped. Function expressions (`a = function() {}`) and function/method declarations are unaffected as well. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73335
Loading
Please sign in to comment