b47c0b4e04
* Add test for https://github.com/prettier/prettier/issues/2297 * Add JSON types to isSourceElement() See https://github.com/prettier/prettier/issues/2297 * Avoid expanding format range when possible This fixes https://github.com/prettier/prettier/issues/2297 * Move JSON range test into tests/range_json This is so that the AST_COMPARE=1 tests don't try to parse JSON with Flow. * Check parser in isSourceElement() Otherwise JSON formatting would format weird things inside of JS. See https://github.com/prettier/prettier/pull/2298#discussion_r124407056 * Use arrow functions instead of .bind() See https://github.com/prettier/prettier/pull/2298#discussion_r124409783 * Add test of range-formatting JSON identifier See https://github.com/prettier/prettier/pull/2298/files#r124410750 * Allow range-formatting JSON identifier See https://github.com/prettier/prettier/pull/2298/files#r124410750 * Fix lint |
||
---|---|---|
.. | ||
__snapshots__ | ||
identifier.json | ||
issue2297.json | ||
jsfmt.spec.js |