From fdc5566bf8a9d28a433a19d8bc68913a47de2b1e Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Thu, 9 Nov 2017 16:08:50 -0500 Subject: [PATCH] Update prettier to v1.8.2 (#756) --- package.json | 2 +- playground/app.js | 9 ++++++--- test/performance_test.js | 30 ++++++++++++++---------------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 7ded20e000..3a868df3e1 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "json-loader": "^0.5.7", "lint-staged": "^3.3.1", "mocha": "^2.5.3", - "prettier": "^1.7.2", + "prettier": "^1.8.2", "react": "^15.5.0", "react-addons-test-utils": "^15.3.2", "react-codemirror2": "^2.0.2", diff --git a/playground/app.js b/playground/app.js index af7e54a552..e7fd1ccc82 100644 --- a/playground/app.js +++ b/playground/app.js @@ -460,13 +460,16 @@ class App extends Component { formData={formData} onChange={this.onFormDataChange} onSubmit={({ formData }) => - console.log("submitted formData", formData)} + console.log("submitted formData", formData) + } fields={{ geo: GeoPosition }} validate={validate} onBlur={(id, value) => - console.log(`Touched ${id} with value ${value}`)} + console.log(`Touched ${id} with value ${value}`) + } onFocus={(id, value) => - console.log(`Focused ${id} with value ${value}`)} + console.log(`Focused ${id} with value ${value}`) + } transformErrors={transformErrors} onError={log("errors")}>
diff --git a/test/performance_test.js b/test/performance_test.js index 64e36b5dd4..db482f4acc 100644 --- a/test/performance_test.js +++ b/test/performance_test.js @@ -60,14 +60,13 @@ describe("Rendering performance optimizations", () => { formData: { const: "0", var: "0" }, }); - const fields = scryRenderedComponentsWithType( - comp, - SchemaField - ).reduce((fields, fieldComp) => { - sandbox.stub(fieldComp, "render").returns(
); - fields[fieldComp.props.idSchema.$id] = fieldComp; - return fields; - }); + const fields = scryRenderedComponentsWithType(comp, SchemaField).reduce( + (fields, fieldComp) => { + sandbox.stub(fieldComp, "render").returns(
); + fields[fieldComp.props.idSchema.$id] = fieldComp; + return fields; + } + ); setProps(comp, { schema, formData: { const: "0", var: "1" } }); @@ -86,14 +85,13 @@ describe("Rendering performance optimizations", () => { formData: ["const", "var0"], }); - const fields = scryRenderedComponentsWithType( - comp, - SchemaField - ).reduce((fields, fieldComp) => { - sandbox.stub(fieldComp, "render").returns(
); - fields[fieldComp.props.idSchema.$id] = fieldComp; - return fields; - }); + const fields = scryRenderedComponentsWithType(comp, SchemaField).reduce( + (fields, fieldComp) => { + sandbox.stub(fieldComp, "render").returns(
); + fields[fieldComp.props.idSchema.$id] = fieldComp; + return fields; + } + ); setProps(comp, { schema, formData: ["const", "var1"] });