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:
committed by
Brian Ng
parent
bc29145465
commit
b3372a572d
@@ -5,4 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports.Cachier = Cachier;
|
||||
exports.default = new Cachier();
|
||||
|
||||
function Cachier(databaseName) {}
|
||||
@@ -4,4 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = foo;
|
||||
function foo() {}
|
||||
|
||||
function foo() {}
|
||||
@@ -3,5 +3,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
class Foo {}
|
||||
exports.default = Foo;
|
||||
|
||||
exports.default = Foo;
|
||||
@@ -10,12 +10,22 @@ let x = exports.x = 0;
|
||||
let y = exports.y = 0;
|
||||
|
||||
function f1() {
|
||||
({ x } = { x: 1 });
|
||||
({
|
||||
x
|
||||
} = {
|
||||
x: 1
|
||||
});
|
||||
exports.x = x;
|
||||
}
|
||||
|
||||
function f2() {
|
||||
({ x, y } = { x: 2, y: 3 });
|
||||
({
|
||||
x,
|
||||
y
|
||||
} = {
|
||||
x: 2,
|
||||
y: 3
|
||||
});
|
||||
exports.y = y;
|
||||
exports.x = x;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,16 @@ exports.foo8 = foo8;
|
||||
var foo = exports.foo = 1;
|
||||
var foo2 = exports.foo2 = 1,
|
||||
bar = exports.bar = 2;
|
||||
|
||||
var foo3 = exports.foo3 = function () {};
|
||||
|
||||
var foo4 = exports.foo4 = undefined;
|
||||
let foo5 = exports.foo5 = 2;
|
||||
let foo6 = exports.foo6 = undefined;
|
||||
const foo7 = exports.foo7 = 3;
|
||||
|
||||
function foo8() {}
|
||||
|
||||
class foo9 {}
|
||||
exports.foo9 = foo9;
|
||||
|
||||
exports.foo9 = foo9;
|
||||
@@ -3,5 +3,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
function _module() {}
|
||||
|
||||
exports.module = _module;
|
||||
@@ -25,7 +25,6 @@ var _foo5 = require("foo5");
|
||||
|
||||
exports.test = test;
|
||||
var test2 = exports.test2 = 5;
|
||||
|
||||
_foo4.bar;
|
||||
_foo5.foo;
|
||||
_foo2.default;
|
||||
_foo2.default;
|
||||
@@ -15,16 +15,11 @@ exports.test = test += 1;
|
||||
|
||||
var a = 2;
|
||||
exports.a = a;
|
||||
|
||||
exports.a = a = 3;
|
||||
|
||||
var b = 2;
|
||||
exports.c = b;
|
||||
|
||||
exports.c = b = 3;
|
||||
|
||||
var d = 3;
|
||||
exports.e = d;
|
||||
exports.f = d;
|
||||
|
||||
exports.f = exports.e = d = 4;
|
||||
Reference in New Issue
Block a user