72 Commits

Author SHA1 Message Date
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Shine Wang
5075f3cb6f Bug fix for printing minified literals (#4830)
* Fixed minified literal generator: now prints the shorter of `raw` and `value`.
2016-11-15 10:50:57 -05:00
Juriy Zaytsev
1d728750c9 Add retainFunctionParens option (#4621)
* Add retainParens option

* Add doc, remove option

* Add negation test

* Make sure parens are not added

* Change name

* Change dir name
2016-09-30 18:05:33 -04:00
Logan Smyth
a13bf6e0be Drop the unhelpful 'keyword' helper. 2016-07-18 19:12:22 -07:00
Logan Smyth
1b527eb23c Perform number decimal checks at the token level. 2016-07-18 19:12:21 -07:00
Logan Smyth
9f49c99774 Drop .getLast(). 2016-07-18 19:12:21 -07:00
Logan Smyth
fdc5b7cb5d Only set the source location when inserting the comment text. 2016-07-17 21:51:01 -07:00
Logan Smyth
4dcec860bd Drop trailing whitespace after all newlines. 2016-07-17 21:51:01 -07:00
Logan Smyth
59fe72ee7d Avoid recalculating the current line. 2016-07-17 21:51:01 -07:00
Logan Smyth
1bbf109e8e Move aux comments entirely into printer. 2016-07-17 21:51:01 -07:00
Logan Smyth
11ee8642fd Drop the 'after' callback from 'print'. 2016-07-17 21:51:01 -07:00
Logan Smyth
59c1945493 Move whitespace handling into statement list printing. 2016-07-17 21:51:01 -07:00
Logan Smyth
5de7433147 Avoid calls to isUserWhitespacable by explicitly marking statement lists. 2016-07-17 21:51:00 -07:00
Logan Smyth
38b91235cc Print inter-node newlines before other node items. 2016-07-17 21:51:00 -07:00
Logan Smyth
6bf52b74c0 Include newline insertion in the call sites of rightBrace. 2016-07-17 12:39:22 -07:00
Logan Smyth
0e05e9f216 Rely on .space and .newline behavior instead of explicit format checks. 2016-07-17 12:39:22 -07:00
Logan Smyth
68bc3d7dfb Standardize on the comment format function. 2016-07-17 12:39:22 -07:00
Logan Smyth
a3c99278ba Move format definition into Printer. 2016-07-17 11:07:26 -07:00
Logan Smyth
5e730b18bb Instantiate Whitespace in the printer. 2016-07-17 11:07:25 -07:00
Logan Smyth
ca1d601037 Move property definitions to class props. 2016-07-17 11:07:24 -07:00
Logan Smyth
1d0ff341fd Skip mutating the 'ignore' flag when printing. 2016-07-17 11:06:31 -07:00
Logan Smyth
44282e4579 Disable indent and inc/dec time. 2016-07-14 22:58:48 -07:00
Logan Smyth
9b8b5112df Remove unneeded _compact assignment. 2016-07-14 22:58:48 -07:00
Logan Smyth
1bf76b0f33 Use .append to force-commit semicolons for empty statements. 2016-07-14 22:58:48 -07:00
Logan Smyth
bd9bb053c3 Flatten aux comment logic. 2016-07-14 22:58:48 -07:00
Logan Smyth
9483f4bd94 Drop old stale code. 2016-07-14 22:58:47 -07:00
Logan Smyth
b841d12c9e Initialize inForStatementInitCounter as a public var. 2016-07-14 22:58:47 -07:00
Logan Smyth
e056c0b9d6 Use the presence of _whitespace to toggle its use. 2016-07-14 22:58:47 -07:00
Logan Smyth
6a74731c6b Drop the private version of ._format 2016-07-14 22:58:47 -07:00
Logan Smyth
55a1ffd266 Mark a bunch of methods private. 2016-07-14 22:58:46 -07:00
Logan Smyth
6b7f3cc4cd Inline comment generation function. 2016-07-14 21:55:08 -07:00
Logan Smyth
cb60808500 Make buffer a property for managing the token queue. 2016-07-05 21:02:46 -07:00
Logan Smyth
abb9618e8c Drop array support from endsWith. 2016-07-05 19:44:51 -07:00
Logan Smyth
d6b1e36d49 Make the 'catchUp' call implicit to source location updates. 2016-07-04 22:49:58 -07:00
Logan Smyth
3680d10b6f Centralize position tracking into buffer. 2016-07-04 22:42:28 -07:00
Logan Smyth
4286cb4f2a Explicitly label standalone tokens and words. 2016-06-16 22:00:23 -07:00
Logan Smyth
22e2c88269 Drop the unneeded noIndent function param. 2016-06-16 22:00:23 -07:00
Logan Smyth
8336aa52e8 Split all of the separators into functions. 2016-06-16 20:31:19 -07:00
Logan Smyth
315c075419 Remove the unnecessary push/_push division. 2016-06-16 20:31:19 -07:00
Logan Smyth
528128f62d Avoid looking for raw values for all nodes. 2016-06-16 20:31:19 -07:00
Logan Smyth
710f151d31 Use the standard space helper for comment space. 2016-06-16 20:31:19 -07:00
Logan Smyth
680fcc16d7 Standardize on .endsWith 2016-06-16 20:31:19 -07:00
dlwalsh
829d4497c9 remove micro modules in favour of lodash functions (#3500) 2016-05-15 22:00:50 -04:00
Logan Smyth
f6be6e0bd4 Merge pull request #3463 from loganfsmyth/sourcemap-rework
Support more fine-grained source location tracking and use it for functions
2016-04-20 18:57:18 -07:00
Logan Smyth
ca8556e36f Let function optimize better by using a boolean. 2016-04-19 19:36:11 -07:00
Logan Smyth
dc92a16e7f Fast path for newline processing. 2016-04-19 18:59:32 -07:00
Logan Smyth
76bb1dffaa Track sourcemap location on a stack - fixes T7255 2016-04-11 01:54:40 -07:00
Amjad Masad
3667527d04 Revert "Remove flow"
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Sam Goldman
2827ff6b01 Remove flow 2016-03-01 22:33:30 -08:00