From ca14e3d83c7901c49539fbbe7aa85df1b50926e0 Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Tue, 5 Nov 2019 13:32:43 -0600 Subject: [PATCH] FIX: Build with prettier for imports (#8298) --- .../javascripts/discourse/models/store.js.es6 | 18 ++++-------------- .../widgets/component-connector.js.es6 | 2 +- .../wizard/components/wizard-field.js.es6 | 4 +--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/discourse/models/store.js.es6 b/app/assets/javascripts/discourse/models/store.js.es6 index 3f5116e611e..39a5ce1434d 100644 --- a/app/assets/javascripts/discourse/models/store.js.es6 +++ b/app/assets/javascripts/discourse/models/store.js.es6 @@ -96,11 +96,7 @@ export default EmberObject.extend({ return this._resultSet(type, result, findArgs); } else { const apiName = this.adapterFor(type).apiNameFor(type); - return this._hydrate( - type, - result[underscore(apiName)], - result - ); + return this._hydrate(type, result[underscore(apiName)], result); } }, @@ -156,9 +152,7 @@ export default EmberObject.extend({ refreshResults(resultSet, type, url) { const adapter = this.adapterFor(type); return ajax(url).then(result => { - const typeName = underscore( - this.pluralize(adapter.apiNameFor(type)) - ); + const typeName = underscore(this.pluralize(adapter.apiNameFor(type))); const content = result[typeName].map(obj => this._hydrate(type, obj, result) ); @@ -169,9 +163,7 @@ export default EmberObject.extend({ appendResults(resultSet, type, url) { const adapter = this.adapterFor(type); return ajax(url).then(result => { - const typeName = underscore( - this.pluralize(adapter.apiNameFor(type)) - ); + const typeName = underscore(this.pluralize(adapter.apiNameFor(type))); let pageTarget = result.meta || result; let totalRows = @@ -225,9 +217,7 @@ export default EmberObject.extend({ _resultSet(type, result, findArgs) { const adapter = this.adapterFor(type); - const typeName = underscore( - this.pluralize(adapter.apiNameFor(type)) - ); + const typeName = underscore(this.pluralize(adapter.apiNameFor(type))); const content = result[typeName].map(obj => this._hydrate(type, obj, result) ); diff --git a/app/assets/javascripts/discourse/widgets/component-connector.js.es6 b/app/assets/javascripts/discourse/widgets/component-connector.js.es6 index d5d9213cf2c..db53cc314f2 100644 --- a/app/assets/javascripts/discourse/widgets/component-connector.js.es6 +++ b/app/assets/javascripts/discourse/widgets/component-connector.js.es6 @@ -1,5 +1,5 @@ import { next } from "@ember/runloop"; -import { setOwner, getOwner } from '@ember/application'; +import { setOwner, getOwner } from "@ember/application"; export default class ComponentConnector { constructor(widget, componentName, opts, trackedProperties) { diff --git a/app/assets/javascripts/wizard/components/wizard-field.js.es6 b/app/assets/javascripts/wizard/components/wizard-field.js.es6 index b0b9d889c96..7636eee0d04 100644 --- a/app/assets/javascripts/wizard/components/wizard-field.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field.js.es6 @@ -13,8 +13,6 @@ export default Component.extend({ @computed("field.type", "field.id") inputComponentName(type, id) { - return type === "component" - ? dasherize(id) - : `wizard-field-${type}`; + return type === "component" ? dasherize(id) : `wizard-field-${type}`; } });