clang-format: [JS] more precisely detect enums.
The current enum detection is overly aggressive. As NestingLevel only
applies per line (?) it classifies many if not most object literals as
enum declarations and adds superfluous line breaks into them. This
change narrows the heuristic by requiring an assignment just before the
open brace and requiring the line to start with an identifier.
Patch by Martin Probst. Thank you.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232320
91177308-0d34-0410-b5e6-
96231b3b80d8