Commit Graph
2523 Commits
Author SHA1 Message Date
fisker Cheung 334609d81e Fix comments.js import style (#9917) 2020-12-17 12:09:55 +08:00
fisker Cheung f09ad46166 Use index instead of .getName() in FastPath#each() (#9914) 2020-12-17 10:39:42 +08:00
fisker Cheung 45407d82b9 Refactor yaml (#9629) 2020-12-17 10:39:02 +08:00
fisker Cheung cf8cba363f DRY Block and Program print (#9899) 2020-12-17 09:28:58 +08:00
fisker Cheung d7c9dd0eaf Refactor(html): use concat directly (#9845) 2020-12-17 08:40:45 +08:00
fisker Cheung 790c8ee9db Replace normalizeParts with safer cleanDoc (#9844) 2020-12-17 08:39:23 +08:00
fisker Cheung 1bde9d8856 Refactor: Remove composeLoc function (#9896) 2020-12-16 08:52:59 +08:00
fisker Cheung 94256cac91 Refactor: Simplify JS parsers (#9897) 2020-12-16 08:48:04 +08:00
fisker Cheung a8e0af0585 Simplify escapeTemplateCharacters (#9848) 2020-12-16 08:45:41 +08:00
fisker Cheung 67613d23b2 Refactor: Extract printBody (#9898) 2020-12-15 16:39:59 +08:00
fisker Cheung 2c14620ba6 Refactor: Improve JavaScript parser readability (#9783) 2020-12-15 14:09:44 +08:00
fisker Cheung 2725ebee55 Fix unstable JSX formatting with U+3000 (#9866) 2020-12-15 13:45:16 +08:00
fisker Cheung cc9460950d Fix inconsistent directive print (#9850) 2020-12-15 12:24:13 +08:00
fisker Cheung 89402482ee Consistent Jsx case in variables (#9871) 2020-12-15 12:23:40 +08:00
fisker Cheung 099ba04327 TypeScript: Fix missing comments in MethodDefinition (#9872) 2020-12-15 12:22:56 +08:00
fisker Cheung f49e72e371 Use isBlockComment/isLineComment in canAttachComment (#9849) 2020-12-14 08:47:28 +08:00
fisker Cheung ee1d1a9512 HTML: Remove use of normalizeParts in "text" print (#9846) 2020-12-11 07:44:03 +08:00
Sosuke Suzuki 8d0c8b2bf4 Extract files and rename util -> core (#9826)
WIP

Extract create-minimist-options

Remove warning

Fix

Extract format.js

Fix

Remove

fix

Fix

Extract files for cli and rename util -> core

Update tsconfig
2020-12-08 14:36:46 +09:00
Sosuke Suzuki aaa9363e6f Print null argument list item (#9787)
* Print null argument list item

* Add changelog

* Add tests for comments
2020-12-08 13:52:30 +09:00
fisker CheungandGeorgii Dolzhykov 52f0894611 Fix stripTrailingHardline function (#9736)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-12-07 10:07:34 +08:00
fisker Cheung 400e30e47e Remove dead code (#9824) 2020-12-07 09:57:27 +08:00
Georgii Dolzhykov 1344d9a18a Fix an oversight from #9709 2020-12-02 18:58:08 +02:00
fisker Cheung fdaaf2298a Refactor: Stop mutating AST during getSortedChildNodes (#9797) 2020-11-30 18:10:30 +08:00
fisker Cheung c0fbd75288 Fix empty front matter formatting (#9791) 2020-11-30 18:10:09 +08:00
fisker CheungandGeorgii Dolzhykov f59eacd7f6 JS: Fix multiple-comments-on-same-line format (#9672)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-11-30 13:51:49 +08:00
fisker Cheung 05d20a63a4 Exclude node at rangeStart (#9704) 2020-11-30 12:29:48 +08:00
fisker Cheung 902d524d2f Treat .prettierrc as yaml (#8105) 2020-11-30 12:23:20 +08:00
fisker Cheung 664d0d33b5 Fix inconsistent language comment detection (#9743) 2020-11-26 19:30:57 +08:00
fisker Cheung 25d53fa9b3 SCSS/LESS: Fix comment inside parens (#9710) 2020-11-26 19:28:00 +08:00
fisker Cheung d8e40cd978 JS: Add hasComment and getComments (#9742) 2020-11-25 22:14:27 +08:00
fisker Cheung 125492818c printDocToString: Don't check existance before replacing newLine (#9775) 2020-11-25 22:03:34 +08:00
fisker Cheung 5f01f34453 Add semi to DeclareExportAllDeclaration (#9767) 2020-11-25 19:26:20 +08:00
fisker Cheung d230dccd9a Rename a variable (#9769) 2020-11-25 08:59:26 +08:00
fisker Cheung d02a367e64 Remove JSXText spacial case in comment attaching (#9759) 2020-11-24 17:37:29 +08:00
fisker Cheung 3cd70e3a9a Test: Fix AST_COMPARE test (#9768) 2020-11-24 16:13:23 +08:00
fisker Cheung c033455950 Extract some type annotation to flow.js and typescript.js (#9761) 2020-11-24 14:58:26 +08:00
Juriy Zaytsevandfisker 90abbb7924 [Glimmer] Preserve tilde comments (#9082)
Co-authored-by: fisker <lionkay@gmail.com>
2020-11-24 14:45:03 +08:00
fisker Cheung 7cb7c4920d Move some "TS*" node to print/typescript.js (#9758) 2020-11-23 19:46:14 +08:00
fisker Cheung df60040e1d Move Declare* node to print/flow.js (#9757) 2020-11-23 19:05:37 +08:00
fisker Cheung 3337fc1509 Refactor ConditionalExpression and TSConditionalType print (#9753) 2020-11-23 18:59:31 +08:00
fisker Cheung 895a177b0d Refactor function related functions (#9755) 2020-11-23 18:13:56 +08:00
fisker Cheung 5b4a4eda32 Extract printProperty (#9756) 2020-11-23 18:02:04 +08:00
fisker Cheung 923b281b07 Refactor class related functions (#9754) 2020-11-23 16:48:04 +08:00
fisker CheungandGeorgii Dolzhykov f254314feb Use meriyah (#9731)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-11-23 13:57:13 +08:00
Sosuke Suzuki 3208b948fc Fix formatting for AssignmentExpression with ClassExpression (#9741)
* Fix formatting for asignment with superClass

* Add tests

* Changelog

* For only AssignmentExpression

* Remove unnecesary ifBreak
2020-11-22 09:24:22 +09:00
fisker Cheung 4f330f0a78 Fix comments inside JSX end tag (#9711) 2020-11-21 16:34:28 +08:00
fisker Cheung f9c32016a7 Refactor: Stop mutating comments during decorateComment (#9726) 2020-11-21 16:34:03 +08:00
fisker Cheung 8b7658236a Refactor JS printer (#9730) 2020-11-21 13:20:14 +08:00
fisker Cheung 002dc6c45f Extract printStatementSequence, printMemberExpression, and printBlock (#9723) 2020-11-20 02:02:46 +08:00
fisker Cheung 92d31d1b30 Extract printAssignment, printBinaryishExpression, and printComment (#9722) 2020-11-20 00:36:48 +08:00