DEV: Fix linting errors (#83)

DEV: Fix linting errors (#83)

Template lint errors and broken rubocop linting.

diff --git a/.eslintrc b/.eslintrc
index 3b7d8a1..ac403ef 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,6 +1,6 @@
 {
   "globals": {
-    "Stripe": true,
+    "Stripe": true
   },
   "extends": "eslint-config-discourse"
 }
diff --git a/.rubocop.yml b/.rubocop.yml
index 7a86442..9661a87 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,6 +1,3 @@
-AllCops:
-  Exclude:
-    - 'gems/**/*'
 inherit_gem:
   rubocop-discourse: default.yml
 
diff --git a/Gemfile.lock b/Gemfile.lock
index 57ac962..b5197eb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -7,31 +7,32 @@ GIT
 GEM
   remote: https://rubygems.org/
   specs:
-    ast (2.4.1)
-    parallel (1.19.2)
-    parser (2.7.1.4)
+    ast (2.4.2)
+    parallel (1.20.1)
+    parser (3.0.1.1)
       ast (~> 2.4.1)
     rainbow (3.0.0)
-    regexp_parser (1.7.1)
+    regexp_parser (2.1.1)
     rexml (3.2.5)
-    rubocop (0.88.0)
+    rubocop (1.18.2)
       parallel (~> 1.10)
-      parser (>= 2.7.1.1)
+      parser (>= 3.0.0.0)
       rainbow (>= 2.2.2, < 4.0)
-      regexp_parser (>= 1.7)
+      regexp_parser (>= 1.8, < 3.0)
       rexml
-      rubocop-ast (>= 0.1.0, < 1.0)
+      rubocop-ast (>= 1.7.0, < 2.0)
       ruby-progressbar (~> 1.7)
-      unicode-display_width (>= 1.4.0, < 2.0)
-    rubocop-ast (0.3.0)
-      parser (>= 2.7.1.4)
-    rubocop-discourse (2.3.1)
-      rubocop (>= 0.69.0)
-      rubocop-rspec (>= 1.39.0)
-    rubocop-rspec (1.42.0)
-      rubocop (>= 0.87.0)
-    ruby-progressbar (1.10.1)
-    unicode-display_width (1.7.0)
+      unicode-display_width (>= 1.4.0, < 3.0)
+    rubocop-ast (1.7.0)
+      parser (>= 3.0.1.1)
+    rubocop-discourse (2.4.2)
+      rubocop (>= 1.1.0)
+      rubocop-rspec (>= 2.0.0)
+    rubocop-rspec (2.4.0)
+      rubocop (~> 1.0)
+      rubocop-ast (>= 1.1.0)
+    ruby-progressbar (1.11.0)
+    unicode-display_width (2.0.0)
 
 PLATFORMS
   ruby
@@ -41,4 +42,4 @@ DEPENDENCIES
   translations-manager!
 
 BUNDLED WITH
-   2.1.4
+   2.2.19
diff --git a/assets/javascripts/discourse/components/campaign-banner.js.es6 b/assets/javascripts/discourse/components/campaign-banner.js.es6
index 4827ba5..7436027 100644
--- a/assets/javascripts/discourse/components/campaign-banner.js.es6
+++ b/assets/javascripts/discourse/components/campaign-banner.js.es6
@@ -92,6 +92,21 @@ export default Component.extend({
     }
   },
 
+  @discourseComputed("backgroundImageUrl")
+  bannerInfoStyle(backgroundImageUrl) {
+    if (!backgroundImageUrl) {
+      return "";
+    }
+
+    return `background-image: linear-gradient(
+        0deg,
+        rgba(var(--secondary-rgb), 0.75) 0%,
+        rgba(var(--secondary-rgb), 0.75) 100%),
+        var(--campaign-background-image);
+      background-size: cover;
+      background-repeat: no-repeat;`;
+  },
+
   @discourseComputed(
     "router.currentRouteName",
     "currentUser",
diff --git a/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-coupons.hbs b/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-coupons.hbs
index c0cb065..1ea9127 100644
--- a/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-coupons.hbs
+++ b/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-coupons.hbs
@@ -1,31 +1,34 @@
 {{#if model.unconfigured}}
-  <p>{{i18n 'discourse_subscriptions.admin.unconfigured'}}</p>
-  <p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n 'discourse_subscriptions.admin.on_meta'}}</a></p>
+  <p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
+  <p><a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">{{i18n "discourse_subscriptions.admin.on_meta"}}</a></p>
 {{else}}
   {{#if model}}
     <table class="table discourse-patrons-table">
       <thead>
-        <th>{{i18n 'discourse_subscriptions.admin.coupons.code'}}</th>
-        <th>{{i18n 'discourse_subscriptions.admin.coupons.discount'}}</th>
-        <th>{{i18n 'discourse_subscriptions.admin.coupons.times_redeemed'}}</th>
-        <th>{{i18n 'discourse_subscriptions.admin.coupons.active'}}</th>
-        <th>{{i18n 'discourse_subscriptions.admin.coupons.actions'}}</th>
+        <th>{{i18n "discourse_subscriptions.admin.coupons.code"}}</th>
+        <th>{{i18n "discourse_subscriptions.admin.coupons.discount"}}</th>
+        <th>{{i18n "discourse_subscriptions.admin.coupons.times_redeemed"}}</th>
+        <th>{{i18n "discourse_subscriptions.admin.coupons.active"}}</th>
+        <th>{{i18n "discourse_subscriptions.admin.coupons.actions"}}</th>
       </thead>
-      {{#each model as |coupon|}}
-        <tr>
-          <td>{{coupon.code}}</td>
-          <td>{{coupon.discount}}</td>
-          <td>{{coupon.times_redeemed}}</td>
-          <td>{{input type="checkbox" checked=coupon.active click=(action "toggleActive" coupon)}}</td>
-          <td>
-            {{d-button
-              action=(action "deleteCoupon")
-              actionParam=coupon
-              icon="trash-alt"
-              class="btn-danger btn btn-icon btn-no-text"}}
-          </td>
-        </tr>
-      {{/each}}
+      <tbody>
+        {{#each model as |coupon|}}
+          <tr>
+            <td>{{coupon.code}}</td>
+            <td>{{coupon.discount}}</td>
+            <td>{{coupon.times_redeemed}}</td>
+            <td>{{input type="checkbox" checked=coupon.active click=(action "toggleActive" coupon)}}</td>
+            <td>
+              {{d-button
+                action=(action "deleteCoupon")
+                actionParam=coupon
+                icon="trash-alt"
+                class="btn-danger btn btn-icon btn-no-text"
+              }}
+            </td>
+          </tr>
+        {{/each}}
+      </tbody>
     </table>
   {{/if}}
 
@@ -35,10 +38,11 @@
       label="discourse_subscriptions.admin.coupons.create"
       title="discourse_subscriptions.admin.coupons.create"
       icon="plus"
-      class="btn btn-icon btn-primary create-coupon"}}
+      class="btn btn-icon btn-primary create-coupon"
+    }}
   {{/unless}}
 
   {{#if creating}}
-    {{create-coupon-form cancel=(action 'closeCreateForm') create=(action 'createNewCoupon')}}
+    {{create-coupon-form cancel=(action "closeCreateForm") create=(action "createNewCoupon")}}
   {{/if}}
 {{/if}}
diff --git a/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-dashboard.hbs b/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-dashboard.hbs
index fa04f74..4be4370 100644
--- a/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-dashboard.hbs
+++ b/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-dashboard.hbs
@@ -1,35 +1,36 @@
-
-<h3>{{i18n 'discourse_subscriptions.admin.dashboard.title'}}</h3>
+<h3>{{i18n "discourse_subscriptions.admin.dashboard.title"}}</h3>
 
 {{#load-more selector=".discourse-patrons-table tr" action=(action "loadMore")}}
   {{#if model}}
     <table class="table discourse-patrons-table">
       <thead>
         <tr>
-          <th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.user'}}</th>
-          <th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.payment_intent'}}</th>
-          <th>{{i18n 'discourse_subscriptions.admin.dashboard.table.head.receipt_email'}}</th>
-          <th onclick={{action "orderPayments" "created_at"}} class="sortable">{{i18n 'created'}}</th>
-          <th class="amount" onclick={{action "orderPayments" "amount"}} class="sortable amount">{{i18n 'discourse_subscriptions.admin.dashboard.table.head.amount'}}</th>
+          <th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.user"}}</th>
+          <th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.payment_intent"}}</th>
+          <th>{{i18n "discourse_subscriptions.admin.dashboard.table.head.receipt_email"}}</th>
+          <th role="button" onclick={{action "orderPayments" "created_at"}} class="sortable">{{i18n "created"}}</th>

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

GitHub sha: 21d71e09fcb7e70241275320c8b6cbf3b470eae8

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