Commit Graph
22 Commits
Author SHA1 Message Date
fisker CheungandGeorgii Dolzhykov aa3141c24e Wrap tests in describe (#7934)
* Run `format()` in test function

* Wrap `test`s in `describe`

* Update tests_config/run_spec.js

Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-10 19:12:01 +08:00
Georgii Dolzhykov 605e57dd3e fix .prettierignore (jsfmt.spec.js files were ignored) 2020-03-27 23:40:45 +02:00
Georgii Dolzhykov 318bf2cb33 Partial support for TypeScript 3.8 (private fields, import/export type modifier) (#7631)
* support TypeScript 3.8

* Update standard_private_fields.ts

* improve tests for import/export type modifier

* temporary hacks for private fields

* comment out some tests, update snapshots

* add changelog entry
2020-03-11 17:40:57 +03:00
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
Jed Fox 524cd96fee Add test for typed constructor (#7377)
Closes https://github.com/prettier/prettier/issues/4111
2020-01-17 10:26:11 -05:00
Georgii Dolzhykov 80260555c9 ts: fix optional computed methods (#6673) 2019-10-17 14:23:14 +03:00
Georgii Dolzhykov ab598e6e23 tests: rename duplicate bindings to be ready for #6400 (#6662) 2019-10-15 18:27:39 +03: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
James Henry 81cf08118e Drop-in replacement: typescript-estree for typescript-eslint-parser (#5139) 2018-09-25 15:44:21 -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
Ika e10c31a333 fix(typescript): update typescript-eslint-parser (#4762) 2018-06-29 19:27:21 +08:00
Ika 553e9bb1ac fix(typescript): preserve quoted class property (#4517) 2018-05-21 18:57:30 +08:00
Thorben von Hacht 1a1de60491 Prettier extends and implements when not fitting in same line (#3689)
* Added prettier layout for class extends and implements

* Added prettier layout for class extends and implements, fix with keeping it in online if it fits

* Added prettier layout for class extends and implements, fixed tests as a side change

* Extends implements comments in same line fix

* Extends implements comments in same line without ugly workaround

* added empty line to test typescript_class/extends_implements.ts

* If only one extends keep old behaviour

* Removed console logs
2018-01-13 16:31:51 +11:00
Lucas Duailibe f119d4a90f Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
Christopher Chedeau abfdbe1896 Upgrade typescript to 2.4 (#2120)
Fixes #2117
2017-06-13 09:47:40 -07:00
Christopher Chedeau 74f7f96fe4 Move accessibility before static (#1908)
I looked through all the places where we display accessibility and all of them now have a consistent way of printing all those modifiers.

Fixes #1877
2017-06-02 14:27:19 -07:00
Christopher Chedeau 5a828bedd1 Update eslint-typescript again (#1791)
Now fixes more issues ;)
2017-05-28 16:05:07 -07:00
Christopher Chedeau 882b712c5f Update typescript-eslint (#1787)
It improves a few things.
2017-05-28 13:18:29 -07:00
Lucas Azzola e270032d37 chore(typescript): upgrade typescript-eslint-parser to 992f1fa (fixes #1769) (#1785) 2017-05-28 08:05:33 -07:00
Lucas Azzola b265713763 fix(typescript): handle ExperimentalSpreadOperator, optional method, and abstract interface (#1763) 2017-05-26 20:19:17 -07:00
Christopher Chedeau cd60e020c3 Add support for TSQualifiedType in ast-types (#1696)
The comment doesn't print in the right location so there's likely more types missing but at least it's not crashing anymore
2017-05-23 18:18:46 -07:00
Christopher Chedeau 2c5dd4cc04 Print typescript class generics (#1673)
This is the only issue with the typescript codebase itself :)
2017-05-23 12:33:10 -07:00