From 761c42301d1e913c0a9181262cab9107abd10d8d Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 13 Apr 2017 19:26:01 -0700 Subject: [PATCH] Update prettier --- package.json | 2 +- src/modules/applyLayout/index.js | 40 ++++++++++++++++++-------------- yarn.lock | 6 ++--- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index b32c685a..4d68ccaf 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/modules/applyLayout/index.js b/src/modules/applyLayout/index.js index 538b668f..4d9f4ce8 100644 --- a/src/modules/applyLayout/index.js +++ b/src/modules/applyLayout/index.js @@ -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; diff --git a/yarn.lock b/yarn.lock index 0f6c64d3..a5736d81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"