Fix syntax error on JSON range formatting (#10497)

This commit is contained in:
fisker Cheung authored and GitHub committed 2021-03-12 00:24:45 +02:00
1 parent ff32d6b823
commit 1ce6b8dc3d
23 files changed
+534 -5

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#### Fix syntax error on JSON range formatting (#10497 by @fisker)
<!-- prettier-ignore -->
```js
// Input
[{ a: 1.0000}, {"b": 2.0000 }]
// ^^^^^^^^^^^ range
// Prettier stable
SyntaxError: Unexpected token (1:4)
> 1 | "b": 2.0000
| ^
// Prettier main
[{ a: 1.0000}, { "b": 2.0 }]
```