DEV: apply coding standards (#59)

DEV: apply coding standards (#59)

diff --git a/.gitignore b/.gitignore
index 03d2b8b..9cc7a2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
 gems/
 /node_modules
 .on-save.json
+node_modules
+yarn-error.log
+.rubocop-https---raw-githubusercontent-com-discourse-*
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1 @@
+{}
diff --git a/.template-lintrc.js b/.template-lintrc.js
new file mode 100644
index 0000000..a558b8e
--- /dev/null
+++ b/.template-lintrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+  plugins: ["ember-template-lint-plugin-discourse"],
+  extends: "discourse:recommended",
+};
diff --git a/assets/javascripts/connectors/after-user-name/holiday-flair.js.es6 b/assets/javascripts/connectors/after-user-name/holiday-flair.js.es6
index 52e5a7f..064474f 100644
--- a/assets/javascripts/connectors/after-user-name/holiday-flair.js.es6
+++ b/assets/javascripts/connectors/after-user-name/holiday-flair.js.es6
@@ -14,7 +14,7 @@ export default {
   setupComponent(args, component) {
     component.setProperties({
       holidayEmojiName: `:${HOLIDAY_EMOJI_NAME}:`,
-      holidayEmoji: emojiUrlFor(HOLIDAY_EMOJI_NAME)
+      holidayEmoji: emojiUrlFor(HOLIDAY_EMOJI_NAME),
     });
-  }
+  },
 };
diff --git a/assets/javascripts/connectors/before-topic-list-body/category-calendar.js.es6 b/assets/javascripts/connectors/before-topic-list-body/category-calendar.js.es6
index d0457c8..9ece792 100644
--- a/assets/javascripts/connectors/before-topic-list-body/category-calendar.js.es6
+++ b/assets/javascripts/connectors/before-topic-list-body/category-calendar.js.es6
@@ -1,5 +1,5 @@
 export default {
   shouldRender(_, ctx) {
     return ctx.siteSettings.calendar_categories_outlet === ctx.name;
-  }
+  },
 };
diff --git a/assets/javascripts/connectors/discovery-list-container-top/category-calendar.js.es6 b/assets/javascripts/connectors/discovery-list-container-top/category-calendar.js.es6
index d0457c8..9ece792 100644
--- a/assets/javascripts/connectors/discovery-list-container-top/category-calendar.js.es6
+++ b/assets/javascripts/connectors/discovery-list-container-top/category-calendar.js.es6
@@ -1,5 +1,5 @@
 export default {
   shouldRender(_, ctx) {
     return ctx.siteSettings.calendar_categories_outlet === ctx.name;
-  }
+  },
 };
diff --git a/assets/javascripts/connectors/user-custom-preferences/region.js.es6 b/assets/javascripts/connectors/user-custom-preferences/region.js.es6
index 1bdb740..58eb26f 100644
--- a/assets/javascripts/connectors/user-custom-preferences/region.js.es6
+++ b/assets/javascripts/connectors/user-custom-preferences/region.js.es6
@@ -15,11 +15,11 @@ export default {
           "custom_fields.holidays-region",
           TIME_ZONE_TO_REGION[moment.tz.guess()] || "us"
         );
-      }
+      },
     });
   },
 
   shouldRender(args, component) {
     return component.siteSettings.calendar_enabled;
-  }
+  },
 };
diff --git a/assets/javascripts/discourse/adapters/discourse-post-event-adapter.js.es6 b/assets/javascripts/discourse/adapters/discourse-post-event-adapter.js.es6
index a113888..b2cf021 100644
--- a/assets/javascripts/discourse/adapters/discourse-post-event-adapter.js.es6
+++ b/assets/javascripts/discourse/adapters/discourse-post-event-adapter.js.es6
@@ -3,5 +3,5 @@ import RestAdapter from "discourse/adapters/rest";
 export default RestAdapter.extend({
   basePath() {
     return "/discourse-post-event/";
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/adapters/discourse-post-event-event.js.es6 b/assets/javascripts/discourse/adapters/discourse-post-event-event.js.es6
index eabb051..d7e1a68 100644
--- a/assets/javascripts/discourse/adapters/discourse-post-event-event.js.es6
+++ b/assets/javascripts/discourse/adapters/discourse-post-event-event.js.es6
@@ -11,5 +11,5 @@ export default DiscoursePostEventAdapter.extend({
 
   apiNameFor() {
     return "event";
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/adapters/discourse-post-event-invitee.js.es6 b/assets/javascripts/discourse/adapters/discourse-post-event-invitee.js.es6
index 1ba0316..f69756f 100644
--- a/assets/javascripts/discourse/adapters/discourse-post-event-invitee.js.es6
+++ b/assets/javascripts/discourse/adapters/discourse-post-event-invitee.js.es6
@@ -3,5 +3,5 @@ import DiscoursePostEventNestedAdapter from "./discourse-post-event-nested-adapt
 export default DiscoursePostEventNestedAdapter.extend({
   apiNameFor() {
     return "invitee";
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/adapters/discourse-post-event-nested-adapter.js.es6 b/assets/javascripts/discourse/adapters/discourse-post-event-nested-adapter.js.es6
index 9328701..738cffd 100644
--- a/assets/javascripts/discourse/adapters/discourse-post-event-nested-adapter.js.es6
+++ b/assets/javascripts/discourse/adapters/discourse-post-event-nested-adapter.js.es6
@@ -9,10 +9,10 @@ export default DiscoursePostEventAdapter.extend({
     return ajax(
       this.pathFor(store, type, {
         post_id: record.post_id,
-        id: record.id
+        id: record.id,
       }),
       {
-        type: "DELETE"
+        type: "DELETE",
       }
     );
   },
@@ -25,7 +25,7 @@ export default DiscoursePostEventAdapter.extend({
     return ajax(
       this.pathFor(store, type, { id, post_id: attrs.post_id }),
       this.getPayload("PUT", data)
-    ).then(function(json) {
+    ).then(function (json) {
       return new Result(json[typeField], json);
     });
   },
@@ -37,7 +37,7 @@ export default DiscoursePostEventAdapter.extend({
     return ajax(
       this.pathFor(store, type, attrs),
       this.getPayload("POST", data)
-    ).then(function(json) {
+    ).then(function (json) {
       return new Result(json[typeField], json);
     });
   },
@@ -61,5 +61,5 @@ export default DiscoursePostEventAdapter.extend({
     }
 
     return this.appendQueryParams(path, findArgs);
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/adapters/discourse-post-event-reminder.js.es6 b/assets/javascripts/discourse/adapters/discourse-post-event-reminder.js.es6
index c630a75..ed1c818 100644
--- a/assets/javascripts/discourse/adapters/discourse-post-event-reminder.js.es6
+++ b/assets/javascripts/discourse/adapters/discourse-post-event-reminder.js.es6
@@ -3,5 +3,5 @@ import DiscoursePostEventNestedAdapter from "./discourse-post-event-nested-adapt
 export default DiscoursePostEventNestedAdapter.extend({
   apiNameFor() {
     return "reminder";
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.js.es6 b/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.js.es6
index 06c20db..5d281f2 100644
--- a/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.js.es6
+++ b/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.js.es6
@@ -8,11 +8,11 @@ export default Component.extend({
       ["my_awesome_group", "going"],
       ["lucy", "interested"],
       ["mark", "not_going"],
-      ["sam", "unknown"]
+      ["sam", "unknown"],
     ];
 
     let csv = "";
-    sampleData.forEach(row => {
+    sampleData.forEach((row) => {
       csv += row.join(",");
       csv += "\n";
     });
@@ -23,5 +23,5 @@ export default Component.extend({
     btn.rel = "noopener noreferrer";
     btn.download = "bulk-invite-sample.csv";
     btn.click();
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/components/event-field.js.es6 b/assets/javascripts/discourse/components/event-field.js.es6
index 8cc86e6..6e0c40f 100644
--- a/assets/javascripts/discourse/components/event-field.js.es6
+++ b/assets/javascripts/discourse/components/event-field.js.es6
@@ -2,5 +2,5 @@ import Component from "@ember/component";
 
 export default Component.extend({
   enabled: true,
-  class: null
+  class: null,
 });
diff --git a/assets/javascripts/discourse/components/region-input.js.es6 b/assets/javascripts/discourse/components/region-input.js.es6
index 104e3ed..7fd534a 100644

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

GitHub sha: 9b0aac21

This commit appears in #59 which was merged by jjaffeux.