Skip to content

A platform for community discussion. Free, open, simple.

DEV: Clean up template-lint disable/enable lines (#21770)

Jarek Radosz2a748ff5cb83
diff --git a/app/assets/javascripts/discourse/app/components/bookmark-list.hbs b/app/assets/javascripts/discourse/app/components/bookmark-list.hbs
index b57c4372a2f..86a0b678c90 100644
--- a/app/assets/javascripts/discourse/app/components/bookmark-list.hbs
+++ b/app/assets/javascripts/discourse/app/components/bookmark-list.hbs
@@ -89,7 +89,8 @@
}}
</a>
{{/if}}
- {{! template-lint-disable }}
+
+ {{! template-lint-disable no-invalid-interactive }}
<p
class="post-excerpt"
{{on "click" this.screenExcerptForExternalLink}}
diff --git a/app/assets/javascripts/discourse/app/components/d-toggle-switch.hbs b/app/assets/javascripts/discourse/app/components/d-toggle-switch.hbs
index 837d2ac2058..2e06ef0c8ce 100644
--- a/app/assets/javascripts/discourse/app/components/d-toggle-switch.hbs
+++ b/app/assets/javascripts/discourse/app/components/d-toggle-switch.hbs
@@ -1,6 +1,6 @@
<div class="d-toggle-switch">
<label class="d-toggle-switch--label">
- {{! template-lint-disable no-unnecessary-concat }}
+ {{! template-lint-disable no-unnecessary-concat }}
<button
class="d-toggle-switch__checkbox"
type="button"
@@ -8,12 +8,15 @@
aria-checked="{{@state}}"
...attributes
></button>
+ {{! template-lint-enable no-unnecessary-concat }}
+
<span class="d-toggle-switch__checkbox-slider">
{{#if @state}}
{{d-icon "check"}}
{{/if}}
</span>
</label>
+
<span class="d-toggle-switch__checkbox-label">
{{this.computedLabel}}
</span>
diff --git a/app/assets/javascripts/discourse/app/components/user-card-contents.hbs b/app/assets/javascripts/discourse/app/components/user-card-contents.hbs
index dda453250c2..e0b92f2772e 100644
--- a/app/assets/javascripts/discourse/app/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/app/components/user-card-contents.hbs
@@ -261,12 +261,13 @@
<span class="website-name">
{{d-icon "globe"}}
{{#if this.linkWebsite}}
- {{! template-lint-disable }}
+ {{! template-lint-disable link-rel-noopener }}
<a
- href="{{this.user.website}}"
+ href={{this.user.website}}
rel="noopener {{unless this.removeNoFollow 'nofollow ugc'}}"
target="_blank"
>{{this.user.website_name}}</a>
+ {{! template-lint-enable link-rel-noopener }}
{{else}}
<span
title={{this.user.website}}
@@ -281,7 +282,7 @@
</span>
{{/if}}
{{#if this.showUserLocalTime}}
- <span class="local-time" title="{{i18n 'local_time'}}">
+ <span class="local-time" title={{i18n "local_time"}}>
{{d-icon "far-clock"}}
<span>{{this.formattedUserLocalTime}}</span>
</span>
@@ -307,7 +308,7 @@
<h3><span class="desc">{{i18n "joined"}}</span>
{{format-date this.user.created_at leaveAgo="true"}}</h3>
{{#if this.user.time_read}}
- <h3 title="{{this.timeReadTooltip}}">
+ <h3 title={{this.timeReadTooltip}}>
<span class="desc">{{i18n "time_read"}}</span>
{{format-duration this.user.time_read}}
{{#if this.showRecentTimeRead}}
diff --git a/app/assets/javascripts/discourse/app/templates/user/summary.hbs b/app/assets/javascripts/discourse/app/templates/user/summary.hbs
index bb8fb58f8ba..15859e0cdb0 100644
--- a/app/assets/javascripts/discourse/app/templates/user/summary.hbs
+++ b/app/assets/javascripts/discourse/app/templates/user/summary.hbs
@@ -150,9 +150,9 @@
<UserSummarySection @title="top_links" @class="links-section pull-left">
{{#if this.model.links.length}}
<ul>
- {{! template-lint-disable }}
{{#each this.model.links as |link|}}
<li>
+ {{! template-lint-disable link-rel-noopener }}
<a
class="domain"
href={{link.url}}
@@ -165,14 +165,20 @@
>
{{shorten-url link.url}}
</a>
+ {{! template-lint-enable link-rel-noopener }}
+
<span
class="badge badge-notification clicks"
- title="{{i18n 'topic_map.clicks' count=link.clicks}}"
- >{{number link.clicks}}</span>
+ title={{i18n "topic_map.clicks" count=link.clicks}}
+ >
+ {{number link.clicks}}
+ </span>
+
<br />
- <a href="{{link.post_url}}">{{html-safe
- link.topic.fancyTitle
- }}</a>
+
+ <a href={{link.post_url}}>
+ {{html-safe link.topic.fancyTitle}}
+ </a>
</li>
{{/each}}
</ul>