apply prettier on gigantic find and replace (#7604)

apply prettier on gigantic find and replace (#7604)

diff --git a/app/assets/javascripts/admin/components/admin-graph.js.es6 b/app/assets/javascripts/admin/components/admin-graph.js.es6
index 0c356c1..5ef3840 100644
--- a/app/assets/javascripts/admin/components/admin-graph.js.es6
+++ b/app/assets/javascripts/admin/components/admin-graph.js.es6
@@ -15,9 +15,7 @@ export default Ember.Component.extend({
         {
           data: rawData.map(r => r.y),
           label: model.get("title"),
-          backgroundColor: `rgba(200,220,240,${
-            this.type === "bar" ? 1 : 0.3
-          })`,
+          backgroundColor: `rgba(200,220,240,${this.type === "bar" ? 1 : 0.3})`,
           borderColor: "#08C"
         }
       ]
diff --git a/app/assets/javascripts/admin/components/admin-report.js.es6 b/app/assets/javascripts/admin/components/admin-report.js.es6
index 2c41342..d539776 100644
--- a/app/assets/javascripts/admin/components/admin-report.js.es6
+++ b/app/assets/javascripts/admin/components/admin-report.js.es6
@@ -75,11 +75,7 @@ export default Ember.Component.extend({
     this._super(...arguments);
 
     if (this.report) {
-      this._renderReport(
-        this.report,
-        this.forcedModes,
-        this.currentMode
-      );
+      this._renderReport(this.report, this.forcedModes, this.currentMode);
     } else if (this.dataSourceName) {
       this._fetchReport();
     }
@@ -271,11 +267,7 @@ export default Ember.Component.extend({
       this.set("showFilteringUI", false);
     }
 
-    this._renderReport(
-      report,
-      this.forcedModes,
-      this.currentMode
-    );
+    this._renderReport(report, this.forcedModes, this.currentMode);
   },
 
   _renderReport(report, forcedModes, currentMode) {
diff --git a/app/assets/javascripts/admin/components/embeddable-host.js.es6 b/app/assets/javascripts/admin/components/embeddable-host.js.es6
index f606e31..34d46ac 100644
--- a/app/assets/javascripts/admin/components/embeddable-host.js.es6
+++ b/app/assets/javascripts/admin/components/embeddable-host.js.es6
@@ -46,10 +46,7 @@ export default Ember.Component.extend(bufferedProperty("host"), {
       host
         .save(props)
         .then(() => {
-          host.set(
-            "category",
-            Discourse.Category.findById(this.categoryId)
-          );
+          host.set("category", Discourse.Category.findById(this.categoryId));
           this.set("editToggled", false);
         })
         .catch(popupAjaxError);
@@ -58,11 +55,9 @@ export default Ember.Component.extend(bufferedProperty("host"), {
     delete() {
       bootbox.confirm(I18n.t("admin.embedding.confirm_delete"), result => {
         if (result) {
-          this.host
-            .destroyRecord()
-            .then(() => {
-              this.deleteHost(this.host);
-            });
+          this.host.destroyRecord().then(() => {
+            this.deleteHost(this.host);
+          });
         }
       });
     },
diff --git a/app/assets/javascripts/admin/components/ip-lookup.js.es6 b/app/assets/javascripts/admin/components/ip-lookup.js.es6
index 2758694..d4bf91e 100644
--- a/app/assets/javascripts/admin/components/ip-lookup.js.es6
+++ b/app/assets/javascripts/admin/components/ip-lookup.js.es6
@@ -19,8 +19,8 @@ export default Ember.Component.extend({
       this.set("show", true);
 
       if (!this.location) {
-        ajax("/admin/users/ip-info", { data: { ip: this.ip } }).then(
-          location => this.set("location", Ember.Object.create(location))
+        ajax("/admin/users/ip-info", { data: { ip: this.ip } }).then(location =>
+          this.set("location", Ember.Object.create(location))
         );
       }
 
diff --git a/app/assets/javascripts/admin/components/resumable-upload.js.es6 b/app/assets/javascripts/admin/components/resumable-upload.js.es6
index 9c30065..b9cab23 100644
--- a/app/assets/javascripts/admin/components/resumable-upload.js.es6
+++ b/app/assets/javascripts/admin/components/resumable-upload.js.es6
@@ -109,9 +109,7 @@ export default Ember.Component.extend(
       buffer.push(iconHTML(icon));
       buffer.push("<span class='ru-label'>" + this.text + "</span>");
       buffer.push(
-        "<span class='ru-progress' style='width:" +
-          this.progress +
-          "%'></span>"
+        "<span class='ru-progress' style='width:" + this.progress + "%'></span>"
       );
     },
 
diff --git a/app/assets/javascripts/admin/components/secret-value-list.js.es6 b/app/assets/javascripts/admin/components/secret-value-list.js.es6
index e6b1d8a..58539cb 100644
--- a/app/assets/javascripts/admin/components/secret-value-list.js.es6
+++ b/app/assets/javascripts/admin/components/secret-value-list.js.es6
@@ -29,8 +29,7 @@ export default Ember.Component.extend({
     },
 
     addValue() {
-      if (this._checkInvalidInput([this.newKey, this.newSecret]))
-        return;
+      if (this._checkInvalidInput([this.newKey, this.newSecret])) return;
       this._addValue(this.newKey, this.newSecret);
       this.setProperties({ newKey: "", newSecret: "" });
     },
diff --git a/app/assets/javascripts/admin/components/value-list.js.es6 b/app/assets/javascripts/admin/components/value-list.js.es6
index d99541b..ff93375 100644
--- a/app/assets/javascripts/admin/components/value-list.js.es6
+++ b/app/assets/javascripts/admin/components/value-list.js.es6
@@ -79,10 +79,7 @@ export default Ember.Component.extend({
       return;
     }
 
-    this.set(
-      "values",
-      this.collection.join(this.inputDelimiter || "\n")
-    );
+    this.set("values", this.collection.join(this.inputDelimiter || "\n"));
   },
 
   _splitValues(values, delimiter) {
diff --git a/app/assets/javascripts/admin/components/watched-word-form.js.es6 b/app/assets/javascripts/admin/components/watched-word-form.js.es6
index 3f11f4b..837ce51 100644
--- a/app/assets/javascripts/admin/components/watched-word-form.js.es6
+++ b/app/assets/javascripts/admin/components/watched-word-form.js.es6
@@ -29,9 +29,7 @@ export default Ember.Component.extend({
   @computed("word")
   isUniqueWord(word) {
     const words = this.filteredContent || [];
-    const filtered = words.filter(
-      content => content.action === this.actionKey
-    );
+    const filtered = words.filter(content => content.action === this.actionKey);
     return filtered.every(
       content => content.word.toLowerCase() !== word.toLowerCase()
     );
diff --git a/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6
index bc4fd72..7a9be8c 100644
--- a/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6
@@ -23,10 +23,7 @@ export default Ember.Controller.extend({
 
   actions: {
     newColorSchemeWithBase(baseKey) {
-      const base = this.baseColorSchemes.findBy(
-        "base_scheme_id",
-        baseKey
-      );
+      const base = this.baseColorSchemes.findBy("base_scheme_id", baseKey);
       const newColorScheme = Ember.copy(base, true);
       newColorScheme.setProperties({
         name: I18n.t("admin.customize.colors.new_name"),
diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6
index 0c18d7e..ba54e3c 100644
--- a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6
@@ -36,30 +36,18 @@ export default Ember.Controller.extend({
   actions: {
     save() {
       this.set("saving", true);
-      this.model
-        .saveChanges("theme_fields")
-        .finally(() => {
-          this.set("saving", false);
-        });
+      this.model.saveChanges("theme_fields").finally(() => {
+        this.set("saving", false);
+      });
     },
 
     fieldAdded(target, name) {
-      this.replaceRoute(
-        this.editRouteName,
-        this.get("model.id"),
-        target,
-        name
-      );

[... diff too long, it was truncated ...]

GitHub sha: d93f753b

2 Likes