DEV: Fix no-implicit-this for all user-* components

DEV: Fix no-implicit-this for all user-* components

diff --git a/app/assets/javascripts/discourse/templates/components/user-badge.hbs b/app/assets/javascripts/discourse/templates/components/user-badge.hbs
index c1af47a..89c7dd8 100644
--- a/app/assets/javascripts/discourse/templates/components/user-badge.hbs
+++ b/app/assets/javascripts/discourse/templates/components/user-badge.hbs
@@ -1,7 +1,7 @@
-<a href={{badgeUrl}}>
-  {{#badge-button badge=badge}}
-    {{#if showGrantCount}}
-      <span class="count">(&times;&nbsp;{{count}})</span>
+<a href={{this.badgeUrl}}>
+  {{#badge-button badge=@badge}}
+    {{#if this.showGrantCount}}
+      <span class="count">(&times;&nbsp;{{@count}})</span>
     {{/if}}
   {{/badge-button}}
 </a>
diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
index e5ac417..3be60e8 100644
--- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
@@ -1,6 +1,6 @@
-{{#if visible}}
+{{#if this.visible}}
   <div class="card-content">
-    {{#if loading}}
+    {{#if this.loading}}
       <div class="card-row first-row">
         <div class="user-card-avatar">
           <div class="card-avatar-placeholder animated-placeholder placeholder-animation"></div>
@@ -22,71 +22,71 @@
     {{else}}
       <div class="card-row first-row">
         <div class="user-card-avatar">
-          {{#if user.profile_hidden}}
-            <span class="card-huge-avatar">{{bound-avatar user "huge"}}</span>
+          {{#if this.user.profile_hidden}}
+            <span class="card-huge-avatar">{{bound-avatar this.user "huge"}}</span>
           {{else}}
-            <a href={{user.path}} {{action "showUser" user}} class="card-huge-avatar">{{bound-avatar user "huge"}}</a>
+            <a href={{this.user.path}} {{action "showUser" this.user}} class="card-huge-avatar">{{bound-avatar this.user "huge"}}</a>
           {{/if}}
-          {{#if user.primary_group_name}}
+          {{#if this.user.primary_group_name}}
             {{avatar-flair
-            flairURL=user.primary_group_flair_url
-            flairBgColor=user.primary_group_flair_bg_color
-            flairColor=user.primary_group_flair_color
-            groupName=user.primary_group_name}}
+            flairURL=this.user.primary_group_flair_url
+            flairBgColor=this.user.primary_group_flair_bg_color
+            flairColor=this.user.primary_group_flair_color
+            groupName=this.user.primary_group_name}}
           {{/if}}
-          {{plugin-outlet name="user-card-avatar-flair" args=(hash user=user) tagName="div"}}
+          {{plugin-outlet name="user-card-avatar-flair" args=(hash user=this.user) tagName="div"}}
         </div>
         <div class="names">
-          <h1 class="{{staff}} {{newUser}} {{if nameFirst "full-name" "username"}}">
-            {{#if user.profile_hidden}}
+          <h1 class="{{this.staff}} {{this.newUser}} {{if this.nameFirst "full-name" "username"}}">
+            {{#if this.user.profile_hidden}}
               <span class="name-username-wrapper">
-                {{if nameFirst user.name (format-username username)}}
+                {{if this.nameFirst this.user.name (format-username this.username)}}
               </span>
             {{else}}
-              <a href={{user.path}} {{action "showUser" user}} class="user-profile-link">
+              <a href={{this.user.path}} {{action "showUser" this.user}} class="user-profile-link">
                 <span class="name-username-wrapper">
-                  {{if nameFirst user.name (format-username username)}}
+                  {{if this.nameFirst this.user.name (format-username this.username)}}
                 </span>
-                {{user-status user currentUser=currentUser}}
+                {{user-status this.user currentUser=this.currentUser}}
               </a>
             {{/if}}
           </h1>
-          {{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=""}}
-          {{#if nameFirst}}
-            <h2 class="username">{{username}}</h2>
+          {{plugin-outlet name="user-card-after-username" args=(hash user=this.user showUser=(action "showUser" this.user)) tagName=""}}
+          {{#if this.nameFirst}}
+            <h2 class="username">{{this.username}}</h2>
           {{else}}
-            {{#if user.name}}
-              <h2 class="full-name">{{user.name}}</h2>
+            {{#if this.user.name}}
+              <h2 class="full-name">{{this.user.name}}</h2>
             {{/if}}
           {{/if}}
-          {{#if user.title}}
-            <h2>{{user.title}}</h2>
+          {{#if this.user.title}}
+            <h2>{{this.user.title}}</h2>
           {{/if}}
-          {{#if user.staged}}
+          {{#if this.user.staged}}
             <h2 class="staged">{{i18n "user.staged"}}</h2>
           {{/if}}
-          {{plugin-outlet name="user-card-post-names" args=(hash user=user) tagName="div"}}
+          {{plugin-outlet name="user-card-post-names" args=(hash user=this.user) tagName="div"}}
         </div>
         <ul class="usercard-controls">
-          {{#if user.can_send_private_message_to_user}}
+          {{#if this.user.can_send_private_message_to_user}}
             <li class="compose-pm">
               {{d-button
               class="btn-primary"
-              action=(action "composePM" user post)
+              action=(action "composePM" this.user this.post)
               icon="envelope"
               label="user.private_message"}}
             </li>
           {{/if}}
-          {{#if showFilter}}
+          {{#if this.showFilter}}
             <li>
               {{d-button
               class="btn-default"
-              action=(action "togglePosts" user)
+              action=(action "togglePosts" this.user)
               icon="filter"
-              translatedLabel=togglePostsLabel}}
+              translatedLabel=this.togglePostsLabel}}
             </li>
           {{/if}}
-          {{#if hasUserFilters}}
+          {{#if this.hasUserFilters}}
             <li>
               {{d-button
               action=(action "cancelFilter")
@@ -94,12 +94,12 @@
               label="topic.filters.cancel"}}
             </li>
           {{/if}}
-          {{#if showDelete}}
+          {{#if this.showDelete}}
             <li>
               {{d-button
               class="btn-danger"
               action=(action "deleteUser")
-              actionParam=user
+              actionParam=this.user
               icon="exclamation-triangle"
               label="admin.user.delete"}}
             </li>
@@ -107,11 +107,11 @@
         </ul>
         {{plugin-outlet
         name="user-card-additional-controls"
-        args=(hash user=user close=(action "close"))
+        args=(hash user=this.user close=(action "close"))
         tagName=""}}
       </div>
 
-      {{#if user.profile_hidden}}
+      {{#if this.user.profile_hidden}}
         <div class="card-row second-row">
           <div class="profile-hidden">
             <span>{{i18n "user.profile_hidden"}}</span>
@@ -119,105 +119,105 @@
         </div>
       {{/if}}
 
-      {{#if isSuspendedOrHasBio}}
+      {{#if this.isSuspendedOrHasBio}}
         <div class="card-row second-row">
-          {{#if user.suspend_reason}}
+          {{#if this.user.suspend_reason}}
             <div class="suspended">
               <div class="suspension-date">
                 {{d-icon "ban"}}
-                {{i18n "user.suspended_notice" date=user.suspendedTillDate}}
+                {{i18n "user.suspended_notice" date=this.user.suspendedTillDate}}
               </div>
               <div class="suspension-reason">
                 <span class="suspension-reason-title">{{i18n "user.suspended_reason"}}</span>
-                <span class="suspension-reason-description">{{user.suspend_reason}}</span>

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

GitHub sha: 424a7614

This commit appears in #9434 which was approved by eviltrout. It was merged by riking.