There's not a solid repro for this but there's a bug in our SyntaxKind enum -- the JsxText kind parses as a token (which it should), but it's after LastToken. The formatting engine uses an N * N sparse array computed with N = LastToken. When the formatting computes the formatting context by using a token pair, this means a JsxToken ends up looking up a random formatting context. This causes JSX formatting to break, sometimes, when you add a new token and change the value of LastToken.
/cc @weswigham who was understandably baffled by this 11dce6f
There's not a solid repro for this but there's a bug in our
SyntaxKindenum -- theJsxTextkind parses as a token (which it should), but it's afterLastToken. The formatting engine uses anN * Nsparse array computed withN = LastToken. When the formatting computes the formatting context by using a token pair, this means aJsxTokenends up looking up a random formatting context. This causes JSX formatting to break, sometimes, when you add a new token and change the value ofLastToken./cc @weswigham who was understandably baffled by this 11dce6f