[react-native] Use trailing commas transform
Summary: @public Apparently trailing commas transform isn't exported by react-tools. We need to pull it out manually. This is not so clean but we're swtching to babel very shortly. Test Plan: * npm start * write `foo(a,b,c,)` in some file * request that file in the browser and make sure that trailing comma is gone
This commit is contained in:
parent
40da7bb835
commit
d9b7e63e47
|
@ -16,10 +16,12 @@ var reactVisitors =
|
|||
require('react-tools/vendor/fbtransform/visitors').getAllVisitors();
|
||||
var staticTypeSyntax =
|
||||
require('jstransform/visitors/type-syntax').visitorList;
|
||||
var trailingCommaVisitors =
|
||||
require('jstransform/visitors/es7-trailing-comma-visitors.js').visitorList;
|
||||
|
||||
// Note that reactVisitors now handles ES6 classes, rest parameters, arrow
|
||||
// functions, template strings, and object short notation.
|
||||
var visitorList = reactVisitors;
|
||||
|
||||
var visitorList = reactVisitors.concat(trailingCommaVisitors);
|
||||
|
||||
function transform(srcTxt, filename) {
|
||||
var options = {
|
||||
|
|
Loading…
Reference in New Issue