Commit Graph

17 Commits (f27f6c525bf8737f174348c162c12143daff21cb)

Author SHA1 Message Date
Jeff Lau 24f45d1b50 Require parenthesis around "TSAsExpression" inside an "UpdateExpression" (#4183) 2018-03-21 11:38:10 -03: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
Lucas Duailibe 68a99cf4b2 Parenthesis around TSAsExpression inside TSAbstractClassDeclaration (#3191) 2017-11-08 08:59:15 +11:00
Lucas Azzola 7162e1ecc8 Keep parens around TSAsExpression in ConditionalExpression (#3053) 2017-10-18 20:03:58 +11:00
Lucas Azzola 4a0e9475df Print parens around type assertion as LHS in assignment, fixes #2521 (#2525) 2017-07-20 23:16:15 +10:00
Lucas Azzola b25935d7a3 TypeScript: allow type assertions to hug (#2439)
* TypeScript: allow type assertions to hug, fixes #2437

* Update snapshots
2017-07-10 22:37:43 +10:00
Christopher Chedeau dae7203be6 Fix As parenthesis for real (#1923)
Instead of doing it inside of object, we need to have them use the existing mechanism that checks if the left-most character is a paren.
2017-06-02 16:08:45 -07:00
Christopher Chedeau 74f0d3979b Add parenthesis for yield and await inside of `as` (#1915)
Fixes #1913
2017-06-02 15:10:02 -07:00
Christopher Chedeau bc4075ac65 Add parenthesis around object inside of as (#1852)
Fixes #1851
2017-06-01 21:10:05 -07:00
Christopher Chedeau d06c46d045 Break on implements instead of extends (#1730)
There can often be something that breaks inside of `extends` so it's looking weird to break twice. It now only breaks on `implements` and make sure to put each element on its own line.

Fixes #1520
2017-05-25 16:26:56 -07:00
Christopher Chedeau 1df1389764 Add parenthesis for as inside of class extends (#1699)
Looks like we didn't properly support it for all the binary operators :p
2017-05-23 18:39:01 -07:00
Christopher Chedeau 7cd0b78fe7 Properly add parenthesis for as inside of binary expression (#1698)
The binary logic doesn't work if the node isn't a binary or logical expression
2017-05-23 18:36:14 -07:00
Christopher Chedeau a446cf18ce Add parenthesis for ternary inside of as (#1697) 2017-05-23 18:18:34 -07:00
Christopher Chedeau 1e351436da Add parenthesis for binary expression inside of as (#1682) 2017-05-23 13:14:22 -07:00
Simon Lydell bc5186e544 Run Prettier on all source files (#1648)
This commit updates `npm run format:all` to not only format .js files in
src/ and bin/, but also tests_config/ and scripts/, as well as all
jsfmt.spec.js files.

It also includes the result of running `npm run format:all`, except
changes to src/ and bin/.
2017-05-21 08:13:11 -07:00
Christopher Chedeau 3d964b18bb Add parens around `as` (#1528)
I put it at the same place where `a in b` is handled.

Fixes #1524
2017-05-05 21:39:20 -07:00