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
This commit is contained in:
Daniel Tschinder
2017-06-27 19:57:02 -07:00
committed by Brian Ng
parent bc29145465
commit b3372a572d
379 changed files with 1974 additions and 1109 deletions

View File

@@ -16,7 +16,6 @@ var _binarySerializer = require("./helpers/binary-serializer");
var _binarySerializer2 = babelHelpers.interopRequireDefault(_binarySerializer);
// import ...
var Connection = function (_EventEmitter) {
babelHelpers.inherits(Connection, _EventEmitter);
@@ -26,9 +25,8 @@ var Connection = function (_EventEmitter) {
var _this = babelHelpers.possibleConstructorReturn(this, (Connection.__proto__ || Object.getPrototypeOf(Connection)).call(this));
_this.isConnected = false;
_this.roomId = roomId;
_this.roomId = roomId; // ...
// ...
return _this;
}

View File

@@ -22,7 +22,9 @@ var RandomComponent = function (_Component) {
value: function render() {
return _react2.default.createElement(
"div",
{ className: "sui-RandomComponent" },
{
className: "sui-RandomComponent"
},
_react2.default.createElement(
"h2",
null,

View File

@@ -19,6 +19,7 @@ var a1 = function (_b) {
_this.x = function () {
return _this;
};
return _this;
}
@@ -36,10 +37,11 @@ var a2 = function (_b2) {
_this2.x = function () {
return _this2;
};
return _this2;
}
return a2;
}(b);
exports.default = a2;
exports.default = a2;

View File

@@ -11,9 +11,8 @@ var B = function (_A) {
var _this, _ret;
babelHelpers.classCallCheck(this, B);
return _ret = (_this = babelHelpers.possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this)), _this), babelHelpers.possibleConstructorReturn(_this, _ret);
}
return B;
}(A);
}(A);

View File

@@ -3,6 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
function _default() {
return function () {
function Select() {
@@ -16,4 +17,5 @@ function _default() {
return Select;
}();
}
exports.default = _default;
exports.default = _default;

View File

@@ -3,7 +3,6 @@
var Foo = function () {
function Foo(val) {
babelHelpers.classCallCheck(this, Foo);
this._val = val;
}
@@ -24,4 +23,4 @@ var Foo = function () {
})
}]);
return Foo;
}();
}();

View File

@@ -21,8 +21,9 @@ var A = function (_B) {
} else {
var _this = _possibleConstructorReturn(this, (A.__proto__ || Object.getPrototypeOf(A)).call(this));
}
return _possibleConstructorReturn(_this);
}
return A;
}(B);
}(B);