fisker Cheung
cc5981227a
Add parens for yield in pipeline ( #10446 )
2021-03-26 10:19:00 +02:00
George Zahariev
99ac66b73a
Support for Flow's Indexed Access type ( #10594 )
2021-03-25 00:32:53 +02:00
Sosuke Suzuki and Georgii Dolzhykov
a49942c1ba
Support module blocks proposal ( #10417 )
...
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-24 18:19:11 +02:00
Sosuke Suzuki
f0a612a302
Update @typescript-eslint/typescript-estree ( #10589 )
2021-03-24 19:39:00 +09:00
fisker Cheung
a17d3fb21f
Disallow import without argument and new import(…) ( #10584 )
2021-03-23 09:48:29 +08:00
5a789f52db
Build(deps): Bump @babel/parser from 7.13.10 to 7.13.11 ( #10546 )
...
* Build(deps): Bump @babel/parser from 7.13.10 to 7.13.11
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.13.10 to 7.13.11.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.11/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com >
* Format type imports in TSImportEqualsDeclaration
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-22 18:15:01 +09:00
dependabot[bot]
edce20a822
Build(deps): Bump @glimmer/syntax from 0.77.1 to 0.77.2 ( #10550 )
2021-03-16 18:03:38 +00:00
Georgii Dolzhykov
13744dffa2
Fix edge case with trailing comments in arrow chains ( #10543 )
...
* Fix edge case with trailing comments in arrow chains
* Remove handling of args.needsSemi from printComments
2021-03-16 15:51:03 +02:00
dependabot[bot]
72fcf45df3
Build(deps): Bump @babel/parser from 7.13.9 to 7.13.10 ( #10523 )
2021-03-16 04:07:53 +00:00
Georgii Dolzhykov
6a87ce138a
Improve detection of AMD define ( #10528 )
2021-03-15 00:08:37 +02:00
fisker Cheung
21c81e007d
Test json superset ( #10493 )
2021-03-14 15:04:35 +02:00
Georgii Dolzhykov
2740ea6ee8
Avoid last-argument hugging for number-only arrays ( #10517 )
2021-03-14 12:15:53 +02:00
Georgii Dolzhykov
169faf39ac
Update yaml to 1.10.2 ( #10516 )
2021-03-14 12:14:08 +02:00
fisker Cheung
3995c2a1a1
Whitelist recovered babel parse errors ( #10495 )
2021-03-13 22:07:22 +02:00
fisker Cheung
1ce6b8dc3d
Fix syntax error on JSON range formatting ( #10497 )
2021-03-12 00:24:45 +02:00
Georgii Dolzhykov
4ece300581
Fix Flow range formatting ( #10505 )
...
* Fix Flow range formatting
* Add changelog
2021-03-10 15:12:27 +02:00
fisker Cheung
02f803ac8d
JSON: Only allow +/- number in UnaryExpression ( #10434 )
2021-03-09 10:58:31 +08:00
046ffb11f9
Support better formatting for curried arrow functions ( #9992 )
...
* Support formatting for curried arrow functions
* Fix test file name
* Fix threshold
* Add changelog
* Fix operator for comparing
* Fix return pos
* Fix eslint
* level 2
* Refactor for level2
* Update tests
* Remove concat
* If it fits on one line, print on one line
* Indent second level arg
* Break before last return value
* Use isCallLikeExpression
* Improve printing
* Add tests
* Remove unnecesary condition
* Fix lint problems
* Update src/language-js/utils.js
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com >
* Update changelog
* Add ImportExpression
* Add ImportExpression to isCallLikeExpression
* Resolve conflicts
* Address reviews
* Fix ESLint problem
* Fix changelog
* Add tests
* More tests
* Print simple arrow chains on one line
* Don't forcibly break chain when a segment has a return type but no params
* Prevent excessive wrapping in assignments
* Simplify
* Format object bodies like blocks
* Update changelog
* Fix last arg expansion
* Simplify
* Fix arrow chains in assignment chains
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com >
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-08 23:18:53 +02:00
Sosuke Suzuki
c9144daf47
Support TS 4.2 abstract construct types via ts-estree ( #10466 )
2021-03-06 19:16:51 +02:00
fisker Cheung and Georgii Dolzhykov
8a1ee9ad1b
Support JSON6 ( #10456 )
...
* Add test
* Support JSON6
* Test
* Print `null` instead of holes
* More tests
* Update changelog
* Style
* Minor refactor
* Fix AST clean
* Fix `Identifier` clean
* Fix AST compare
* Style
* Reword changelog
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-04 19:37:42 +02:00
Georgii Dolzhykov
37aa31e929
Remove hacks for single-element unions/intersections ( #10457 )
...
* Remove hacks for degenerate unions/intersection
* Add changelog
2021-03-04 01:21:03 +02:00
Georgii Dolzhykov and Sosuke Suzuki
5f8fee4d07
Prevent wrapping object properties with short keys ( #10335 )
...
* Prevent wrapping object properties with short keys
* Update src/language-js/print/assignment.js
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
* Use getStringWidth instead of .length
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2021-03-03 01:43:46 +02:00
fisker Cheung
2f384ab24a
JSON: More JSON5 data tests ( #10453 )
2021-03-02 13:43:48 +08:00
fisker Cheung
2edfec5eda
JSON: Better error message ( #10452 )
2021-03-02 13:42:49 +08:00
fisker Cheung
ed9e9ab649
Improve json error code frame ( #10433 )
2021-03-01 10:04:09 +08:00
fisker Cheung
7aff95cac1
Refactor semicolon check ( #10355 )
2021-03-01 10:03:28 +08:00
fisker Cheung
9324380c53
JSON: Disallow sparse array ( #10443 )
2021-03-01 09:53:32 +08:00
fisker Cheung
ed64ce0f0e
JSON: Allow Infinity and NaN ( #10451 )
2021-03-01 09:14:20 +08:00
Sosuke Suzuki
fc396277fc
Support TS 4.2 abstract constructor signature ( #10418 )
2021-02-28 22:00:17 +02:00
fisker Cheung and Georgii Dolzhykov
383e17665e
Refactor decorators print ( #10296 )
...
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-01 02:58:43 +08:00
dependabot[bot] and sosukesuzuki
478107836d
Build(deps): Bump @babel/parser from 7.12.11 to 7.13.4 ( #10397 )
...
* Build(deps): Bump @babel/parser from 7.12.11 to 7.13.4
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.12.11 to 7.13.4.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.4/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com >
* Add unstable AST compare testing
* Remove error tests for this type with babel-flow
* Fix typo
* Add changelog
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-02-26 22:04:53 +09:00
Sosuke Suzuki
feacf82892
Update babel/parser to v7.12.17 ( #10345 )
2021-02-25 18:28:06 +08:00
Georgii Dolzhykov
ec27ade49b
Heuristic for grouping parameters in method signatures ( #10357 )
...
* Heuristic for grouping parameters in method signatures
* Apply the same logic to function declaration and Flow types
* Group only if there is only one parameter
* Don't group if type param has constraints/default or >1 type param
2021-02-23 16:38:56 +02:00
fisker Cheung
d544585d87
Make JSON parser stricter ( #10346 )
2021-02-23 13:33:10 +02:00
Sosuke Suzuki
b0d66bb3c6
Support TS 4.1 intrinsic keyword ( #10390 )
2021-02-22 13:49:49 +02:00
Georgii Dolzhykov
42f8271a1e
Indent type assertions in heads of call and member expressions ( #10341 )
2021-02-20 14:37:08 +02:00
Georgii Dolzhykov
31b3351800
Better formatting for nested await in member/call expression heads ( #10342 )
2021-02-20 12:50:44 +02:00
Georgii Dolzhykov
aef9277ada
Print trailing comma for TS type parameters but not type arguments ( #10353 )
2021-02-20 12:47:56 +02:00
Georgii Dolzhykov
e147c3b1c4
Fix ASI protection for private fields ( #10334 )
2021-02-18 12:39:56 +02:00
Georgii Dolzhykov
3950ce194d
Correct parentheses for non-null assertions ( #10337 )
2021-02-18 01:52:24 +02:00
Georgii Dolzhykov
0a647a0d31
Format assignments more consistently ( #10222 )
2021-02-16 21:25:11 +02:00
Georgii Dolzhykov
3a73f48a0e
Don't use smart quotes for JSON5 with --quote-props=preserve ( #10323 )
2021-02-15 19:13:33 +02:00
Georgii Dolzhykov
81e6208e63
Allow arg hugging for non-concise arrow functions with return type ( #10316 )
2021-02-15 19:13:09 +02:00
Georgii Dolzhykov
a322cf152a
Disable Babel error recovery for invalid escaped characters in identifiers ( #10322 )
2021-02-15 16:58:50 +02:00
Sosuke Suzuki
2598803a2a
Improve formatting for React Hooks call ( #10238 )
...
* Add isReactHookCallWithDepsArray
* Improve formatting for React hooks call
* Refactor
* Add changelog
* Use isReactHookCallWithDepsArray in shouldGroupLastArg
* Support general pattern
2021-02-14 23:57:26 +02:00
Sosuke Suzuki and fisker Cheung
7d84c0a5a4
Fix inconsistent indentation for ternary in call expressions ( #10266 )
...
* Refactor with do while
* return false when ternary in CallExpression is not callee
* Update changelog
* For computed member property
* Fix
* Simplify
* Minor tweak
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-02-12 08:11:24 +09:00
Cyrille David
5aa057b40b
Handlebars: Default --html-whitespace-sensitivity to strict ( #10201 )
...
* Handlebars: Default --html-whitespace-sensitivity to strict
* Record tests other than handlebars
* Trim trailing newlines
* Record tests
* Fix rebase
* Record all tests not only hbs
* Fix the idempotency issue
Adjust dedent for the last child node
* Fix the annoying trailing whitespace
* Trim isolated leading newline
2021-02-11 15:43:07 +02:00
Sosuke Suzuki
2d97df8ec7
Fix unnecessary line breaks in method type declaration parameters ( #10024 )
2021-02-11 09:49:38 +02:00
dependabot[bot] and fisker Cheung
d0829f8b95
Build(deps): Bump meriyah from 4.0.0 to 4.1.1 ( #10283 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-02-11 00:51:41 +08:00
Georgii Dolzhykov
a55fe2d961
Add tests for #2239 ( #10286 )
2021-02-10 01:06:14 +02:00