Commit Graph

6 Commits (491038d69392cae2c8d7c4eba488ebaac6790f29)

Author SHA1 Message Date
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
Joseph Frazier 9d7515907e Pass entire text through formatWithShebang() to format() (#1718)
* Verify shebang tests against Babylon as well as Flow/Typescript

* Pass entire text through formatWithShebang() to format()

That way, we won't have to do any arithmetic on range and cursor
locations when there is a shebang. See here for details:

https://github.com/prettier/prettier/pull/1637#issuecomment-303846507

This required changing comment printing such that comments that are
actually shebangs are just ignored.

* Add curly brace after `if`

See https://github.com/prettier/prettier/pull/1718#discussion_r118382574
2017-05-24 18:59:25 -04:00
ChristianHersevoort 04c959d687 Feature/verify against same snapshot (#1087)
* Verify parsers against same snapshot

- Reworked run_spec, now accepts 3th optional array argument for
additional parsers to verify against
- Merged duplicate run_spec configs
- Removed duplicate snapshot data

* Formatted run_spec.js with prettier

* Fixed node4 incompatibility
2017-03-25 08:10:17 -07:00
James Henry 72456bf06f [WIP] TypeScript Parser (#915)
* WIP immediate feedback

* typescript parser is drop-in replacement for flow parser

* Add new TypeScript Parser snapshots where drop-in replacement possible

* Snapshot updates after rebasing

* Remove unnecessary stripping of properties on TypeScript parser AST

* Remove annotated issues

* Move TS dependencies to dev for now
2017-03-08 13:18:13 -08:00
Christopher Chedeau df99ae56b0 Add test for shebang and move to index.js (#170)
When looking into adding a test, I realized that the logic was inside of bin/prettier.js and therefore only applying to the cli. Moving it to index.js and adding a test so that it's more robust :)
2017-01-13 13:39:07 -05:00