Commit Graph
13 Commits
Author SHA1 Message Date
JounQinandGeorgii Dolzhykov c1937cb1b8 feat: add new parser babel-ts to parse TypeScript syntaxes via Babel (#6400)
* feat: add new parser `babel-ts` to parse TypeScript syntaxes via Babel

* docs: document parser babel-ts

* chore: enable babel-ts in markdown and worker.js

* verify all TS tests against babel-ts except disabled by disableBabelTS

* support for TSDeclareMethod; fix abstract properties and methods

* fix embedded angular templates and styles

* fix TSImportType

* simplify babel options combinations

* fix method decorators

* fix ranges

* work around loc inconsistencies for SequenceExpression

* don't print trailing comma in type parameters (unsupported in TS < 3.3)

* preserve quotes for class properties

* align printing of single-parameter functions

* fix comments in degenerate single-element unions and intersections

* fix comments for methods

* fix comments for mapped types

* edit docs, change 'since' to 2.0.0

* add changelog

* fix code sample on playground

* update snapshots after rebase

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-29 14:11:16 +02:00
Ika 4af3dd4b07 test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Ika 5c479cc55f fix(typescript): do not add invalid semi for construct in interface with prettier-ignore (#5469) 2018-11-14 21:35:37 +08:00
Onur Temizkan cc83a27a3e fix(typescript) Do not add extra semicolon to TSMethodSignature when prettier-ignore is used (#5140) (#5160) 2018-09-29 06:13:17 -04:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Lucas Duailibe dbf22eb41a Fix printing separator in objects with prettier-ignore (#3448) 2017-12-10 02:57:42 -02:00
Lucas Duailibe f119d4a90f Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
Lucas Duailibe 658886aab1 Prevent adding semi in TypeScript interfaces when type has prettier-ignore (#3103) 2017-11-09 21:52:47 -02:00
Lucas Azzola 7e60d70f97 fix(typescript): always break interfaces onto multiple lines, fixes #2159 (#2161) 2017-06-15 14:34:54 -10:00
Lucas Azzola 1e08f03554 fix(typescript): break on multiple interface extends, fixes #2043 (#2085) 2017-06-10 07:46:59 -07:00
Christopher Chedeau b730f4eccf Add group around TSMethodSignature (#2037)
This ensures that the comment size is not taken into account during measurement

Fixes #1976
2017-06-07 14:20:55 -07:00
Christopher Chedeau 0d239477cb Use semi-colon for object separator (#1918)
Looks like the convention for typescript separator is `;` whereas for flow it's `,`. Let's migrate to that.

Fixes #1896
Fixes #1879
Fixes #1874
2017-06-02 15:32:51 -07:00
Lucas Azzola b265713763 fix(typescript): handle ExperimentalSpreadOperator, optional method, and abstract interface (#1763) 2017-05-26 20:19:17 -07:00