From b47f0ce41aafd5078053f9f042350a505594ede5 Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Wed, 6 Jun 2018 05:20:40 -0700 Subject: [PATCH] Bump Prettier to 1.13.4 on xplat Summary: @public Bump Prettier to use version 1.13.4 All code changes are caused by running Prettier and should only affect files that have an `format` header. All other changes caused by yarn. Reviewed By: ryanmce Differential Revision: D8251255 fbshipit-source-id: 0b4445c35f1269d72730f2000002a27c1bc35914 --- javascript/tests/run-bench.js | 2 +- website/package.json | 2 +- website/src/components/Playground/Editor.js | 6 ++---- website/src/components/Playground/index.js | 14 ++++++-------- website/yarn.lock | 6 +++--- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/javascript/tests/run-bench.js b/javascript/tests/run-bench.js index 2becad52..aa42be4c 100644 --- a/javascript/tests/run-bench.js +++ b/javascript/tests/run-bench.js @@ -61,7 +61,7 @@ for (let [name, results] of testResults) { for (let [type, result] of results) { console.log( - ` - ${type}: ${result}ms (${Math.round(result / min * 10000) / 100}%)`, + ` - ${type}: ${result}ms (${Math.round((result / min) * 10000) / 100}%)`, ); } } diff --git a/website/package.json b/website/package.json index 09d114ce..ef18bb57 100644 --- a/website/package.json +++ b/website/package.json @@ -31,6 +31,6 @@ "develop": "gatsby develop" }, "devDependencies": { - "prettier": "1.12.1" + "prettier": "1.13.4" } } diff --git a/website/src/components/Playground/Editor.js b/website/src/components/Playground/Editor.js index af7df0e2..2e302a8d 100644 --- a/website/src/components/Playground/Editor.js +++ b/website/src/components/Playground/Editor.js @@ -336,8 +336,7 @@ export default class Editor extends Component { icon="plus-circle-o" disabled={!Boolean(this.props.onAdd)} onClick={this.props.onAdd} - type="primary" - > + type="primary"> add child node @@ -346,8 +345,7 @@ export default class Editor extends Component { icon="close-circle-o" disabled={!Boolean(this.props.onRemove)} onClick={this.props.onRemove} - type="danger" - > + type="danger"> remove node diff --git a/website/src/components/Playground/index.js b/website/src/components/Playground/index.js index 35b0b47d..26e1734e 100644 --- a/website/src/components/Playground/index.js +++ b/website/src/components/Playground/index.js @@ -154,7 +154,7 @@ export default class Playground extends Component { modifyAtPath( path: Array, value: any, - selectedNodePath?: ?Array = this.state.selectedNodePath + selectedNodePath?: ?Array = this.state.selectedNodePath, ) { // $FlowFixMe const layoutDefinition = setIn(this.state.layoutDefinition, path, value); @@ -169,7 +169,7 @@ export default class Playground extends Component { } getHash = ( - layoutDefinition: LayoutRecordT = this.state.layoutDefinition + layoutDefinition: LayoutRecordT = this.state.layoutDefinition, ): string => btoa(JSON.stringify(this.removeUnchangedProperties(layoutDefinition))); @@ -206,7 +206,7 @@ export default class Playground extends Component { this.state.selectedNodePath || [] ).reduce( (node: LayoutRecordT, cv) => node.children.get(cv), - this.state.layoutDefinition + this.state.layoutDefinition, ); return selectedNode ? selectedNode.children.size : 0; }; @@ -226,8 +226,7 @@ export default class Playground extends Component { style={{height, maxHeight: height}} ref={ref => { this._containerRef = ref; - }} - > + }}> { ) : ( )} @@ -297,7 +295,7 @@ export default class Playground extends Component {
{this.props.renderSidebar( layoutDefinition.getIn(getPath(selectedNodePath)), - this.onChangeLayout + this.onChangeLayout, )}
{playground} diff --git a/website/yarn.lock b/website/yarn.lock index a7a1671e..31fa92be 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -6862,9 +6862,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" +prettier@1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" pretty-bytes@^4.0.2: version "4.0.2"