DEV: apply coding standards (#32)

DEV: apply coding standards (#32)

diff --git a/.eslintrc b/.eslintrc
index 66c4b8d..7898fbf 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,105 +1,3 @@
 {
-  "env": {
-    "jasmine": true,
-    "node": true,
-    "mocha": true,
-    "browser": true,
-    "builtin": true
-  },
-  "parserOptions": {
-    "ecmaVersion": 7,
-    "sourceType": "module"
-  },
-  "globals": {
-    "Ember":true,
-    "jQuery":true,
-    "$":true,
-    "RSVP":true,
-    "Discourse":true,
-    "PreloadStore":true,
-    "Handlebars":true,
-    "I18n":true,
-    "bootbox":true,
-    "module":true,
-    "moduleFor":true,
-    "moduleForComponent":true,
-    "Pretender":true,
-    "sandbox":true,
-    "controllerFor":true,
-    "test":true,
-    "ok":true,
-    "not":true,
-    "expect":true,
-    "equal":true,
-    "visit":true,
-    "andThen":true,
-    "click":true,
-    "currentPath":true,
-    "currentRouteName":true,
-    "currentURL":true,
-    "fillIn":true,
-    "keyEvent":true,
-    "triggerEvent":true,
-    "count":true,
-    "exists":true,
-    "visible":true,
-    "invisible":true,
-    "asyncRender":true,
-    "selectKit":true,
-    "asyncTestDiscourse":true,
-    "fixture":true,
-    "find":true,
-    "sinon":true,
-    "moment":true,
-    "start":true,
-    "_":true,
-    "alert":true,
-    "containsInstance":true,
-    "deepEqual":true,
-    "notEqual":true,
-    "define":true,
-    "require":true,
-    "requirejs":true,
-    "hasModule":true,
-    "Blob":true,
-    "File":true},
-  "rules": {
-    "block-scoped-var": 2,
-    "dot-notation": 0,
-    "eqeqeq": [
-      2,
-      "allow-null"
-    ],
-    "guard-for-in": 2,
-    "no-bitwise": 2,
-    "no-caller": 2,
-    "no-cond-assign": 0,
-    "no-debugger": 2,
-    "no-empty": 0,
-    "no-eval": 2,
-    "no-extend-native": 2,
-    "no-extra-parens": 0,
-    "no-irregular-whitespace": 2,
-    "no-iterator": 2,
-    "no-loop-func": 2,
-    "no-multi-str": 2,
-    "no-new": 2,
-    "no-plusplus": 0,
-    "no-proto": 2,
-    "no-script-url": 2,
-    "no-sequences": 2,
-    "no-shadow": 2,
-    "no-undef": 2,
-    "no-unused-vars": 2,
-    "no-with": 2,
-    "no-this-before-super": 2,
-    "semi": 2,
-    "strict": 0,
-    "valid-typeof": 2,
-    "wrap-iife": [
-      2,
-      "inside"
-    ]
-  },
-  "parser": "babel-eslint"
+  "extends": "eslint-config-discourse"
 }
diff --git a/.gitignore b/.gitignore
index 0ca0b3d..3c9145e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
 .DS_Store
 
 node_modules/
+node_modules
+yarn-error.log
+.rubocop-https---raw-githubusercontent-com-discourse-*
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/discourse/adapters/cakeday.js.es6 b/assets/javascripts/discourse/adapters/cakeday.js.es6
index da287c2..3f86733 100644
--- a/assets/javascripts/discourse/adapters/cakeday.js.es6
+++ b/assets/javascripts/discourse/adapters/cakeday.js.es6
@@ -3,5 +3,5 @@ import RESTAdapter from "discourse/adapters/rest";
 export default RESTAdapter.extend({
   basePath() {
     return "/cakeday/";
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/components/emoji-images.js.es6 b/assets/javascripts/discourse/components/emoji-images.js.es6
index e0ff42d..f69d4e5 100644
--- a/assets/javascripts/discourse/components/emoji-images.js.es6
+++ b/assets/javascripts/discourse/components/emoji-images.js.es6
@@ -1,5 +1,6 @@
 import computed from "discourse-common/utils/decorators";
 import { emojiUnescape } from "discourse/lib/text";
+import I18n from "I18n";
 
 export default Ember.Component.extend({
   classNames: ["emoji-images"],
@@ -8,11 +9,11 @@ export default Ember.Component.extend({
   emojiHTML(list) {
     return list
       .split("|")
-      .map(et => emojiUnescape(`:${et}:`, { skipTitle: true }));
+      .map((et) => emojiUnescape(`:${et}:`, { skipTitle: true }));
   },
 
   @computed("title")
   titleText(title) {
     return I18n.t(title);
-  }
+  },
 });
diff --git a/assets/javascripts/discourse/connectors/user-card-post-names/user-card-cakeday.js.es6 b/assets/javascripts/discourse/connectors/user-card-post-names/user-card-cakeday.js.es6
index f233694..d3e8e8f 100644
--- a/assets/javascripts/discourse/connectors/user-card-post-names/user-card-cakeday.js.es6
+++ b/assets/javascripts/discourse/connectors/user-card-post-names/user-card-cakeday.js.es6
@@ -2,7 +2,7 @@ import {
   cakeday,
   cakedayTitle,
   cakedayBirthday,
-  cakedayBirthdayTitle
+  cakedayBirthdayTitle,
 } from "discourse/plugins/discourse-cakeday/discourse/lib/cakeday";
 
 export default {
@@ -17,5 +17,5 @@ export default {
       "cakedayBirthdayTitle",
       cakedayBirthdayTitle(args.user, this.currentUser)
     );
-  }
+  },
 };
diff --git a/assets/javascripts/discourse/connectors/user-custom-preferences/user-date-of-birth-input.js.es6 b/assets/javascripts/discourse/connectors/user-custom-preferences/user-date-of-birth-input.js.es6
index fff201f..4398dfc 100644
--- a/assets/javascripts/discourse/connectors/user-custom-preferences/user-date-of-birth-input.js.es6
+++ b/assets/javascripts/discourse/connectors/user-custom-preferences/user-date-of-birth-input.js.es6
@@ -4,26 +4,24 @@ export default {
       return { name: month, value: index + 1 };
     });
 
-    const days = Array.from(Array(31).keys()).map(x => (x + 1).toString());
+    const days = Array.from(Array(31).keys()).map((x) => (x + 1).toString());
 
     const dateOfBirth = args.model.get("date_of_birth");
     const userBirthdayMonth = dateOfBirth
       ? moment(dateOfBirth, "YYYY-MM-DD").month() + 1
       : null;
     const userBirthdayDay = dateOfBirth
-      ? moment(dateOfBirth, "YYYY-MM-DD")
-          .date()
-          .toString()
+      ? moment(dateOfBirth, "YYYY-MM-DD").date().toString()
       : null;
 
     component.setProperties({
       months,
       days,
       userBirthdayMonth,
-      userBirthdayDay
+      userBirthdayDay,
     });
 
-    const updateBirthday = function() {
+    const updateBirthday = function () {
       let date = "";
 
       if (component.userBirthdayMonth && component.userBirthdayDay) {
@@ -35,5 +33,5 @@ export default {
 
     component.addObserver("userBirthdayMonth", updateBirthday);
     component.addObserver("userBirthdayDay", updateBirthday);
-  }
+  },
 };
diff --git a/assets/javascripts/discourse/connectors/user-post-names/user-cakeday.js.es6 b/assets/javascripts/discourse/connectors/user-post-names/user-cakeday.js.es6
index 4ff40ee..82090dd 100644
--- a/assets/javascripts/discourse/connectors/user-post-names/user-cakeday.js.es6
+++ b/assets/javascripts/discourse/connectors/user-post-names/user-cakeday.js.es6
@@ -1,6 +1,6 @@
 import {
   cakeday,
-  cakedayBirthday
+  cakedayBirthday,
 } from "discourse/plugins/discourse-cakeday/discourse/lib/cakeday";
 
 export default {
@@ -10,5 +10,5 @@ export default {
       "isUserBirthday",
       cakedayBirthday(args.model.get("date_of_birth"))
     );
-  }
+  },
 };
diff --git a/assets/javascripts/discourse/controllers/cakeday-anniversaries-all.js.es6 b/assets/javascripts/discourse/controllers/cakeday-anniversaries-all.js.es6
index aa54790..e995e7b 100644
--- a/assets/javascripts/discourse/controllers/cakeday-anniversaries-all.js.es6
+++ b/assets/javascripts/discourse/controllers/cakeday-anniversaries-all.js.es6
@@ -14,6 +14,6 @@ export default Ember.Controller.extend({
   actions: {
     loadMore() {
       this.get("model").loadMore();
-    }
-  }
+    },
+  },
 });
diff --git a/assets/javascripts/discourse/controllers/cakeday-anniversaries-today.js.es6 b/assets/javascripts/discourse/controllers/cakeday-anniversaries-today.js.es6
index aa97fdd..82ad559 100644
--- a/assets/javascripts/discourse/controllers/cakeday-anniversaries-today.js.es6
+++ b/assets/javascripts/discourse/controllers/cakeday-anniversaries-today.js.es6
@@ -1,16 +1,17 @@

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

GitHub sha: e6c67886

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