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