Brian Ng
8a4b34d2a4
Add changelog entry for ?? precedence update ( #6430 )
2019-08-28 15:03:41 -05:00
Brian Ng
8e612f05a0
Add support for class private methods ( #5637 )
2018-12-14 09:45:26 -06:00
Brian Ng
e882452c54
Bump @babel/parser ( #5356 )
...
Follows #5304 with flow inexact support in @babel/parser!
2018-11-07 08:42:11 +08:00
Brian Ng
2283efb437
Fix parens around ternary inside OptionalMemberExpression ( #5179 )
2018-10-02 20:45:15 -05:00
Brian Ng
5315e6fe7a
Bump babel-related deps ( #5180 )
2018-10-02 20:44:54 -05:00
Brian Ng
1391891ef6
Print ObjectTypeInternalSlot with both flow/babel parsers ( #4869 )
...
* Print ObjectTypeInternalSlot with both flow/babel parsers
* chore: update to flow-parser@0.78 .0
* test: update snapshot
2018-08-08 09:21:39 -06:00
Brian Ng
1597578b05
Bump babel-parser ( #4910 )
2018-08-02 22:19:21 -05:00
Brian Ng
3e0dceda99
flow-parser@0.74.0 ( #4649 )
2018-06-09 17:03:50 -05:00
Brian Ng
fda7bf59f4
Add support for Flow's proto modifier syntax ( #4551 )
...
Flow commit: https://github.com/facebook/flow/commit/eb815be907eeae9f4851ff154087ebf079510d18
Babel PR: https://github.com/babel/babel/pull/7978
2018-05-25 17:23:17 -05:00
Brian Ng
d20d9c160e
Switch to @babel/parser ( #4544 )
...
We landed a change that added a new `InterpreterDirective` AST node type for hashbangs, and no longer add it as a comment/leadingComment.
Ref: https://github.com/babel/babel/pull/7928
I mimicked what we do in `@babel/generator` here, since I found it better than trying to add comments to the ast in `parser-include-shebang.js`). Definitely open to a better/cleaner option though!
Note: I'll follow this up with enabling tests for https://github.com/prettier/prettier/pull/4543 and https://github.com/prettier/prettier/pull/4540 once they land too.
2018-05-25 11:27:41 -05:00
Brian Ng
e42db35427
Add support for flow inline interfaces ( #4543 )
...
Flow commit: https://github.com/facebook/flow/commit/4f93f3adb7a5fedd3d572d62d718cf48c15a08ce
Babel commit: https://github.com/babel/babel/pull/7973
Will follow up w/ flow team on making `InterfaceType` -> `InterfaceTypeAnnotation`, since it seems a bit inconsistent.
2018-05-25 09:17:43 -05:00
Brian Ng
61b39749a1
Add support for flow explicit type arguments ( #4540 )
...
Fixes #4489 .
Babylon support landed in `beta.48` just now but requires a few other fixture changes, so I'm going to follow this up with another PR.
2018-05-25 08:55:39 -05:00
Brian Ng
857c55bd61
Keep parens around do-expressions inside ExpressionStatement ( #4479 )
2018-05-15 11:41:17 -05:00
Brian Ng
7cb6790ce0
Merge pull request #4326 from existentialism/flow70
...
Bump flow to 0.70
2018-04-18 17:04:14 -05:00
Brian Ng
9c15f9ed9e
Remove workaround in rollup config for flow parser
2018-04-17 09:50:27 -05:00
Brian Ng
7ab3e94fbb
Ensure mixins before implements
2018-04-16 21:28:56 -05:00
Brian Ng
e22ec0b9b9
Bump flow to 0.70
2018-04-16 20:53:07 -05:00
Brian Ng
4553b88bd4
Merge pull request #4156 from Cryrivers/master
...
feat(typescript): support TSMinusToken and TSPlusToken
2018-03-21 09:06:06 -05:00
Brian Ng
a8fe401b26
Fix cases with missing semi when printing DeclareExportDeclaration ( #3979 )
2018-02-17 17:40:43 +11:00
Brian Ng
a8fb1863a2
Merge pull request #3797 from prettier/feat-css-lowercase-wide-keywords
...
feat(css): lowercase wide keywords
2018-01-23 09:33:01 -06:00
Brian Ng
38c8286907
Fix closing parens on multi-line intersection/union type ( #3436 )
2017-12-10 22:32:17 +11:00
Brian Ng
d52d721cd1
Bump babylon to 7.0.0-beta.33 ( #3372 )
2017-12-02 09:39:10 +11:00
Brian Ng
12f028cd46
Fix formatting styled(Foo).attrs(...)`` ( #3073 )
2017-10-21 09:10:55 +11:00
Brian Ng
5f8fc9e489
Merge pull request #3057 from duailibe/ident-typo
...
Fix typo: ident -> indent
2017-10-18 09:04:05 -05:00
Brian Ng
d90aec1a1d
Add test for nested ternary with arrow func ( #3039 )
2017-10-16 09:09:57 +11:00
Brian Ng
2be986d0d7
Add support for ClassPrivateProperty ( #2837 )
2017-09-19 21:41:24 +02:00
Brian Ng
5bd8ca472b
Bump Babylon ( #2831 )
2017-09-15 17:26:35 +02:00
Brian Ng
9533c17827
Fix printing declare modifier for TS enum ( #2711 )
2017-08-30 08:14:26 -07:00
Brian Ng
123bc5d5ff
Ensure parens around LogicalExpression inside ExperimentalSpreadProperty ( #2710 )
2017-08-30 08:10:36 -07:00
Brian Ng
8bb8eaf941
Bump babylon to 7.0.0-beta.22 ( #2687 )
2017-08-29 09:11:32 +10:00
Brian Ng
1701f4a0d5
Print declare for TSInterfaceDeclaration ( #2574 )
2017-08-02 00:00:01 +10:00
Brian Ng
4c335cae0a
Add support for printing optional catch binding ( #2570 )
2017-07-31 14:40:14 -06:00
Brian Ng
24e1aec306
Add support for flow opaque types ( #2543 )
2017-07-25 19:47:54 -07:00
Brian Ng
cf6258ab4f
Re-enable flow-jsx-func-attr test ( #2541 )
2017-07-26 09:07:37 +10:00
Brian Ng
60f5836b37
Add support for flow export type star ( #2542 )
2017-07-26 09:00:20 +10:00
Brian Ng
7cef77433a
Bump babylon version ( #2205 )
2017-06-20 08:36:14 -07:00
Brian Ng
316c76172b
Add test for flow class field override ( #1669 )
2017-05-22 15:54:20 -07:00
Brian Ng
d608b7ba28
Bump Babylon and enable additional tests ( #1668 )
2017-05-22 15:31:53 -07:00
Brian Ng
36a6a8039e
Ensure parens for more await cases ( #1595 )
2017-05-11 19:06:54 -07:00
Brian Ng
b36504946c
Fix missing parenthesis for await && ( #1593 )
2017-05-11 16:30:33 -07:00
Brian Ng
ccf509abb6
Fix empty line with flow union ( #1511 )
2017-05-04 19:06:30 -07:00
Brian Ng
b2a092bd17
Allow flow declarations to break on StringLiteralTypeAnnotations ( #1437 )
...
* Allow flow declarations to break on StringLiteralTypeAnnotations
* canBreak
2017-04-27 11:21:42 -07:00
Brian Ng
9c826c2ed5
Inline nullable in flow generics ( #1426 )
2017-04-26 09:27:06 -07:00
Brian Ng
c0a0bf46bc
Fix missing trailing commas on flow generics ( #1381 )
2017-04-21 13:57:21 -07:00
Brian Ng
93f040a9ea
Skip trailing commas with FlowShorthandWithOneArg ( #1364 )
2017-04-20 14:46:41 -07:00
Brian Ng
4d9edec4e1
Fix trailing comma for rest element in Babylon ( #1230 )
2017-04-13 07:10:08 -07:00
Brian Ng
4dfe92a76b
Ensure JSXOpeningElement does not break with single text attr on Babylon ( #1229 )
2017-04-13 07:09:40 -07:00
Brian Ng
485028c32f
Fix ALL_PASERS typo in run_spec ( #1227 )
2017-04-13 07:08:55 -07:00
Brian Ng
3a7559be58
Preserve comment for last arg of ObjectMethod ( #1216 )
...
* Preserve comment after last arg of ObjectMethod
* Preserve comment after last arg with default value
2017-04-12 16:32:04 -07:00
Brian Ng
32eecabc6d
Stabilize comments on ObjectTypeAnnotation ( #1214 )
2017-04-12 14:13:34 -07:00
Brian Ng
651cce2066
Import new_spread flow tests ( #1138 )
2017-04-05 17:39:11 -07:00
Brian Ng
2e96574941
Switch to new test syntax for flow predicate tests ( #1137 )
2017-04-05 16:32:55 -07:00
Brian Ng
d9a4efcc35
Bump babylon to 7.0.0-beta.8 ( #1118 )
...
* Bump babylon version
* Enable flow predicate tests in babylon
2017-04-04 14:21:56 -07:00
Brian Ng
d8a64dec6c
Remove a few node types ( #1075 )
...
* Remove NumericLiteralTypeAnnotation
* Remove ExistentialTypeParam
2017-03-22 09:51:36 -07:00
Brian Ng
42910424a1
Fix parsing flow variance on babylon 7 ( #1069 )
...
* Enable babylon on variance tests
* Fix parsing flow variance in babylon 7
2017-03-22 09:37:26 -07:00
Brian Ng
41977c293e
Add support for ForOfStatement with await flag ( #1073 )
...
* Enable babylon on flow async_iteration tests
* Add support for ForOfStatement with await flag
2017-03-22 09:23:57 -07:00
Brian Ng
b8a7e5166b
Add parens for ConditionalExpression inside JSXSpreadAttribute ( #1015 )
2017-03-15 18:52:31 -07:00
Brian Ng
a2b560887c
Add support for breaks in TupleTypeAnnotation ( #1003 )
2017-03-15 09:35:22 -07:00
Brian Ng
d034564481
Remove parens from chained assignments ( #967 )
2017-03-09 09:17:16 -08:00
Brian Ng
b8bdb6c243
Inline BinaryExpressions inside JSXExpression ( #965 )
2017-03-09 07:59:53 -08:00
Brian Ng
f6bbc2ed2e
Fix bug with importing empty type ( #904 )
2017-03-05 19:08:42 -08:00
Brian Ng
860a9fd6d4
Ensure no parens for JSX inside of an ArrayExpression ( #895 )
2017-03-05 08:56:07 -08:00
Brian Ng
226fd85d8f
Fix paren removal on UnionTypeAnnotation ( #878 )
2017-03-03 17:37:00 -08:00
Brian Ng
543e62cd31
Revert babylon bump ( #792 )
2017-02-23 09:00:57 -08:00
Brian Ng
211deb527e
Bump babylon & add test for async func decl ( #790 )
...
* Add test for async function declaration
* Bump babylon version
2017-02-23 09:32:20 -05:00
Brian Ng
9c558bfe71
Remove extra parens around ternary arguments of a new call ( #776 )
2017-02-22 10:28:52 -08:00
Brian Ng
e0f82cd7d9
Ensure importKind is printed ( #718 )
2017-02-15 12:56:34 -08:00
Brian Ng
895709b4ca
Fix missing parens around object in MemberExpression ( #424 )
2017-01-22 19:29:30 -08:00
Brian Ng
2a0e7b575c
Ensure computed method names don't lose quotes ( #419 )
2017-01-22 18:41:31 -08:00
Brian Ng
badab37dd1
Remove unneeded parens for FunctionExpression inside LogicalExpression ( #399 )
2017-01-22 15:00:13 -08:00
Brian Ng
e31203f4bf
Fix some parens cases for UpdateExpressions ( #381 )
2017-01-21 20:14:22 -08:00
Brian Ng
b953ff0835
Add parens for default export FunctionExpressions ( #345 )
...
* Add parens for default export FunctionExpressions
* add exception for ArrowFunctionExpression
* add additional test cases
* thanks bakkot :)
2017-01-20 19:17:16 -08:00
Brian Ng
9fc85eb30d
Remove parens around AwaitExpression in ternary ( #346 )
2017-01-19 19:18:02 -08:00
Brian Ng
87b0ed3042
Fix parens around anonymous functions ( #297 )
2017-01-18 11:12:57 -08:00
Brian Ng
c02bd6a8d5
Handle additional export default parens cases ( #298 )
2017-01-18 11:11:52 -08:00
Brian Ng
083876e66d
Fix missing semi when default exporting CallExpression ( #287 )
2017-01-18 09:03:31 -08:00
Brian Ng
b94b86331f
Ensure parens on NewExpression with function callee ( #282 )
2017-01-17 19:45:56 -08:00
Brian Ng
f0d2ad4508
Fix parens for functions inside TaggedTemplateExpression ( #259 )
2017-01-16 19:47:13 -08:00
Brian Ng
d9ea466cd3
Fix FunctionExpression parens issues ( #250 )
2017-01-16 12:52:55 -05:00
Brian Ng
86c65d1f81
Fix missing parenthesis for typeof and arrow functions ( #249 )
2017-01-16 09:08:46 -08:00
Brian Ng
1c8414e894
Fix empty export with from clause ( #248 )
2017-01-16 08:58:23 -08:00
Brian Ng
b1138bdfd9
Fix parens issue with nested UrnaryExpressions ( #237 )
...
* Fix parens issue with nested UrnaryExpressions
* special case + and -
2017-01-16 07:51:16 -08:00
Brian Ng
470f80c17a
Fix issue with ArrowFunctionExpression parens ( #236 )
2017-01-15 22:42:42 -08:00
Brian Ng
340a39b414
Fix cases of missing parens with NewExpression ( #230 )
2017-01-15 23:56:40 -05:00