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

@@ -1,29 +1,52 @@
var z = {};
var x = babelHelpers.objectWithoutProperties(z, []);
var a = babelHelpers.objectWithoutProperties({ a: 1 }, []);
var a = babelHelpers.objectWithoutProperties({
a: 1
}, []);
var x = babelHelpers.objectWithoutProperties(a.b, []);
var x = babelHelpers.objectWithoutProperties(a(), []);
var { x1 } = z,
var {
x1
} = z,
y1 = babelHelpers.objectWithoutProperties(z, ["x1"]);
x1++;
var { [a]: b } = z,
var {
[a]: b
} = z,
c = babelHelpers.objectWithoutProperties(z, [a]);
var { x1 } = z,
var {
x1
} = z,
y1 = babelHelpers.objectWithoutProperties(z, ["x1"]);
let { x2, y2 } = z,
z2 = babelHelpers.objectWithoutProperties(z, ["x2", "y2"]);
const { w3, x3, y3 } = z,
z4 = babelHelpers.objectWithoutProperties(z, ["w3", "x3", "y3"]);
let {
x: { a: xa, [d]: f }
x2,
y2
} = z,
z2 = babelHelpers.objectWithoutProperties(z, ["x2", "y2"]);
const {
w3,
x3,
y3
} = z,
z4 = babelHelpers.objectWithoutProperties(z, ["w3", "x3", "y3"]);
let {
x: {
a: xa,
[d]: f
}
} = complex,
asdf = babelHelpers.objectWithoutProperties(complex.x, ["a", d]),
d = babelHelpers.objectWithoutProperties(complex.y, []),
g = babelHelpers.objectWithoutProperties(complex, ["x"]);
let {} = z,
y4 = babelHelpers.objectWithoutProperties(z.x4, []);
var { z } = babelHelpers.objectWithoutProperties({ z: 1 }, []);
var { x = 5 } = babelHelpers.objectWithoutProperties({ x: 1 }, []);
var {
z
} = babelHelpers.objectWithoutProperties({
z: 1
}, []);
var {
x = 5
} = babelHelpers.objectWithoutProperties({
x: 1
}, []);