Update prettier

This commit is contained in:
Nicolas Gallagher
2017-04-13 19:26:01 -07:00
parent 0863894f40
commit 761c42301d
3 changed files with 27 additions and 21 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
"file-loader": "^0.11.1",
"jest": "^19.0.2",
"node-libs-browser": "^0.5.3",
"prettier": "^1.0.2",
"prettier": "^1.1.0",
"react": "~15.4.1",
"react-addons-test-utils": "~15.4.1",
"react-dom": "~15.4.1",
+23 -17
View File
@@ -40,25 +40,31 @@ const applyLayout = Component => {
const componentDidUpdate = Component.prototype.componentDidUpdate;
const componentWillUnmount = Component.prototype.componentWillUnmount;
Component.prototype
.componentDidMount = safeOverride(componentDidMount, function componentDidMount() {
this._layoutState = emptyObject;
this._isMounted = true;
this._onLayoutId = guid();
registry[this._onLayoutId] = this;
this._handleLayout();
});
Component.prototype.componentDidMount = safeOverride(
componentDidMount,
function componentDidMount() {
this._layoutState = emptyObject;
this._isMounted = true;
this._onLayoutId = guid();
registry[this._onLayoutId] = this;
this._handleLayout();
}
);
Component.prototype
.componentDidUpdate = safeOverride(componentDidUpdate, function componentDidUpdate() {
this._handleLayout();
});
Component.prototype.componentDidUpdate = safeOverride(
componentDidUpdate,
function componentDidUpdate() {
this._handleLayout();
}
);
Component.prototype
.componentWillUnmount = safeOverride(componentWillUnmount, function componentWillUnmount() {
this._isMounted = false;
delete registry[this._onLayoutId];
});
Component.prototype.componentWillUnmount = safeOverride(
componentWillUnmount,
function componentWillUnmount() {
this._isMounted = false;
delete registry[this._onLayoutId];
}
);
Component.prototype._handleLayout = function() {
const layout = this._layoutState;
+3 -3
View File
@@ -5012,9 +5012,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.0.2.tgz#84535548fca00cf0acd7ca8296d492352ef167d7"
prettier@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.1.0.tgz#9d6ad005703efefa66b6999b8916bfc6afeaf9f8"
dependencies:
ast-types "0.9.8"
babel-code-frame "6.22.0"