DEV: Use method definition syntax consistently (#14915)

DEV: Use method definition syntax consistently (#14915)

diff --git a/app/assets/javascripts/admin/addon/components/admin-backups-logs.js b/app/assets/javascripts/admin/addon/components/admin-backups-logs.js
index 0ae94e4..c707c99 100644
--- a/app/assets/javascripts/admin/addon/components/admin-backups-logs.js
+++ b/app/assets/javascripts/admin/addon/components/admin-backups-logs.js
@@ -33,7 +33,7 @@ export default Component.extend({
     }
   },
 
-  _updateFormattedLogsFunc: function () {
+  _updateFormattedLogsFunc() {
     const logs = this.logs;
     if (logs.length === 0) {
       return;
diff --git a/app/assets/javascripts/admin/addon/components/admin-theme-editor.js b/app/assets/javascripts/admin/addon/components/admin-theme-editor.js
index 36d8617..6910e15 100644
--- a/app/assets/javascripts/admin/addon/components/admin-theme-editor.js
+++ b/app/assets/javascripts/admin/addon/components/admin-theme-editor.js
@@ -114,7 +114,7 @@ export default Component.extend({
       this.fieldAdded(this.currentTargetName, name);
     },
 
-    toggleMaximize: function () {
+    toggleMaximize() {
       this.toggleProperty("maximized");
       next(() => this.appEvents.trigger("ace:resize"));
     },
diff --git a/app/assets/javascripts/admin/addon/components/color-input.js b/app/assets/javascripts/admin/addon/components/color-input.js
index 91aeaec..c7a8da4 100644
--- a/app/assets/javascripts/admin/addon/components/color-input.js
+++ b/app/assets/javascripts/admin/addon/components/color-input.js
@@ -40,7 +40,7 @@ export default Component.extend({
   },
 
   @observes("hexValue", "brightnessValue", "valid")
-  hexValueChanged: function () {
+  hexValueChanged() {
     const hex = this.hexValue;
     let text = this.element.querySelector("input.hex-input");
 
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-badges-show.js b/app/assets/javascripts/admin/addon/controllers/admin-badges-show.js
index 5e1ed5b..33c8ad6 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-badges-show.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-badges-show.js
@@ -70,7 +70,7 @@ export default Controller.extend(bufferedProperty("model"), {
   },
 
   @observes("model.id")
-  _resetSaving: function () {
+  _resetSaving() {
     this.set("saving", false);
     this.set("savingStatus", "");
   },
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-customize-colors-show.js b/app/assets/javascripts/admin/addon/controllers/admin-customize-colors-show.js
index 37394fd..f4b6df1 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-customize-colors-show.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-customize-colors-show.js
@@ -15,11 +15,11 @@ export default Controller.extend({
   },
 
   actions: {
-    revert: function (color) {
+    revert(color) {
       color.revert();
     },
 
-    undo: function (color) {
+    undo(color) {
       color.undo();
     },
 
@@ -68,7 +68,7 @@ export default Controller.extend({
       });
     },
 
-    save: function () {
+    save() {
       this.model.save();
     },
 
@@ -76,7 +76,7 @@ export default Controller.extend({
       this.model.updateUserSelectable(this.get("model.user_selectable"));
     },
 
-    destroy: function () {
+    destroy() {
       const model = this.model;
       return bootbox.confirm(
         I18n.t("admin.customize.colors.delete_confirm"),
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-customize-themes-edit.js b/app/assets/javascripts/admin/addon/controllers/admin-customize-themes-edit.js
index 2e1536d..2c0cd18 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-customize-themes-edit.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-customize-themes-edit.js
@@ -12,7 +12,7 @@ export default Controller.extend({
   editRouteName: "adminCustomizeThemes.edit",
   showRouteName: "adminCustomizeThemes.show",
 
-  setTargetName: function (name) {
+  setTargetName(name) {
     const target = this.get("model.targets").find((t) => t.name === name);
     this.set("currentTarget", target && target.id);
   },
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-email-index.js b/app/assets/javascripts/admin/addon/controllers/admin-email-index.js
index 18bfd4a..cc808ad 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-email-index.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-email-index.js
@@ -19,7 +19,7 @@ export default Controller.extend({
     @method testEmailAddressChanged
   **/
   @observes("testEmailAddress")
-  testEmailAddressChanged: function () {
+  testEmailAddressChanged() {
     this.set("sentTestEmail", false);
   },
 
@@ -29,7 +29,7 @@ export default Controller.extend({
 
       @method sendTestEmail
     **/
-    sendTestEmail: function () {
+    sendTestEmail() {
       this.setProperties({
         sendingEmail: true,
         sentTestEmail: false,
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-permalinks.js b/app/assets/javascripts/admin/addon/controllers/admin-permalinks.js
index b11b397..d4f354d 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-permalinks.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-permalinks.js
@@ -37,7 +37,7 @@ export default Controller.extend({
       textArea.remove();
     },
 
-    destroy: function (record) {
+    destroy(record) {
       return bootbox.confirm(
         I18n.t("admin.permalink.delete_confirm"),
         I18n.t("no_value"),
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-plugins.js b/app/assets/javascripts/admin/addon/controllers/admin-plugins.js
index d19c558..5455153 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-plugins.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-plugins.js
@@ -3,7 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
 
 export default Controller.extend({
   @discourseComputed
-  adminRoutes: function () {
+  adminRoutes() {
     return this.model
       .map((p) => {
         if (p.get("enabled")) {
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-user-badges.js b/app/assets/javascripts/admin/addon/controllers/admin-user-badges.js
index d784c31..9461374 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-user-badges.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-user-badges.js
@@ -61,7 +61,7 @@ export default Controller.extend(GrantBadgeController, {
   },
 
   actions: {
-    expandGroup: function (userBadge) {
+    expandGroup(userBadge) {
       const model = this.model;
       model.set("expandedBadges", model.get("expandedBadges") || []);
       model.get("expandedBadges").pushObject(userBadge.badge.id);
diff --git a/app/assets/javascripts/admin/addon/models/email-settings.js b/app/assets/javascripts/admin/addon/models/email-settings.js
index f959df4..aa4a245 100644
--- a/app/assets/javascripts/admin/addon/models/email-settings.js
+++ b/app/assets/javascripts/admin/addon/models/email-settings.js
@@ -4,7 +4,7 @@ import { ajax } from "discourse/lib/ajax";
 const EmailSettings = EmberObject.extend({});
 
 EmailSettings.reopenClass({
-  find: function () {
+  find() {
     return ajax("/admin/email.json").then(function (settings) {
       return EmailSettings.create(settings);
     });
diff --git a/app/assets/javascripts/admin/addon/models/permalink.js b/app/assets/javascripts/admin/addon/models/permalink.js
index f9ed524..25a3c90 100644
--- a/app/assets/javascripts/admin/addon/models/permalink.js
+++ b/app/assets/javascripts/admin/addon/models/permalink.js
@@ -5,7 +5,7 @@ import { ajax } from "discourse/lib/ajax";
 import discourseComputed from "discourse-common/utils/decorators";
 
 const Permalink = EmberObject.extend({
-  save: function () {
+  save() {
     return ajax("/admin/permalinks.json", {
       type: "POST",
       data: {
@@ -17,16 +17,16 @@ const Permalink = EmberObject.extend({
   },
 
   @discourseComputed("category_id")

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

GitHub sha: f414d5eace41a4e00781ba4aaf1d03ac8c9e3f9a

This commit appears in #14915 which was approved by davidtaylorhq. It was merged by CvX.