rouzbeh84
aaeebfaf00
inlines babel-messages on the following files:
...
option-manager.js... /babel-core/src/config/
build-external-helpers.js... /packages/babel-core/src/tools/
index.js... /packages/babel-generator/src
2017-09-30 02:19:32 -07:00
Daniel Tschinder
b3372a572d
Remove whitespace generation ( #5833 )
...
* Remove whitespace generation and rely on default printing
Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines
* Fix a few more fixtures
2017-06-27 21:57:02 -05:00
Brian Ng
e4b35f680d
Run prettier
2017-06-27 12:15:00 -05:00
Henry Zhu
ba671d0a66
update babel-eslint, try out numeric separators ( #5866 )
...
* update babel-eslint, try out numeric separators
* update version
2017-06-17 23:31:47 -04:00
Henry Zhu
123dce5fcd
Hardcode to double quotes, indent to 2 spaces ( #5824 )
2017-06-05 22:14:37 -05:00
Artem Gurzhii
6888a2c51b
Code refactoring for the babel-generator ( #5344 )
...
* refactoring code for babel-generator package
* removing spaces and refactoring if statement
* fixing warnings
2017-03-07 16:41:49 -05:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Marek Święcicki
ba0df23365
[7.0] Remove quotes option ( #5154 )
...
* remove mention of 'quotes' option from README.md
* always infer quotes option's value
2017-01-31 12:03:51 -08:00
Chau Nguyen
d710e6dd5b
[7.0] Drop flowUsesCommas option from babel-generator ( #5123 )
2017-01-19 22:24:13 -05:00
Brian Ng
8c35b320d3
Bump eslint-config-babel and fix lint ( #5129 )
2017-01-17 10:51:16 +01:00
Henry Zhu
672adba9a1
enable prefer const ( #5113 )
2017-01-14 09:48:52 -05:00
Brian Ng
db04f99124
Raise limit on code size before compacting ( #4965 )
2016-12-08 18:08:56 -05:00
Juriy Zaytsev
cf3a38fb40
Add jsonCompatibleStrings option to generator ( #4827 )
2016-11-15 15:03:41 -05:00
Sam Pepose
db85bdc3fc
Added flowCommaSeparator option for object types ( #3547 )
2016-11-15 14:43:42 -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
Henry Zhu
5ea57d5e9c
fix tests and add exec test
2016-09-27 17:37:21 -04:00
Henry Zhu
b2eb5eca6f
babel-core: add options for different parser/generator ( #3561 )
...
* babel-core: add options for different parser/generator
* test for experiemental plugins, other babylon options
* fix passing options into parser
* Fix when no code is provided
* fixup tests
* fix tests again
* use filename and fallback to cwd
2016-09-27 09:09:31 -04:00
Logan Smyth
1bbf109e8e
Move aux comments entirely into printer.
2016-07-17 21:51:01 -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
0d5cbe6102
Move class static helpers off class.
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
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
cb60808500
Make buffer a property for managing the token queue.
2016-07-05 21:02:46 -07:00
Logan Smyth
3680d10b6f
Centralize position tracking into buffer.
2016-07-04 22:42:28 -07:00
Logan Smyth
177c092496
Remove sideeffectful position mutation.
2016-07-02 15:38:05 -07:00
Logan Smyth
d042ddfdda
Clarify that the code generator class is not public.
2016-06-16 20:31:19 -07:00
Dale Bustad
3c6c09d00a
Only detect indent if babel-generator is provided code string, vs multi-source object.
2016-03-07 02:47:28 -08: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
Zachary Miller
33b4ef5d52
Parenthize "in" in for-loop init, even when init has nested for-loop
2016-02-05 14:28:01 -06:00
Steven Luscher
370c3ad343
Make use of opts.quotes in the CodeGenerator
...
I think we're meant to respect the value of `opts.quotes`, and try to infer it if none was supplied.
2015-12-18 18:23:20 -08:00
Steven Luscher
b6dabff82e
Correct type annotation for shouldPrintComment
...
I think this is supposed to be a `Function` that returns a `boolean`.
2015-12-17 10:50:59 -08:00
Amjad Masad
cb03a98b65
Add minified format option
...
As a follow up from #3145 we agreed to add a new format that is a
superset of the compact format option. Do things that are considered
dangerous. e.g. not printing semicolons, or print literal values
as opposed to raw values.
2015-12-09 17:34:23 -08:00
Daniel Lo Nigro
0076204f80
Fix Flow.
...
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.
Closes #3064
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
a639bffcd6
clean up auxiliaryComment
2015-11-03 02:46:00 +00:00
Sebastian McKenzie
ae7d5367f1
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
f88cc9d509
clean up babel-generator - closes #2210
2015-10-05 16:37:37 +01:00
Sebastian McKenzie
227ed5638a
add flow type annotations
2015-09-23 16:10:44 +01:00
Sebastian McKenzie
c99a179401
var -> let
2015-09-18 18:45:55 +01:00
Sebastian McKenzie
15f73b4fc3
remove noisy comments/documentation
2015-09-01 04:56:03 +01:00
Sebastian McKenzie
3ef9bffcc2
split up babel core into multiple modules
2015-08-11 17:40:59 +01:00