prettier/tests/json
Joseph Frazier a78d1389f6 Use babylon.parseExpression for JSON (#2476)
* Add comments showing parser arguments

Since this is how they are invoked, the comments make it easier to maintain.

* Use babylon.parseExpression for JSON

See https://github.com/prettier/prettier/issues/2378#issuecomment-314600778

Note that this doesn't yet print comments:

    echo '{/*comment*/"K":"V"}' | ./bin/prettier.js --parser json

* Remove parser-json.js

This reduces duplicate code in the built package.
See https://github.com/prettier/prettier/pull/2476#pullrequestreview-50181398

* Add test with block comment in JSON

* Fix test with block comment in JSON

* Add test with line comment in JSON

* Don't build now-redundant parser-json.js
2017-07-24 11:43:49 +10:00
..
__snapshots__ Use babylon.parseExpression for JSON (#2476) 2017-07-24 11:43:49 +10:00
block-comment.json Use babylon.parseExpression for JSON (#2476) 2017-07-24 11:43:49 +10:00
boolean.json JSON: Print trailing newline (#2226) 2017-06-21 15:40:19 -07:00
jsfmt.spec.js Force trailingComma option to "none" when parser is JSON (#2335) 2017-06-28 09:29:47 -07:00
line-comment.json Use babylon.parseExpression for JSON (#2476) 2017-07-24 11:43:49 +10:00
multi-line.json Add JSON support (#2173) 2017-06-17 10:36:42 -10:00
null.json JSON: Print trailing newline (#2226) 2017-06-21 15:40:19 -07:00
number.json JSON: Print trailing newline (#2226) 2017-06-21 15:40:19 -07:00
pass1.json Add JSON support (#2173) 2017-06-17 10:36:42 -10:00
single-line.json Add JSON support (#2173) 2017-06-17 10:36:42 -10:00
string.json JSON: Print trailing newline (#2226) 2017-06-21 15:40:19 -07:00
trailingComma.notjson Force trailingComma option to "none" when parser is JSON (#2335) 2017-06-28 09:29:47 -07:00