Fix over-parenthesizing of function expressions

This commit is contained in:
Amjad Masad
2015-12-24 14:55:51 -08:00
parent 15760dfed2
commit 0d8e5a9e86
78 changed files with 213 additions and 187 deletions

View File

@@ -1,4 +1,4 @@
let Foo = (function () {
let Foo = function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
@@ -10,4 +10,4 @@ let Foo = (function () {
}
}]);
return Foo;
})();
}();

View File

@@ -1,5 +1,5 @@
var test = {
setInterval: (function (_setInterval) {
setInterval: function (_setInterval) {
function setInterval(_x, _x2) {
return _setInterval.apply(this, arguments);
}
@@ -9,7 +9,7 @@ var test = {
};
return setInterval;
})(function (fn, ms) {
}(function (fn, ms) {
setInterval(fn, ms);
})
};

View File

@@ -8,7 +8,7 @@ var _last2 = require("lodash/array/last");
var _last3 = babelHelpers.interopRequireDefault(_last2);
let Container = (function () {
let Container = function () {
function Container() {
babelHelpers.classCallCheck(this, Container);
}
@@ -24,6 +24,6 @@ let Container = (function () {
}
}]);
return Container;
})();
}();
exports.default = Container;
exports.default = Container;

View File

@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
var _store = require("./store");
let Login = (function (_React$Component) {
let Login = function (_React$Component) {
babelHelpers.inherits(Login, _React$Component);
function Login() {
@@ -21,6 +21,6 @@ let Login = (function (_React$Component) {
}
}]);
return Login;
})(React.Component);
}(React.Component);
exports.default = Login;

View File

@@ -4,7 +4,7 @@ var _events2 = require("events");
var _events3 = babelHelpers.interopRequireDefault(_events2);
let Template = (function () {
let Template = function () {
function Template() {
babelHelpers.classCallCheck(this, Template);
}
@@ -16,6 +16,6 @@ let Template = (function () {
}
}]);
return Template;
})();
}();
console.log(new Template().events());
console.log(new Template().events());

View File

@@ -5,7 +5,7 @@ var obj = {
})();
},
h: (function (_h) {
h: function (_h) {
function h() {
return _h.apply(this, arguments);
}
@@ -15,7 +15,7 @@ var obj = {
};
return h;
})(function () {
}(function () {
console.log(h);
}),