clang-format: [JS] Consistently format top level enums.
Object literal style enums are forced onto multiple lines for JS enums.
This change produces the same formatting for enums using the actual
TypeScript enum syntax:
enum Color { Blue, Red, Tuna }
clang-format: use clang-format on clang-format.
clang-format: [JS] put enums on separate lines.
This change identifies enums in JS as complete declarations so that
trailing statements are formatted on a separate line.
enum Color { Blue, Green } var x;
clang-format: AnnotatedLine.StartsWith.
This supports checking for an arbitrary line
prefix, which is useful for e.g. JavaScript
export class vs class.
I think now that we are writing such a fancy function, we should make it ignore comments. Otherwise, we would need to handle them everywhere.