prettier/tests/directives
Christopher Chedeau 6a05a55852 Remove last trailing line for directives-only files (#609)
* Remove last trailing line for directives-only files

There are two hardlines that are added that do not need to.

- The first one is when there's an empty line afterwards, we want to remove it. The solution I opted for to fix this one is to trimRight the originalText so that globally it's never going to return yes for the isNextLineEmpty.
- The second one is at the end of Program, but we already printed it inside of the directive itself, so we can just add a condition to make sure it's only printed when there's a body or a comment, but not a directive.

Fixes #527

* Add comment
2017-02-07 10:39:04 -05:00
..
__snapshots__ Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
jsfmt.spec.js Preserve new lines after directives (#464) 2017-01-25 16:26:09 -05:00
last-line-0.js Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
last-line-1.js Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
last-line-2.js Remove last trailing line for directives-only files (#609) 2017-02-07 10:39:04 -05:00
newline.js Preserve new lines after directives (#464) 2017-01-25 16:26:09 -05:00
no-newline.js Do not always put an empty lines after directives (#505) 2017-01-30 09:10:54 -08:00
test.js Move tests around (#454) 2017-01-24 14:35:37 -08:00